From b070daa95241bc0c7d46011a3de7674fbf0c5e68 Mon Sep 17 00:00:00 2001 From: Fx Nion Date: Sun, 13 May 2012 19:56:15 +0200 Subject: v2.4 --- .../admin/appearance/custom_index_widgets.php | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 views/default/admin/appearance/custom_index_widgets.php (limited to 'views/default/admin') diff --git a/views/default/admin/appearance/custom_index_widgets.php b/views/default/admin/appearance/custom_index_widgets.php new file mode 100644 index 000000000..491c878e5 --- /dev/null +++ b/views/default/admin/appearance/custom_index_widgets.php @@ -0,0 +1,56 @@ +guid, $context); + + +if (elgg_can_edit_widget_layout($context)) { + + if ($show_add_widgets) { + echo elgg_view('page/layouts/widgets/add_button'); + } + $params = array( + 'widgets' => $widgets, + 'context' => $context, + 'exact_match' => $exact_match, + ); + + echo elgg_view('page/layouts/widgets/add_panel', $params); +} + +echo $vars['content']; + +$widget_class = "elgg-col-1of{$num_columns}"; +for ($column_index = 1; $column_index <= $num_columns; $column_index++) { + if (isset($widgets[$column_index])) { + $column_widgets = $widgets[$column_index]; + } else { + $column_widgets = array(); + } + + echo "
"; + if (sizeof($column_widgets) > 0) { + foreach ($column_widgets as $widget) { + if (array_key_exists($widget->handler, $widget_types)) { + echo elgg_view_entity($widget, array('show_access' => $show_access)); + } + } + } + echo '
'; +} + + -- cgit v1.2.3