aboutsummaryrefslogtreecommitdiff
path: root/views/default/page_elements/elgg_topbar.php
blob: f0808fb28a869f96e2556bb00cdc21e69783f87b (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
52
53
54
55
56
57
58
<?php
/**
 * Elgg top toolbar
 * The standard elgg top toolbar
 */
?>

<?php
	if (isloggedin()) {
?>

<div id="elgg_topbar" class="clearfloat">
<div id="elgg_topbar_contents">
	<a href="http://www.elgg.org"><img class="site_logo" src="<?php echo $vars['url']; ?>_graphics/elgg_toolbar_logo.gif" alt="Elgg logo" /></a>
	<a href="<?php echo $_SESSION['user']->getURL(); ?>"><img class="user_mini_avatar" src="<?php echo $_SESSION['user']->getIcon('topbar'); ?>" alt="User avatar" /></a>

	<?php
		// 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);
	?>

	<div class="log_out">
		<?php echo elgg_view('output/url', array('href' => "{$vars['url']}action/logout", 'text' => elgg_echo('logout'), 'is_action' => TRUE)); ?>
	</div>
	
	<a href="<?php echo $vars['url']; ?>pg/settings/" class="settings"><?php echo elgg_echo('settings'); ?></a>

	<?php
	// The administration link is for admin or site admin users only
	if ($vars['user']->admin || $vars['user']->siteadmin) {
	?>
		<a href="<?php echo $vars['url']; ?>pg/admin/" class="admin"><?php echo elgg_echo("admin"); ?></a>

	<?php
	}

	if(is_plugin_enabled('help')){
	?>
		<a href="<?php echo $vars['url']; ?>mod/help/index.php" class="help">Help</a>
	<?php
	}

	if(is_plugin_enabled('shared_access')){
	?>
		<a href="<?php echo $vars['url']; ?>pg/shared_access/home" class="shared_access"><?php echo elgg_echo('shared_access:shared_access'); ?></a>
	<?php
	}
	?>

</div>
</div>
<?php
	}
?>