Newer
Older
Matthew Juhl
committed
<?php
/**
* Elgg navigtion for UNL template college nav
* The standard elgg top toolbar
*
*/
?>
Seth Meranda
committed
<div id="bulletin-nav">
Matthew Juhl
committed
<ul>
<?php
if (isloggedin()) {
?>
<li>
<a href="<?php echo $_SESSION['user']->getURL(); ?>" ><span style="background:url('<?php echo $_SESSION['user']->getIcon('topbar'); ?>') no-repeat; padding-left:20px;">Your Profile</span></a>
Matthew Juhl
committed
</li>
<li>
<a href="<?php echo $vars['url']; ?>pg/dashboard/" class="pagelinks"><span><?php echo elgg_echo('dashboard'); ?></span></a>
Matthew Juhl
committed
</li>
<?php
// recreate tools menu compatible with UNL template
$menu = get_register('menu');
if (is_array($menu) && sizeof($menu) > 0) {
$alphamenu = array();
foreach($menu as $item) {
$alphamenu[$item->name] = $item;
}
ksort($alphamenu);
foreach($alphamenu as $item) {
echo "<li><a href=\"{$item->value}\"><span>" . $item->name . "</span></a></li>";
Matthew Juhl
committed
}
}
?>
<?php
//allow people to extend this top menu
echo elgg_view('elgg_topbar/extend', $vars);
?>
<li><a href="<?php echo $vars['url']; ?>pg/settings/" class="usersettings"><span><?php echo elgg_echo('settings'); ?></span></a></li>
Matthew Juhl
committed
<?php
// The administration link is for admin or site admin users only
if ($vars['user']->admin || $vars['user']->siteadmin) {
?>
<li><a href="<?php echo $vars['url']; ?>pg/admin/" class="usersettings"><span><?php echo elgg_echo("admin"); ?></span></a></li>
Matthew Juhl
committed
<?php
}
?>
<li><a href="<?php echo $vars['url']; ?>action/logout"><span><?php echo elgg_echo('logout'); ?></span></a></li>
Matthew Juhl
committed
<?php
}
?>
Seth Meranda
committed
</ul>
</div>