Apps popup menu in navbar
This commit is contained in:
parent
71d44d78ec
commit
5ce6f893a6
2 changed files with 8 additions and 2 deletions
|
@ -81,7 +81,7 @@ function nav(&$a) {
|
||||||
if(! get_config('system','hide_help'))
|
if(! get_config('system','hide_help'))
|
||||||
$nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'));
|
$nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'));
|
||||||
|
|
||||||
if($a->apps)
|
if(count($a->apps)>0)
|
||||||
$nav['apps'] = array('apps', t('Apps'), "", t('Addon applications, utilities, games'));
|
$nav['apps'] = array('apps', t('Apps'), "", t('Addon applications, utilities, games'));
|
||||||
|
|
||||||
$nav['search'] = array('search', t('Search'), "", t('Search site content'));
|
$nav['search'] = array('search', t('Search'), "", t('Search site content'));
|
||||||
|
@ -158,6 +158,7 @@ function nav(&$a) {
|
||||||
'$emptynotifications' => t('Nothing new here'),
|
'$emptynotifications' => t('Nothing new here'),
|
||||||
'$userinfo' => $userinfo,
|
'$userinfo' => $userinfo,
|
||||||
'$sel' => $a->nav_sel,
|
'$sel' => $a->nav_sel,
|
||||||
|
'$apps' => $a->apps,
|
||||||
));
|
));
|
||||||
|
|
||||||
call_hooks('page_header', $a->page['nav']);
|
call_hooks('page_header', $a->page['nav']);
|
||||||
|
|
|
@ -81,7 +81,12 @@
|
||||||
|
|
||||||
{{ if $nav.apps }}
|
{{ if $nav.apps }}
|
||||||
<li id="nav-apps-link" class="nav-menu $sel.apps">
|
<li id="nav-apps-link" class="nav-menu $sel.apps">
|
||||||
<a class=" $nav.apps.2" href="$nav.apps.0" title="$nav.apps.3" >$nav.apps.1</a>
|
<a class=" $nav.apps.2" href="#" rel="#nav-apps-menu" title="$nav.apps.3" >$nav.apps.1</a>
|
||||||
|
<ul id="nav-apps-menu" class="menu-popup">
|
||||||
|
{{ for $apps as $ap }}
|
||||||
|
<li><a href="$ap.url">$ap.name</a></li>
|
||||||
|
{{ endfor }}
|
||||||
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{{ endif }}
|
{{ endif }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in a new issue