aboutsummaryrefslogtreecommitdiff
path: root/views/default/navigation/topbar_tools.php
blob: 2e48a4a85bae86c218d0d9847cbe4e03e80e2d17 (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
<?php
/**
 * Elgg standard tools drop down
 * This will be populated depending on the plugins active - only plugin navigation will appear here
 *
 * @package Elgg
 * @subpackage Core
 * @author Curverider Ltd
 * @link http://elgg.org/
 *
 */
$menu = $vars['config']->menu_items['toolbar'];

if (is_array($menu) && sizeof($menu) > 0) {
	$alphamenu = array();
	foreach($menu as $item) {
		$alphamenu[$item->name] = $item;
	}
	ksort($alphamenu);

?>

<ul class="tools_menu">
	<li class="menu"><a href="#" class="tools"><?php echo(elgg_echo('tools')); ?></a>
	<ul>
	<?php
		foreach($alphamenu as $item) {
			echo "<li><a href=\"{$item->value->url}\">" . $item->name . "</a></li>";
		}
	?>
	</ul>
	</li>
</ul>

<script type="text/javascript">
$(function() {
	$('ul.tools_menu').elgg_dropdownmenu();
});
</script>

<?php
}