diff options
author | git-marijus <mario@mariovavti.com> | 2017-07-21 10:32:21 +0200 |
---|---|---|
committer | git-marijus <mario@mariovavti.com> | 2017-07-21 10:32:21 +0200 |
commit | 1bdcfe5219c810758ae255427513a7a0c09ce8e1 (patch) | |
tree | 62affdc8e8776109c76e80954021146b9c9fb59a /include/nav.php | |
parent | 8e5c56dcc2e38884f897acaf9d2b39e5b5dd8c29 (diff) | |
download | volse-hubzilla-1bdcfe5219c810758ae255427513a7a0c09ce8e1.tar.gz volse-hubzilla-1bdcfe5219c810758ae255427513a7a0c09ce8e1.tar.bz2 volse-hubzilla-1bdcfe5219c810758ae255427513a7a0c09ce8e1.zip |
provide a mechanism to mark apps active in the bin
Diffstat (limited to 'include/nav.php')
-rw-r--r-- | include/nav.php | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/include/nav.php b/include/nav.php index b0533e4c7..f6c8aa23f 100644 --- a/include/nav.php +++ b/include/nav.php @@ -101,12 +101,12 @@ EOT; $nav['logout'] = ['logout',t('Logout'), "", t('End this session'),'logout_nav_btn']; // user menu - $nav['usermenu'][] = ['profile/' . $channel['channel_address'], t('View Profile'), "", t('Your profile page'),'profile_nav_btn']; + $nav['usermenu'][] = ['profile/' . $channel['channel_address'], t('View Profile'), ((\App::$nav_sel['active'] == 'Profile') ? 'active' : ''), t('Your profile page'),'profile_nav_btn']; if(feature_enabled(local_channel(),'multi_profiles')) - $nav['usermenu'][] = ['profiles', t('Edit Profiles'),"", t('Manage/Edit profiles'),'profiles_nav_btn']; + $nav['usermenu'][] = ['profiles', t('Edit Profiles'), ((\App::$nav_sel['active'] == 'Profiles') ? 'active' : '') , t('Manage/Edit profiles'),'profiles_nav_btn']; else - $nav['usermenu'][] = ['profiles/' . $prof[0]['id'], t('Edit Profile'),"", t('Edit your profile'),'profiles_nav_btn']; + $nav['usermenu'][] = ['profiles/' . $prof[0]['id'], t('Edit Profile'), ((\App::$nav_sel['active'] == 'Profiles') ? 'active' : ''), t('Edit your profile'),'profiles_nav_btn']; } else { @@ -290,21 +290,7 @@ EOT; * */ function nav_set_selected($item){ - App::$nav_sel = array( - 'community' => null, - 'network' => null, - 'home' => null, - 'profiles' => null, - 'intros' => null, - 'notifications' => null, - 'messages' => null, - 'directory' => null, - 'settings' => null, - 'contacts' => null, - 'manage' => null, - 'register' => null, - ); - App::$nav_sel[$item] = 'active'; + App::$nav_sel['active'] = $item; } |