diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-03-11 15:24:34 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-03-11 15:24:34 -0500 |
commit | a22b8f3dc73555800caf55768f04a7a2ce4af7f2 (patch) | |
tree | 60257cb9b508da83be5a9477c434fb53cc3c6f6d /app/Template/user_list | |
parent | 469112918d0cfa6a43a7fdb829cd19bdf85cfcbe (diff) |
Make user actions available from contextual menu
Diffstat (limited to 'app/Template/user_list')
-rw-r--r-- | app/Template/user_list/dropdown.php | 77 | ||||
-rw-r--r-- | app/Template/user_list/user_icons.php | 2 |
2 files changed, 78 insertions, 1 deletions
diff --git a/app/Template/user_list/dropdown.php b/app/Template/user_list/dropdown.php index 20d17aea..9f89d807 100644 --- a/app/Template/user_list/dropdown.php +++ b/app/Template/user_list/dropdown.php @@ -4,6 +4,83 @@ <li> <?= $this->url->icon('user', t('View profile'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?> </li> + <?php if ($user['is_active'] == 1 && $this->user->hasAccess('UserModificationController', 'show')): ?> + <li> + <?= $this->modal->medium('edit', t('Edit'), 'UserModificationController', 'show', array('user_id' => $user['id'])) ?> + </li> + <li> + <?= $this->modal->medium('smile-o', t('Avatar'), 'AvatarFileController', 'show', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($user['is_ldap_user'] == 0 && $this->user->hasAccess('UserCredentialController', 'changePassword')): ?> + <li> + <?= $this->modal->medium('key', t('Change password'), 'UserCredentialController', 'changePassword', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->isCurrentUser($user['id']) && $this->user->hasAccess('TwoFactorController', 'index')): ?> + <li> + <?= $this->modal->medium('shield', t('Two factor authentication'), 'TwoFactorController', 'index', array('user_id' => $user['id'])) ?> + </li> + <?php elseif ($this->user->hasAccess('TwoFactorController', 'disable') && $user['twofactor_activated'] == 1): ?> + <li> + <?= $this->modal->medium('shield', t('Two factor authentication'), 'TwoFactorController', 'disable', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'share')): ?> + <li> + <?= $this->modal->medium('share-alt', t('Public access'), 'UserViewController', 'share', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'notifications')): ?> + <li> + <?= $this->modal->medium('bell-o', t('Notifications'), 'UserViewController', 'notifications', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'external')): ?> + <li> + <?= $this->modal->medium('user-circle-o', t('External accounts'), 'UserViewController', 'external', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'integrations')): ?> + <li> + <?= $this->modal->medium('rocket', t('Integrations'), 'UserViewController', 'integrations', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserApiAccessController', 'show')): ?> + <li> + <?= $this->modal->medium('cloud', t('API Access'), 'UserApiAccessController', 'show', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + + <?php if ($this->user->isAdmin()): ?> + <li> + <?= $this->url->icon('dashboard', t('User dashboard'), 'DashboardController', 'show', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + + <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?> + <?php if ($this->user->hasAccess('UserViewController', 'timesheet')): ?> + <li> + <?= $this->modal->medium('clock-o',t('Time tracking'), 'UserViewController', 'timesheet', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'lastLogin')): ?> + <li> + <?= $this->modal->medium('id-badge', t('Last logins'), 'UserViewController', 'lastLogin', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'sessions')): ?> + <li> + <?= $this->modal->medium('database', t('Persistent connections'), 'UserViewController', 'sessions', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'passwordReset')): ?> + <li> + <?= $this->modal->medium('legal', t('Password reset history'), 'UserViewController', 'passwordReset', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php endif ?> + <?php if ($user['is_active'] == 1 && $this->user->hasAccess('UserStatusController', 'disable') && ! $this->user->isCurrentUser($user['id'])): ?> <li> <?= $this->modal->confirm('times', t('Disable'), 'UserStatusController', 'confirmDisable', array('user_id' => $user['id'])) ?> diff --git a/app/Template/user_list/user_icons.php b/app/Template/user_list/user_icons.php index 532526bb..a110e557 100644 --- a/app/Template/user_list/user_icons.php +++ b/app/Template/user_list/user_icons.php @@ -13,7 +13,7 @@ <?php if ($user['twofactor_activated'] == 1): ?> <span title="<?= t('Two factor authentication enabled') ?>"> - <i class="fa fa-key" aria-hidden="true"></i> + <i class="fa fa-shield" aria-hidden="true"></i> </span> <?php endif ?> |