From 4766f36a4d74924f21ff329c4318ce4e069ffa04 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 3 Mar 2010 17:53:05 +0000 Subject: Pulled in the interface changes. git-svn-id: http://code.elgg.org/elgg/trunk@5257 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/canvas/layouts/widgets.php | 224 +++++++++++++++++-------------- 1 file changed, 120 insertions(+), 104 deletions(-) (limited to 'views/default/canvas/layouts/widgets.php') diff --git a/views/default/canvas/layouts/widgets.php b/views/default/canvas/layouts/widgets.php index 7b3470dd2..fa0d2ab0c 100644 --- a/views/default/canvas/layouts/widgets.php +++ b/views/default/canvas/layouts/widgets.php @@ -1,42 +1,52 @@ canEdit()) { - -?> + /** + * Elgg widget layout + */ + + $widgettypes = get_widget_types(); + + $owner = page_owner_entity(); + + $area1widgets = get_widgets(page_owner(),get_context(),1); + $area2widgets = get_widgets(page_owner(),get_context(),2); + $area3widgets = get_widgets(page_owner(),get_context(),3); + + if (empty($area1widgets) && empty($area2widgets) && empty($area3widgets)) { + + if (isset($vars['area3'])) $vars['area1'] = $vars['area3']; + if (isset($vars['area4'])) $vars['area2'] = $vars['area4']; + + } + + if (is_array($widgettypes) && sizeof($widgettypes) > 0 && $owner && $owner->canEdit()) { + + + + if($_SESSION['user']->guid == page_owner() || ($owner instanceof ElggGroup && $owner->canEdit())){ + + if(get_context() == "profile") { + ?> + +
+ +
+ -
+