diff options
Diffstat (limited to 'app/Template/user/sidebar.php')
-rw-r--r-- | app/Template/user/sidebar.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php index 011994b9..7756126e 100644 --- a/app/Template/user/sidebar.php +++ b/app/Template/user/sidebar.php @@ -1,7 +1,7 @@ <div class="sidebar"> <h2><?= t('Information') ?></h2> <ul> - <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'show' ? 'class="active"' : '' ?>> + <li <?= $this->app->checkMenuSelection('user', 'show') ?>> <?= $this->url->link(t('Summary'), 'user', 'show', array('user_id' => $user['id'])) ?> </li> <?php if ($this->user->isAdmin()): ?> @@ -10,13 +10,13 @@ </li> <?php endif ?> <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?> - <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'timesheet' ? 'class="active"' : '' ?>> + <li <?= $this->app->checkMenuSelection('user', 'timesheet') ?>> <?= $this->url->link(t('Time tracking'), 'user', 'timesheet', array('user_id' => $user['id'])) ?> </li> - <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'last' ? 'class="active"' : '' ?>> + <li <?= $this->app->checkMenuSelection('user', 'last') ?>> <?= $this->url->link(t('Last logins'), 'user', 'last', array('user_id' => $user['id'])) ?> </li> - <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'sessions' ? 'class="active"' : '' ?>> + <li <?= $this->app->checkMenuSelection('user', 'sessions') ?>> <?= $this->url->link(t('Persistent connections'), 'user', 'sessions', array('user_id' => $user['id'])) ?> </li> <?php endif ?> @@ -27,42 +27,42 @@ <h2><?= t('Actions') ?></h2> <ul> <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?> - <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'edit' ? 'class="active"' : '' ?>> + <li <?= $this->app->checkMenuSelection('user', 'edit') ?>> <?= $this->url->link(t('Edit profile'), 'user', 'edit', array('user_id' => $user['id'])) ?> </li> <?php if ($user['is_ldap_user'] == 0): ?> - <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'password' ? 'class="active"' : '' ?>> + <li <?= $this->app->checkMenuSelection('user', 'password') ?>> <?= $this->url->link(t('Change password'), 'user', 'password', array('user_id' => $user['id'])) ?> </li> <?php endif ?> <?php if ($this->user->isCurrentUser($user['id'])): ?> - <li <?= $this->app->getRouterController() === 'twofactor' && $this->app->getRouterAction() === 'index' ? 'class="active"' : '' ?>> + <li <?= $this->app->checkMenuSelection('twofactor', 'index') ?>> <?= $this->url->link(t('Two factor authentication'), 'twofactor', 'index', array('user_id' => $user['id'])) ?> </li> <?php elseif ($this->user->hasAccess('twofactor', 'disable') && $user['twofactor_activated'] == 1): ?> - <li <?= $this->app->getRouterController() === 'twofactor' && $this->app->getRouterAction() === 'disable' ? 'class="active"' : '' ?>> + <li <?= $this->app->checkMenuSelection('twofactor', 'disable') ?>> <?= $this->url->link(t('Two factor authentication'), 'twofactor', 'disable', array('user_id' => $user['id'])) ?> </li> <?php endif ?> - <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'share' ? 'class="active"' : '' ?>> + <li <?= $this->app->checkMenuSelection('user', 'share') ?>> <?= $this->url->link(t('Public access'), 'user', 'share', array('user_id' => $user['id'])) ?> </li> - <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'notifications' ? 'class="active"' : '' ?>> + <li <?= $this->app->checkMenuSelection('user', 'notifications') ?>> <?= $this->url->link(t('Notifications'), 'user', 'notifications', array('user_id' => $user['id'])) ?> </li> - <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'external' ? 'class="active"' : '' ?>> + <li <?= $this->app->checkMenuSelection('user', 'external') ?>> <?= $this->url->link(t('External accounts'), 'user', 'external', array('user_id' => $user['id'])) ?> </li> - <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'integrations' ? 'class="active"' : '' ?>> + <li <?= $this->app->checkMenuSelection('user', 'integrations') ?>> <?= $this->url->link(t('Integrations'), 'user', 'integrations', array('user_id' => $user['id'])) ?> </li> <?php endif ?> <?php if ($this->user->hasAccess('user', 'authentication')): ?> - <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'authentication' ? 'class="active"' : '' ?>> + <li <?= $this->app->checkMenuSelection('user', 'authentication') ?>> <?= $this->url->link(t('Edit Authentication'), 'user', 'authentication', array('user_id' => $user['id'])) ?> </li> <?php endif ?> @@ -70,7 +70,7 @@ <?= $this->hook->render('template:user:sidebar:actions', array('user' => $user)) ?> <?php if ($this->user->hasAccess('user', 'remove') && ! $this->user->isCurrentUser($user['id'])): ?> - <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'remove' ? 'class="active"' : '' ?>> + <li <?= $this->app->checkMenuSelection('user', 'remove') ?>> <?= $this->url->link(t('Remove'), 'user', 'remove', array('user_id' => $user['id'])) ?> </li> <?php endif ?> |