diff options
Diffstat (limited to 'app/Template/user/sidebar.php')
-rw-r--r-- | app/Template/user/sidebar.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php index 213b3209..cd1c85c1 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> + <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'show' ? 'class="active"' : '' ?>> <?= $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> + <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'timesheet' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Time tracking'), 'user', 'timesheet', array('user_id' => $user['id'])) ?> </li> - <li> + <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'last' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Last logins'), 'user', 'last', array('user_id' => $user['id'])) ?> </li> - <li> + <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'sessions' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Persistent connections'), 'user', 'sessions', array('user_id' => $user['id'])) ?> </li> <?php endif ?> @@ -25,51 +25,51 @@ <h2><?= t('Actions') ?></h2> <ul> <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?> - <li> + <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'edit' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Edit profile'), 'user', 'edit', array('user_id' => $user['id'])) ?> </li> <?php if ($user['is_ldap_user'] == 0): ?> - <li> + <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'password' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Change password'), 'user', 'password', array('user_id' => $user['id'])) ?> </li> <?php endif ?> <?php if ($this->user->isCurrentUser($user['id'])): ?> - <li> + <li <?= $this->app->getRouterController() === 'twofactor' && $this->app->getRouterAction() === 'index' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Two factor authentication'), 'twofactor', 'index', array('user_id' => $user['id'])) ?> </li> <?php elseif ($this->user->isAdmin() && $user['twofactor_activated'] == 1): ?> - <li> + <li <?= $this->app->getRouterController() === 'twofactor' && $this->app->getRouterAction() === 'disable' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Two factor authentication'), 'twofactor', 'disable', array('user_id' => $user['id'])) ?> </li> <?php endif ?> - <li> + <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'share' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Public access'), 'user', 'share', array('user_id' => $user['id'])) ?> </li> - <li> + <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'notifications' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Email notifications'), 'user', 'notifications', array('user_id' => $user['id'])) ?> </li> - <li> + <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'external' ? 'class="active"' : '' ?>> <?= $this->url->link(t('External accounts'), 'user', 'external', array('user_id' => $user['id'])) ?> </li> <?php endif ?> <?php if ($this->user->isAdmin()): ?> - <li> + <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'authentication' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Edit Authentication'), 'user', 'authentication', array('user_id' => $user['id'])) ?> </li> - <li> + <li <?= $this->app->getRouterController() === 'hourlyrate' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Hourly rates'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?> </li> - <li> + <li <?= $this->app->getRouterController() === 'timetable' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Manage timetable'), 'timetable', 'index', array('user_id' => $user['id'])) ?> </li> <?php endif ?> <?php if ($this->user->isAdmin() && ! $this->user->isCurrentUser($user['id'])): ?> - <li> + <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'remove' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Remove'), 'user', 'remove', array('user_id' => $user['id'])) ?> </li> <?php endif ?> |