From a22b8f3dc73555800caf55768f04a7a2ce4af7f2 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 11 Mar 2017 15:24:34 -0500 Subject: Make user actions available from contextual menu --- app/Template/user_list/dropdown.php | 77 +++++++++++++++++++++++++++++++++++ app/Template/user_list/user_icons.php | 2 +- 2 files changed, 78 insertions(+), 1 deletion(-) (limited to 'app/Template/user_list') 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 @@
  • url->icon('user', t('View profile'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
  • + user->hasAccess('UserModificationController', 'show')): ?> +
  • + modal->medium('edit', t('Edit'), 'UserModificationController', 'show', array('user_id' => $user['id'])) ?> +
  • +
  • + modal->medium('smile-o', t('Avatar'), 'AvatarFileController', 'show', array('user_id' => $user['id'])) ?> +
  • + + user->hasAccess('UserCredentialController', 'changePassword')): ?> +
  • + modal->medium('key', t('Change password'), 'UserCredentialController', 'changePassword', array('user_id' => $user['id'])) ?> +
  • + + user->isCurrentUser($user['id']) && $this->user->hasAccess('TwoFactorController', 'index')): ?> +
  • + modal->medium('shield', t('Two factor authentication'), 'TwoFactorController', 'index', array('user_id' => $user['id'])) ?> +
  • + user->hasAccess('TwoFactorController', 'disable') && $user['twofactor_activated'] == 1): ?> +
  • + modal->medium('shield', t('Two factor authentication'), 'TwoFactorController', 'disable', array('user_id' => $user['id'])) ?> +
  • + + user->hasAccess('UserViewController', 'share')): ?> +
  • + modal->medium('share-alt', t('Public access'), 'UserViewController', 'share', array('user_id' => $user['id'])) ?> +
  • + + user->hasAccess('UserViewController', 'notifications')): ?> +
  • + modal->medium('bell-o', t('Notifications'), 'UserViewController', 'notifications', array('user_id' => $user['id'])) ?> +
  • + + user->hasAccess('UserViewController', 'external')): ?> +
  • + modal->medium('user-circle-o', t('External accounts'), 'UserViewController', 'external', array('user_id' => $user['id'])) ?> +
  • + + user->hasAccess('UserViewController', 'integrations')): ?> +
  • + modal->medium('rocket', t('Integrations'), 'UserViewController', 'integrations', array('user_id' => $user['id'])) ?> +
  • + + user->hasAccess('UserApiAccessController', 'show')): ?> +
  • + modal->medium('cloud', t('API Access'), 'UserApiAccessController', 'show', array('user_id' => $user['id'])) ?> +
  • + + + user->isAdmin()): ?> +
  • + url->icon('dashboard', t('User dashboard'), 'DashboardController', 'show', array('user_id' => $user['id'])) ?> +
  • + + + user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?> + user->hasAccess('UserViewController', 'timesheet')): ?> +
  • + modal->medium('clock-o',t('Time tracking'), 'UserViewController', 'timesheet', array('user_id' => $user['id'])) ?> +
  • + + user->hasAccess('UserViewController', 'lastLogin')): ?> +
  • + modal->medium('id-badge', t('Last logins'), 'UserViewController', 'lastLogin', array('user_id' => $user['id'])) ?> +
  • + + user->hasAccess('UserViewController', 'sessions')): ?> +
  • + modal->medium('database', t('Persistent connections'), 'UserViewController', 'sessions', array('user_id' => $user['id'])) ?> +
  • + + user->hasAccess('UserViewController', 'passwordReset')): ?> +
  • + modal->medium('legal', t('Password reset history'), 'UserViewController', 'passwordReset', array('user_id' => $user['id'])) ?> +
  • + + + user->hasAccess('UserStatusController', 'disable') && ! $this->user->isCurrentUser($user['id'])): ?>
  • 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 @@ - + -- cgit v1.2.3