add icon, name and thumb to profile tabs. remove login app - we have login in the panel now.
This commit is contained in:
parent
42fbc28b11
commit
546867c102
@ -1,5 +0,0 @@
|
|||||||
version: 1
|
|
||||||
url: $baseurl/login
|
|
||||||
requires: nologin
|
|
||||||
name: Login
|
|
||||||
photo: icon:sign-in
|
|
@ -1775,6 +1775,9 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
if (App::$is_sys)
|
if (App::$is_sys)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (get_pconfig($uid, 'system', 'noprofiletabs'))
|
||||||
|
return;
|
||||||
|
|
||||||
$channel = App::get_channel();
|
$channel = App::get_channel();
|
||||||
|
|
||||||
if (is_null($nickname))
|
if (is_null($nickname))
|
||||||
@ -1809,9 +1812,6 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
|
|
||||||
$has_webpages = (($r) ? true : false);
|
$has_webpages = (($r) ? true : false);
|
||||||
|
|
||||||
if (get_pconfig($uid, 'system', 'noprofiletabs'))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (x($_GET, 'tab'))
|
if (x($_GET, 'tab'))
|
||||||
$tab = notags(trim($_GET['tab']));
|
$tab = notags(trim($_GET['tab']));
|
||||||
|
|
||||||
@ -1825,6 +1825,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
'sel' => ((argv(0) == 'channel') ? 'active' : ''),
|
'sel' => ((argv(0) == 'channel') ? 'active' : ''),
|
||||||
'title' => t('Status Messages and Posts'),
|
'title' => t('Status Messages and Posts'),
|
||||||
'id' => 'status-tab',
|
'id' => 'status-tab',
|
||||||
|
'icon' => 'home'
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1837,6 +1838,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
'sel' => ((argv(0) == 'profile') ? 'active' : ''),
|
'sel' => ((argv(0) == 'profile') ? 'active' : ''),
|
||||||
'title' => t('Profile Details'),
|
'title' => t('Profile Details'),
|
||||||
'id' => 'profile-tab',
|
'id' => 'profile-tab',
|
||||||
|
'icon' => 'user'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($p['view_storage']) {
|
if ($p['view_storage']) {
|
||||||
@ -1846,6 +1848,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
'sel' => ((argv(0) == 'photos') ? 'active' : ''),
|
'sel' => ((argv(0) == 'photos') ? 'active' : ''),
|
||||||
'title' => t('Photo Albums'),
|
'title' => t('Photo Albums'),
|
||||||
'id' => 'photo-tab',
|
'id' => 'photo-tab',
|
||||||
|
'icon' => 'photo'
|
||||||
);
|
);
|
||||||
$tabs[] = array(
|
$tabs[] = array(
|
||||||
'label' => t('Files'),
|
'label' => t('Files'),
|
||||||
@ -1853,6 +1856,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
'sel' => ((argv(0) == 'cloud' || argv(0) == 'sharedwithme') ? 'active' : ''),
|
'sel' => ((argv(0) == 'cloud' || argv(0) == 'sharedwithme') ? 'active' : ''),
|
||||||
'title' => t('Files and Storage'),
|
'title' => t('Files and Storage'),
|
||||||
'id' => 'files-tab',
|
'id' => 'files-tab',
|
||||||
|
'icon' => 'folder-open'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1863,6 +1867,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
'sel' => ((argv(0) == 'cal' || argv(0) == 'events') ? 'active' : ''),
|
'sel' => ((argv(0) == 'cal' || argv(0) == 'events') ? 'active' : ''),
|
||||||
'title' => t('Events'),
|
'title' => t('Events'),
|
||||||
'id' => 'event-tab',
|
'id' => 'event-tab',
|
||||||
|
'icon' => 'calendar'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1876,6 +1881,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
'sel' => ((argv(0) == 'chat') ? 'active' : '' ),
|
'sel' => ((argv(0) == 'chat') ? 'active' : '' ),
|
||||||
'title' => t('Chatrooms'),
|
'title' => t('Chatrooms'),
|
||||||
'id' => 'chat-tab',
|
'id' => 'chat-tab',
|
||||||
|
'icon' => 'comments-o'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1889,6 +1895,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
'sel' => ((argv(0) == 'bookmarks') ? 'active' : ''),
|
'sel' => ((argv(0) == 'bookmarks') ? 'active' : ''),
|
||||||
'title' => t('Saved Bookmarks'),
|
'title' => t('Saved Bookmarks'),
|
||||||
'id' => 'bookmarks-tab',
|
'id' => 'bookmarks-tab',
|
||||||
|
'icon' => 'bookmark'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1899,10 +1906,12 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
'sel' => ((argv(0) == 'webpages') ? 'active' : ''),
|
'sel' => ((argv(0) == 'webpages') ? 'active' : ''),
|
||||||
'title' => t('View Webpages'),
|
'title' => t('View Webpages'),
|
||||||
'id' => 'webpages-tab',
|
'id' => 'webpages-tab',
|
||||||
|
'icon' => 'newspaper-o'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($p['view_wiki']) {
|
||||||
if(feature_enabled($uid,'wiki') && (get_account_techlevel($account_id) > 3)) {
|
if(feature_enabled($uid,'wiki') && (get_account_techlevel($account_id) > 3)) {
|
||||||
$tabs[] = array(
|
$tabs[] = array(
|
||||||
'label' => t('Wikis'),
|
'label' => t('Wikis'),
|
||||||
@ -1910,16 +1919,21 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
'sel' => ((argv(0) == 'wiki') ? 'active' : ''),
|
'sel' => ((argv(0) == 'wiki') ? 'active' : ''),
|
||||||
'title' => t('Wiki'),
|
'title' => t('Wiki'),
|
||||||
'id' => 'wiki-tab',
|
'id' => 'wiki-tab',
|
||||||
|
'icon' => 'pencil-square-o'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs);
|
$arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs);
|
||||||
call_hooks('profile_tabs', $arr);
|
call_hooks('profile_tabs', $arr);
|
||||||
|
|
||||||
$tpl = get_markup_template('profile_tabs.tpl');
|
$tpl = get_markup_template('profile_tabs.tpl');
|
||||||
|
|
||||||
return replace_macros($tpl,array('$tabs' => $arr['tabs']));
|
return replace_macros($tpl, array(
|
||||||
|
'$tabs' => $arr['tabs'],
|
||||||
|
'$name' => App::$profile['channel_name'],
|
||||||
|
'$thumb' => App::$profile['thumb']
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
|
<div class="dropdown-header"><img src="{{$thumb}}" class="menu-img-1">{{$name}}:</div>
|
||||||
{{foreach $tabs as $tab}}
|
{{foreach $tabs as $tab}}
|
||||||
<a class="dropdown-item{{if $tab.sel}} {{$tab.sel}}{{/if}}" href="{{$tab.url}}"{{if $tab.title}} title="{{$tab.title}}"{{/if}}>{{$tab.label}}</a>
|
<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}}"></i> {{$tab.label}}</a>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
|
Reference in New Issue
Block a user