unclutter menues a little
This commit is contained in:
parent
9ac236d57d
commit
b9256eed30
@ -1517,25 +1517,18 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
|
|||||||
|
|
||||||
require_once('include/chat.php');
|
require_once('include/chat.php');
|
||||||
$chats = chatroom_list($uid);
|
$chats = chatroom_list($uid);
|
||||||
$subdued = ((count($chats)) ? '' : ' subdued');
|
if (count($chats)) {
|
||||||
$tabs[] = array(
|
$tabs[] = array(
|
||||||
'label' => t('Chatrooms'),
|
'label' => t('Chatrooms'),
|
||||||
'url' => $a->get_baseurl() . '/chat/' . $nickname,
|
'url' => $a->get_baseurl() . '/chat/' . $nickname,
|
||||||
'sel' => ((argv(0) == 'chat') ? 'active' . $subdued : '' . $subdued),
|
'sel' => ((argv(0) == 'chat') ? 'active' : '' ),
|
||||||
'title' => t('Chatrooms'),
|
'title' => t('Chatrooms'),
|
||||||
'id' => 'chat-tab',
|
'id' => 'chat-tab',
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if($is_owner) {
|
if($is_owner) {
|
||||||
$tabs[] = array(
|
|
||||||
'label' => t('Events'),
|
|
||||||
'url' => $a->get_baseurl() . '/events',
|
|
||||||
'sel' => ((argv(0) == 'events') ? 'active' : ''),
|
|
||||||
'title' => t('Events and Calendar'),
|
|
||||||
'id' => 'events-tab',
|
|
||||||
);
|
|
||||||
|
|
||||||
$tabs[] = array(
|
$tabs[] = array(
|
||||||
'label' => t('Bookmarks'),
|
'label' => t('Bookmarks'),
|
||||||
'url' => $a->get_baseurl() . '/bookmarks',
|
'url' => $a->get_baseurl() . '/bookmarks',
|
||||||
|
@ -73,6 +73,8 @@ EOT;
|
|||||||
$nav['usermenu']=array();
|
$nav['usermenu']=array();
|
||||||
$userinfo = null;
|
$userinfo = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(local_user()) {
|
if(local_user()) {
|
||||||
$nav['logout'] = Array('logout',t('Logout'), "", t('End this session'));
|
$nav['logout'] = Array('logout',t('Logout'), "", t('End this session'));
|
||||||
|
|
||||||
@ -83,8 +85,13 @@ EOT;
|
|||||||
$nav['usermenu'][] = Array('profiles', t('Edit Profiles'),"", t('Manage/Edit profiles'));
|
$nav['usermenu'][] = Array('profiles', t('Edit Profiles'),"", t('Manage/Edit profiles'));
|
||||||
$nav['usermenu'][] = Array('photos/' . $channel['channel_address'], t('Photos'), "", t('Your photos'));
|
$nav['usermenu'][] = Array('photos/' . $channel['channel_address'], t('Photos'), "", t('Your photos'));
|
||||||
$nav['usermenu'][] = Array('cloud/' . $channel['channel_address'],t('Files'),"",t('Your files'));
|
$nav['usermenu'][] = Array('cloud/' . $channel['channel_address'],t('Files'),"",t('Your files'));
|
||||||
|
|
||||||
|
require_once('include/chat.php');
|
||||||
|
$chats = chatroom_list(local_user());
|
||||||
|
if (count($chats)) {
|
||||||
$nav['usermenu'][] = Array('chat/' . $channel['channel_address'],t('Chat'),"",t('Your chatrooms'));
|
$nav['usermenu'][] = Array('chat/' . $channel['channel_address'],t('Chat'),"",t('Your chatrooms'));
|
||||||
$nav['usermenu'][] = Array('events', t('Events'), "", t('Your events'));
|
}
|
||||||
|
|
||||||
$nav['usermenu'][] = Array('bookmarks', t('Bookmarks'), "", t('Your bookmarks'));
|
$nav['usermenu'][] = Array('bookmarks', t('Bookmarks'), "", t('Your bookmarks'));
|
||||||
if(feature_enabled($channel['channel_id'],'webpages'))
|
if(feature_enabled($channel['channel_id'],'webpages'))
|
||||||
$nav['usermenu'][] = Array('webpages/' . $channel['channel_address'],t('Webpages'),"",t('Your webpages'));
|
$nav['usermenu'][] = Array('webpages/' . $channel['channel_address'],t('Webpages'),"",t('Your webpages'));
|
||||||
@ -185,7 +192,6 @@ EOT;
|
|||||||
|
|
||||||
$nav['settings'] = array('settings', t('Settings'),"", t('Account/Channel Settings'));
|
$nav['settings'] = array('settings', t('Settings'),"", t('Account/Channel Settings'));
|
||||||
|
|
||||||
$nav['contacts'] = array('connections', t('Connections'),"", t('Manage/Edit Friends and Connections'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,11 +18,14 @@
|
|||||||
{{foreach $nav.usermenu as $usermenu}}
|
{{foreach $nav.usermenu as $usermenu}}
|
||||||
<li role="presentation"><a href="{{$usermenu.0}}" title="{{$usermenu.3}}" role="menuitem">{{$usermenu.1}}</a></li>
|
<li role="presentation"><a href="{{$usermenu.0}}" title="{{$usermenu.3}}" role="menuitem">{{$usermenu.1}}</a></li>
|
||||||
{{/foreach}}
|
{{/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.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.manage}}<li role="presentation"><a href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem">{{$nav.manage.1}}</a></li>{{/if}}
|
||||||
{{if $nav.contacts}}<li role="presentation"><a href="{{$nav.contacts.0}}" title="{{$nav.contacts.3}}" role="menuitem">{{$nav.contacts.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.settings}}<li role="presentation"><a href="{{$nav.settings.0}}" title="{{$nav.settings.3}}" role="menuitem">{{$nav.settings.1}}</a></li>{{/if}}
|
||||||
{{if $nav.admin}}<li role="presentation"><a href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" role="menuitem">{{$nav.admin.1}}</a></li>{{/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>
|
||||||
|
{{/if}}
|
||||||
{{if $nav.logout}}
|
{{if $nav.logout}}
|
||||||
<li role="presentation" class="divider"></li>
|
<li role="presentation" class="divider"></li>
|
||||||
<li role="presentation"><a href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" role="menuitem">{{$nav.logout.1}}</a></li>
|
<li role="presentation"><a href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" role="menuitem">{{$nav.logout.1}}</a></li>
|
||||||
|
Reference in New Issue
Block a user