aboutsummaryrefslogtreecommitdiff
path: root/views/default/page/elements/topbar.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-25 20:32:02 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-25 20:32:02 +0000
commit2d39bc311b64c2dd5c40236c43a98d4fb2dce31f (patch)
tree7c8426ba8ec21c5394fc182632d3e8f0cbeb72ed /views/default/page/elements/topbar.php
parentf947735999c0e646454e3a98b075cf921c4e0bec (diff)
downloadelgg-2d39bc311b64c2dd5c40236c43a98d4fb2dce31f.tar.gz
elgg-2d39bc311b64c2dd5c40236c43a98d4fb2dce31f.tar.bz2
Refs #2895: Made topbar into 2 menus. CSS will have to be fixed
git-svn-id: http://code.elgg.org/elgg/trunk@8473 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/page/elements/topbar.php')
-rw-r--r--views/default/page/elements/topbar.php47
1 files changed, 2 insertions, 45 deletions
diff --git a/views/default/page/elements/topbar.php b/views/default/page/elements/topbar.php
index 88ffa85e0..cac7cb360 100644
--- a/views/default/page/elements/topbar.php
+++ b/views/default/page/elements/topbar.php
@@ -4,9 +4,7 @@
* The standard elgg top toolbar
*/
-$user = elgg_get_logged_in_user_entity();
-//@todo echo elgg_view_menu('topbar', array('class' => 'elgg-menu-topbar'));
// Elgg logo
$image = '<img src="' . elgg_get_site_url() . '_graphics/elgg_toolbar_logo.gif" alt="Elgg logo" />';
@@ -15,52 +13,11 @@ echo elgg_view('output/url', array(
'text' => $image,
));
-// avatar
-$user_link = $user->getURL();
-$user_image = $user->getIconURL('topbar');
-$image = "<img src=\"$user_image\" alt=\"$user->name\" class=\"bab\" />";
-echo elgg_view('output/url', array(
- 'href' => $user_link,
- 'text' => $image,
-));
+echo elgg_view_menu('topbar', array('sort_by' => 'weight'));
-// friends
-echo elgg_view('output/url', array(
- 'href' => "pg/friends/{$user->username}/",
- 'text' => elgg_view_icon('friends'),
- 'title' => elgg_echo('friends'),
-));
-
-// logout link
-echo elgg_view('output/url', array(
- 'href' => "action/logout",
- 'text' => elgg_echo('logout'),
- 'is_action' => TRUE,
- 'class' => 'elgg-alt',
-));
+echo elgg_view_menu('topbar_alt', array('sort_by' => 'weight'));
// elgg tools menu
// need to echo this empty view for backward compatibility.
// @todo -- do we really? So much else is broken, and the new menu system is so much nicer...
echo elgg_view("navigation/topbar_tools");
-
-// enable elgg topbar extending
-echo elgg_view('elgg_topbar/extend', $vars);
-
-//@todo echo elgg_view_menu('topbar2', array('class' => 'elgg-menu-topbar elgg-alt'));
-
-// user settings
-echo elgg_view('output/url', array(
- 'href' => "pg/settings/user/{$user->username}",
- 'text' => elgg_view_icon('settings') . elgg_echo('settings'),
- 'class' => 'elgg-alt',
-));
-
-// The administration link is for admin or site admin users only
-if ($user->isAdmin()) {
- echo elgg_view('output/url', array(
- 'href' => 'pg/admin/',
- 'text' => elgg_view_icon('settings') . elgg_echo('admin'),
- 'class' => 'elgg-alt',
- ));
-}