diff options
Diffstat (limited to 'views/default/layouts/widgets.php')
-rw-r--r-- | views/default/layouts/widgets.php | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/views/default/layouts/widgets.php b/views/default/layouts/widgets.php deleted file mode 100644 index 130b2eaad..000000000 --- a/views/default/layouts/widgets.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -/** - * Elgg widgets layout - * - * @uses $vars['box'] Optional display box at the top of layout - * @uses $vars['num_columns'] Number of widget columns for this layout - * @uses $vars['show_add_widgets'] Display the add widgets button and panel - */ - -$box = elgg_get_array_value('box', $vars, ''); -$num_columns = elgg_get_array_value('num_columns', $vars, 3); -$show_add_widgets = elgg_get_array_value('show_add_widgets', $vars, true); - -$owner = elgg_get_page_owner(); -$context = elgg_get_context(); -elgg_push_context('widgets'); - -$widgets = elgg_get_widgets($owner->guid, $context); - -if (elgg_can_edit_widget_layout($context)) { - if ($show_add_widgets) { - echo elgg_view('widgets/add-button'); - } - $params = array( - 'widgets' => $widgets, - 'context' => $context, - ); - echo elgg_view('widgets/add_panel', $params); -} - -echo $vars['box']; - -$widget_class = "widget-{$num_columns}-columns"; -for ($column_index = 1; $column_index <= $num_columns; $column_index++) { - $column_widgets = $widgets[$column_index]; - - echo "<div class=\"widget-column $widget_class\" id=\"widget-col-$column_index\">"; - if (is_array($column_widgets) && sizeof($column_widgets) > 0) { - foreach ($column_widgets as $widget) { - echo elgg_view_entity($widget); - } - } - echo '</div>'; -} - -elgg_pop_context();
\ No newline at end of file |