diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-08-31 16:18:03 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-08-31 16:18:03 +0200 |
commit | 5ce6f893a64984eae9685db305b8d29ae3ced509 (patch) | |
tree | 6de789793cba03e7241caf164e8ad80c785a85b0 | |
parent | 71d44d78ec5b16a53b82f4e631b86cd8247a9b0f (diff) | |
download | volse-hubzilla-5ce6f893a64984eae9685db305b8d29ae3ced509.tar.gz volse-hubzilla-5ce6f893a64984eae9685db305b8d29ae3ced509.tar.bz2 volse-hubzilla-5ce6f893a64984eae9685db305b8d29ae3ced509.zip |
Apps popup menu in navbar
-rw-r--r-- | include/nav.php | 3 | ||||
-rw-r--r-- | view/nav.tpl | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/include/nav.php b/include/nav.php index f9e72bda7..b290a8da2 100644 --- a/include/nav.php +++ b/include/nav.php @@ -81,7 +81,7 @@ function nav(&$a) { if(! get_config('system','hide_help')) $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['search'] = array('search', t('Search'), "", t('Search site content')); @@ -158,6 +158,7 @@ function nav(&$a) { '$emptynotifications' => t('Nothing new here'), '$userinfo' => $userinfo, '$sel' => $a->nav_sel, + '$apps' => $a->apps, )); call_hooks('page_header', $a->page['nav']); diff --git a/view/nav.tpl b/view/nav.tpl index 434c9f844..cf1c2a227 100644 --- a/view/nav.tpl +++ b/view/nav.tpl @@ -81,7 +81,12 @@ {{ if $nav.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> {{ endif }} </ul> |