aboutsummaryrefslogtreecommitdiff
path: root/views/default/navigation/topmenu.php
blob: a8211f67ae898e35e429a8615d2a7a8674d28015 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php

	/**
	 * Elgg standard top level menu
	 * The standard user top level navigation; dashboard, profile, account, logout
	 * 
	 * @package Elgg
	 * @subpackage Core
	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
	 * @author Curverider Ltd
	 * @copyright Curverider Ltd 2008
	 * @link http://elgg.org/
	 * 
	 */
	 
?>

<?php
     if (isloggedin()) {
?>
<div id="topmenu">
	<div class="usericon">
	<?php

    	echo elgg_view("profile/icon",array('entity' => $vars['user'], 'size' => 'small'));
    
    ?>
    </div>
    <ul>
        <li><a href="<?php echo $vars['url']; ?>pg/dashboard/"><?php echo elgg_echo('dashboard'); ?></a></li>
        <li><a href="<?php echo $vars['url']; ?>pg/settings/"><?php echo elgg_echo('settings'); ?></a></li>
<?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/"><?php echo elgg_echo("admin"); ?></a></li>

<?php

		}

?>
        <li><a href="<?php echo $vars['url']; ?>action/logout"><?php echo elgg_echo('logout'); ?></a></li>
    </ul>
</div>
<?php
    }
?>