diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-09 01:09:50 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-09 01:09:50 +0000 |
commit | 49e478da9d5540da798a7d497615f0d2903c8e4a (patch) | |
tree | 04a91f3028df014fb2a33b57f614acf88a07805b /views/default/page_elements/topbar.php | |
parent | 8c4fe01968aecea2ccfe6146ff580a272750e4d7 (diff) | |
download | elgg-49e478da9d5540da798a7d497615f0d2903c8e4a.tar.gz elgg-49e478da9d5540da798a7d497615f0d2903c8e4a.tar.bz2 |
Fixes #2631 removes 'elgg_' namespace from the page element views - anyone working with the trunk will need to update their theme and/or flush their cache
git-svn-id: http://code.elgg.org/elgg/trunk@7268 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/page_elements/topbar.php')
-rw-r--r-- | views/default/page_elements/topbar.php | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/views/default/page_elements/topbar.php b/views/default/page_elements/topbar.php new file mode 100644 index 000000000..5f980603e --- /dev/null +++ b/views/default/page_elements/topbar.php @@ -0,0 +1,44 @@ +<?php +/** + * Elgg top toolbar + * The standard elgg top toolbar + */ + +$user = get_loggedin_user(); +if (($user instanceof ElggUser) && ($user->guid > 0)) { + echo '<div id="elgg_topbar" class="clearfix">'; + echo '<div id="elgg_topbar_contents">'; + + // Elgg logo + echo '<a href="http://www.elgg.org">'; + echo "<img class=\"site_logo\" src=\"".elgg_get_site_url()."_graphics/elgg_toolbar_logo.gif\" alt=\"Elgg logo\" />"; + echo '</a>'; + + // avatar + $user_link = $user->getURL(); + $user_image = $user->getIcon('topbar'); + echo "<a href=\"$user_link\"><img class=\"user_mini_avatar\" src=\"$user_image\" alt=\"User avatar\" /></a>"; + + // logout link + echo elgg_view('page_elements/topbar_logout', $vars); + + // elgg tools menu + // need to echo this empty view for backward compatibility. + echo elgg_view("navigation/topbar_tools"); + + // enable elgg topbar extending + echo elgg_view('elgg_topbar/extend', $vars); + + // user settings + $settings = elgg_echo('settings'); + echo "<a href=\"".elgg_get_site_url()."pg/settings\" class=\"settings\">$settings</a>"; + + // The administration link is for admin or site admin users only + if ($user->isAdmin()) { + $admin = elgg_echo("admin"); + echo "<a href=\"".elgg_get_site_url()."pg/admin\" class=\"admin\">$admin</a>"; + } + + echo '</div>'; + echo '</div>'; +} |