nav channel selection
This commit is contained in:
parent
d9ff121930
commit
b522ab13cb
@ -31,6 +31,9 @@ function get_features() {
|
||||
// prettyphoto has licensing issues and will no longer be provided in core -
|
||||
// in any event this setting should probably be a theme option or plugin
|
||||
// array('prettyphoto', t('Enhanced Photo Albums'), t('Enable photo album with enhanced features')),
|
||||
array('nav_channel_select', t('Navigation Channel Select'), t('Change channels directly from within the navigation dropdown menu')),
|
||||
|
||||
|
||||
//FIXME - needs a description, but how the hell do we explain this to normals?
|
||||
array('sendzid', t('Extended Identity Sharing'), t('Share your identity with all websites on the internet. When disabled, identity is only shared with sites in the matrix.')),
|
||||
array('expert', t('Expert Mode'), t('Enable Expert Mode to provide advanced configuration options')),
|
||||
|
@ -38,6 +38,14 @@ EOT;
|
||||
intval($channel['channel_id'])
|
||||
);
|
||||
|
||||
$chans = q("select channel_name, channel_id from channel where channel_account_id = %d and not ( channel_pageflags & %d ) order by channel_name ",
|
||||
intval(get_account_id()),
|
||||
intval(PAGE_REMOVED)
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
elseif(remote_user())
|
||||
$observer = $a->get_observer();
|
||||
@ -78,6 +86,11 @@ EOT;
|
||||
$userinfo = null;
|
||||
|
||||
if(local_user()) {
|
||||
|
||||
|
||||
if($chans && count($chans) > 1 && feature_enabled(local_user(),'nav_channel_select'))
|
||||
$nav['channels'] = $chans;
|
||||
|
||||
$nav['logout'] = Array('logout',t('Logout'), "", t('End this session'));
|
||||
|
||||
// user menu
|
||||
@ -193,7 +206,7 @@ EOT;
|
||||
$nav['all_events']['all']=array('events', t('See all events'), "", "");
|
||||
$nav['all_events']['mark'] = array('', t('Mark all events seen'), '','');
|
||||
|
||||
$nav['manage'] = array('manage', t('Channel Select'), "", t('Manage Your Channels'));
|
||||
$nav['manage'] = array('manage', t('Channel Manager'), "", t('Manage Your Channels'));
|
||||
|
||||
$nav['settings'] = array('settings', t('Settings'),"", t('Account/Channel Settings'));
|
||||
|
||||
|
@ -1 +1 @@
|
||||
2014-08-17.770
|
||||
2014-08-18.771
|
||||
|
@ -177,6 +177,8 @@ nav #banner #logo-text a {
|
||||
}
|
||||
nav #banner #logo-text a:hover { text-decoration: none; }
|
||||
|
||||
.nav-channel-select { margin-left: 8px; }
|
||||
|
||||
header #banner {
|
||||
/* overflow: hidden; */
|
||||
text-align: center;
|
||||
|
@ -20,8 +20,13 @@
|
||||
{{/foreach}}
|
||||
<li role="presentation" class="divider"></li>
|
||||
{{if $nav.profiles}}<li role="presentation"><a href="{{$nav.profiles.0}}" title="{{$nav.profiles.3}}" role="menuitem">{{$nav.profiles.1}}</a></li>{{/if}}
|
||||
{{if $nav.manage}}<li role="presentation"><a href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem">{{$nav.manage.1}}</a></li>{{/if}}
|
||||
{{if $nav.settings}}<li role="presentation"><a href="{{$nav.settings.0}}" title="{{$nav.settings.3}}" role="menuitem">{{$nav.settings.1}}</a></li>{{/if}}
|
||||
{{if $nav.manage}}<li role="presentation"><a href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem">{{$nav.manage.1}}</a></li>{{/if}}
|
||||
{{if $nav.channels}}
|
||||
{{foreach $nav.channels as $chan}}
|
||||
<li role="presentation" class="nav-channel-select"><a href="manage/{{$chan.channel_id}}" title="{{$chan.channel_name}}" role="menuitem">{{$chan.channel_name}}</a></li>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if $nav.admin}}
|
||||
<li role="presentation" class="divider"></li>
|
||||
<li role="presentation"><a href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" role="menuitem">{{$nav.admin.1}}</a></li>
|
||||
|
Reference in New Issue
Block a user