diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-05-05 16:32:20 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-05-05 16:32:20 +0200 |
commit | 00b19ccee0db5fd628c4959ac665234395a92989 (patch) | |
tree | 0542c60499024e6b8a8d0f53f7a7062960506c16 /view/tpl/nav.tpl | |
parent | 54d55fb62fd9a69c77ce9313ccec432faa8395e7 (diff) | |
download | volse-hubzilla-00b19ccee0db5fd628c4959ac665234395a92989.tar.gz volse-hubzilla-00b19ccee0db5fd628c4959ac665234395a92989.tar.bz2 volse-hubzilla-00b19ccee0db5fd628c4959ac665234395a92989.zip |
collapse sysapps if viewing a remote channel
Diffstat (limited to 'view/tpl/nav.tpl')
-rwxr-xr-x | view/tpl/nav.tpl | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl index c5b378b4f..5c301b4d2 100755 --- a/view/tpl/nav.tpl +++ b/view/tpl/nav.tpl @@ -188,10 +188,22 @@ {{/if}} <li class="nav-item dropdown" id="app-menu"> <a class="nav-link" href="#" data-toggle="dropdown"><i class="fa fa-fw fa-bars"></i></a> - <div class="dropdown-menu dropdown-menu-right"> - {{foreach $navapps as $navapp}} - {{$navapp}} + <div id="dropdown-menu" class="dropdown-menu dropdown-menu-right"> + {{if $channel_apps.0}} + {{foreach $channel_apps as $channel_app}} + {{$channel_app}} {{/foreach}} + <div class="dropdown-header sys-apps-toggle" onclick="$('#dropdown-menu').click(function(e) { e.stopPropagation(); }); openClose('sys_apps');"> + {{$sysapps_toggle}} + </div> + <div id="sys_apps" style="display:none;"> + {{/if}} + {{foreach $nav_apps as $nav_app}} + {{$nav_app}} + {{/foreach}} + {{if $channel_apps.0}} + </div> + {{/if}} {{if $localuser}} <div class="dropdown-divider"></div> <a class="dropdown-item" href="/apps"><i class="generic-icons-nav fa fa-fw fa-plus-circle"></i>{{$addapps}}</a> @@ -202,9 +214,21 @@ </div> <div class="collapse d-md-none" id="navbar-collapse-2"> <div class="navbar-nav mr-auto"> - {{foreach $navapps as $navapp}} - {{$navapp|replace:'dropdown-item':'nav-link'}} + {{if $channel_apps.0}} + {{foreach $channel_apps as $channel_app}} + {{$channel_app|replace:'dropdown-item':'nav-link'}} {{/foreach}} + <div class="dropdown-header sys-apps-toggle" onclick="openClose('sys-apps-collapsed');"> + {{$sysapps_toggle}} + </div> + <div id="sys-apps-collapsed" style="display:none;"> + {{/if}} + {{foreach $nav_apps as $nav_app}} + {{$nav_app|replace:'dropdown-item':'nav-link'}} + {{/foreach}} + {{if $channel_apps.0}} + </div> + {{/if}} {{if $localuser}} <div class="dropdown-divider"></div> <a class="nav-link" href="/apps"><i class="generic-icons-nav fa fa-fw fa-plus-circle"></i>{{$addapps}}</a> |