From ff1edc8a348780dcde12e656304309a2bd89755c Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 14 May 2011 20:31:29 +0000 Subject: Fixes #3456 user/default now works much like the object/ views regarding the menu git-svn-id: http://code.elgg.org/elgg/trunk@9082 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/user/default.php | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'views/default/user/default.php') diff --git a/views/default/user/default.php b/views/default/user/default.php index 71eb273f0..501949306 100644 --- a/views/default/user/default.php +++ b/views/default/user/default.php @@ -6,25 +6,26 @@ * @uses $vars['size'] Size of the icon */ -$user = $vars['entity']; +$entity = $vars['entity']; $size = elgg_extract('size', $vars, 'tiny'); -$icon = elgg_view_entity_icon($user, $size); +$icon = elgg_view_entity_icon($entity, $size); // Simple XFN $rel = ''; -if (elgg_get_logged_in_user_guid() == $user->guid) { +if (elgg_get_logged_in_user_guid() == $entity->guid) { $rel = 'rel="me"'; -} elseif (check_entity_relationship(elgg_get_logged_in_user_guid(), 'friend', $user->guid)) { +} elseif (check_entity_relationship(elgg_get_logged_in_user_guid(), 'friend', $entity->guid)) { $rel = 'rel="friend"'; } -$title = "getUrl() . "\" $rel>" . $user->name . ""; +$title = "getUrl() . "\" $rel>" . $entity->name . ""; - -$metadata = ""; +$metadata = elgg_view_menu('entity', array( + 'entity' => $entity, + 'sort_by' => 'priority', + 'class' => 'elgg-menu-hz', +)); if (elgg_in_context('owner_block') || elgg_in_context('widgets')) { $metadata = ''; @@ -33,20 +34,20 @@ if (elgg_in_context('owner_block') || elgg_in_context('widgets')) { if (elgg_get_context() == 'gallery') { echo $icon; } else { - if ($user->isBanned()) { + if ($entity->isBanned()) { $banned = elgg_echo('banned'); $params = array( - 'entity' => $user, + 'entity' => $entity, 'title' => $title, - 'metadata' => '', + 'metadata' => $metadata, ); } else { $params = array( - 'entity' => $user, + 'entity' => $entity, 'title' => $title, 'metadata' => $metadata, - 'subtitle' => $user->briefdescription, - 'content' => elgg_view('user/status', array('entity' => $user)), + 'subtitle' => $entity->briefdescription, + 'content' => elgg_view('user/status', array('entity' => $entity)), ); } -- cgit v1.2.3