diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/default/css.php | 22 | ||||
-rw-r--r-- | views/default/layouts/widgets.php | 15 | ||||
-rw-r--r-- | views/default/widgets/wrapper.php | 4 |
3 files changed, 18 insertions, 23 deletions
diff --git a/views/default/css.php b/views/default/css.php index d5b96bf59..36c5c60ec 100644 --- a/views/default/css.php +++ b/views/default/css.php @@ -867,19 +867,13 @@ li.navigation_more ul li { width: 100%; } .widget_2_columns { - width: 48%; - margin-right: 4%; + width: 50%; } .widget_3_columns { - width: 32%; - margin-right: 2%; + width: 33.3%; } .widget_4_columns { - width: 23.5%; - margin-right: 2%; -} -.widget_col_1 { - margin-right: 0; + width: 25%; } #widget_add_button { padding: 0px; @@ -887,11 +881,15 @@ li.navigation_more ul li { margin-bottom: 15px; } .widgets_add { - width: 100%; - padding: 10px; + width: 96%; + padding: 2%; margin-bottom: 15px; background: #dedede; } +.widgets_add ul { + padding: 0; + margin: 0; +} .widgets_add li { float: left; margin: 2px 10px; @@ -906,7 +904,7 @@ li.navigation_more ul li { .widget { background-color: #dedede; padding: 2px; - margin-bottom: 15px; + margin: 0 5px 15px; } .widget_title { height: 30px; diff --git a/views/default/layouts/widgets.php b/views/default/layouts/widgets.php index 38451d1c1..74cb6da8d 100644 --- a/views/default/layouts/widgets.php +++ b/views/default/layouts/widgets.php @@ -15,7 +15,7 @@ $owner = elgg_get_page_owner(); $context = elgg_get_context(); elgg_push_context('widgets'); -elgg_get_widgets($owner->guid, $context); +$widgets = elgg_get_widgets($owner->guid, $context); if (elgg_can_edit_widgets()) { if ($show_add_widgets) { @@ -32,18 +32,11 @@ echo $vars['box']; $widget_class = "widget_{$num_columns}_columns"; for ($column_index = 1; $column_index <= $num_columns; $column_index++) { - $widgets = get_widgets($owner->guid, $context, $column_index); - - // test code during design and implementation - $widget1 = new ElggWidget(); - $widget1->handler = 'test'; - $widget2 = new ElggWidget(); - $widget2->handler = 'test'; - $widgets = array($widget1, $widget2); + $column_widgets = $widgets[$column_index]; echo "<div class=\"widget_column $widget_class widget_col_$column_index\">"; - if (is_array($widgets) && sizeof($widgets) > 0) { - foreach ($widgets as $widget) { + if (is_array($column_widgets) && sizeof($column_widgets) > 0) { + foreach ($column_widgets as $widget) { echo elgg_view_entity($widget); } } diff --git a/views/default/widgets/wrapper.php b/views/default/widgets/wrapper.php index 13d8da50e..51f4725b9 100644 --- a/views/default/widgets/wrapper.php +++ b/views/default/widgets/wrapper.php @@ -19,12 +19,16 @@ if ($vars['entity'] instanceof ElggObject && $vars['entity']->getSubtype() == 'w $title = elgg_echo("error"); } +$display_view = "widgets/$handler/view"; +$edit_view = "widgets/$handler/edit"; + ?> <div class="widget draggable"> <div class="widget_title drag_handle"> <h3>Widget Title</h3> </div> <div class="widget_content"> + <?php echo elgg_view($display_view, $vars); ?> <p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p> </div> </div> |