Experimental alternate channel_menu navigation. To use, "util/config system.channel_menu 1"

This commit is contained in:
zotlabs 2017-10-05 16:59:33 -07:00
parent 4ab21edba8
commit a0eb628526
4 changed files with 19 additions and 5 deletions

View File

@ -1373,7 +1373,6 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $zcard = fa
? trim(substr($profile['channel_name'],0,strpos($profile['channel_name'],' '))) : $profile['channel_name']);
$lastname = (($firstname === $profile['channel_name']) ? '' : trim(substr($profile['channel_name'],strlen($firstname))));
// @fixme move this to the diaspora plugin itself
$contact_block = contact_block();

View File

@ -280,6 +280,8 @@ EOT;
'$help' => t('@name, #tag, ?doc, content'),
'$pleasewait' => t('Please wait...'),
'$nav_apps' => $nav_apps,
'$channel_menu' => get_config('system','channel_menu'),
'$channel_thumb' => ((App::$profile) ? App::$profile['thumb'] : ''),
'$channel_apps' => $channel_apps,
'$addapps' => t('Add Apps'),
'$orderapps' => t('Arrange Apps'),
@ -481,7 +483,8 @@ function channel_apps($is_owner = false, $nickname = null) {
[
'$tabs' => $arr['tabs'],
'$name' => App::$profile['channel_name'],
'$thumb' => App::$profile['thumb']
'$thumb' => App::$profile['thumb'],
'$channel_menu' => get_config('system','channel_menu')
]
);
}

View File

@ -218,10 +218,20 @@
<a class="nav-link {{$nav.help.2}}" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" id="{{$nav.help.4}}" onclick="contextualHelp(); return false;"><i class="fa fa-fw fa-question-circle"></i></a>
</li>
{{/if}}
{{if $channel_menu && $channel_apps.0}}
<li class="nav-item dropdown" id="channel-menu">
<a class="nav-link" href="#" data-toggle="dropdown"><img src="{{$channel_thumb}}" style="height:14px; width:14px;position:relative; top:-2px;" /></a>
<div id="dropdown-menu" class="dropdown-menu dropdown-menu-right">
{{foreach $channel_apps as $channel_app}}
{{$channel_app}}
{{/foreach}}
</div>
</li>
{{/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 id="dropdown-menu" class="dropdown-menu dropdown-menu-right">
{{if $channel_apps.0}}
{{if $channel_apps.0 && ! $channel_menu}}
{{foreach $channel_apps as $channel_app}}
{{$channel_app}}
{{/foreach}}
@ -233,7 +243,7 @@
{{foreach $nav_apps as $nav_app}}
{{$nav_app}}
{{/foreach}}
{{if $channel_apps.0}}
{{if $channel_apps.0 && ! $channel_menu}}
</div>
{{/if}}
{{if $is_owner}}

View File

@ -1,5 +1,7 @@
<div class="dropdown-header"><img src="{{$thumb}}" class="menu-img-1">{{$name}}:</div>
<div class="dropdown-header"><img src="{{$thumb}}" class="menu-img-1">{{$name}}</div>
{{foreach $tabs as $tab}}
<a class="dropdown-item{{if $tab.sel}} {{$tab.sel}}{{/if}}" href="{{$tab.url}}"{{if $tab.title}} title="{{$tab.title}}"{{/if}}><i class="fa fa-fw fa-{{$tab.icon}} generic-icons-nav"></i>{{$tab.label}}</a>
{{/foreach}}
{{if ! $channel_menu}}
<div class="dropdown-divider"></div>
{{/if}}