diff options
Diffstat (limited to 'app/Template/user_view')
-rw-r--r-- | app/Template/user_view/last.php | 4 | ||||
-rw-r--r-- | app/Template/user_view/layout.php | 17 | ||||
-rw-r--r-- | app/Template/user_view/password_reset.php | 4 | ||||
-rw-r--r-- | app/Template/user_view/profile.php | 14 | ||||
-rw-r--r-- | app/Template/user_view/sessions.php | 2 | ||||
-rw-r--r-- | app/Template/user_view/share.php | 6 | ||||
-rw-r--r-- | app/Template/user_view/show.php | 21 | ||||
-rw-r--r-- | app/Template/user_view/sidebar.php | 81 | ||||
-rw-r--r-- | app/Template/user_view/timesheet.php | 2 |
9 files changed, 95 insertions, 56 deletions
diff --git a/app/Template/user_view/last.php b/app/Template/user_view/last.php index 3de4d5e2..72f59bf6 100644 --- a/app/Template/user_view/last.php +++ b/app/Template/user_view/last.php @@ -5,7 +5,7 @@ <?php if (empty($last_logins)): ?> <p class="alert"><?= t('Never connected.') ?></p> <?php else: ?> - <table class="table-small table-fixed"> + <table class="table-small table-fixed table-scrolling table-striped"> <tr> <th class="column-20"><?= t('Login date') ?></th> <th class="column-15"><?= t('Authentication method') ?></th> @@ -21,4 +21,4 @@ </tr> <?php endforeach ?> </table> -<?php endif ?>
\ No newline at end of file +<?php endif ?> diff --git a/app/Template/user_view/layout.php b/app/Template/user_view/layout.php index c3604b99..8f24adcc 100644 --- a/app/Template/user_view/layout.php +++ b/app/Template/user_view/layout.php @@ -2,11 +2,18 @@ <div class="page-header"> <?php if ($this->user->hasAccess('UserCreationController', 'show')): ?> <ul> - <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'UserListController', 'show') ?></li> - <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'UserCreationController', 'show', array(), false, 'popover') ?></li> - <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'UserCreationController', 'show', array('remote' => 1), false, 'popover') ?></li> - <li><i class="fa fa-upload fa-fw"></i><?= $this->url->link(t('Import'), 'UserImportController', 'show', array(), false, 'popover') ?></li> - <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'GroupListController', 'index') ?></li> + <li> + <?= $this->url->icon('user', t('All users'), 'UserListController', 'show') ?> + </li> + <li> + <?= $this->modal->medium('plus', t('New user'), 'UserCreationController', 'show') ?> + </li> + <li> + <?= $this->modal->medium('upload', t('Import'), 'UserImportController', 'show') ?> + </li> + <li> + <?= $this->url->icon('users', t('View all groups'), 'GroupListController', 'index') ?> + </li> </ul> <?php endif ?> </div> diff --git a/app/Template/user_view/password_reset.php b/app/Template/user_view/password_reset.php index 1371ce11..de7047e0 100644 --- a/app/Template/user_view/password_reset.php +++ b/app/Template/user_view/password_reset.php @@ -5,7 +5,7 @@ <?php if (empty($tokens)): ?> <p class="alert"><?= t('The password has never been reinitialized.') ?></p> <?php else: ?> - <table class="table-small table-fixed"> + <table class="table-small table-fixed table-scrolling table-striped"> <tr> <th class="column-20"><?= t('Creation') ?></th> <th class="column-20"><?= t('Expiration') ?></th> @@ -23,4 +23,4 @@ </tr> <?php endforeach ?> </table> -<?php endif ?>
\ No newline at end of file +<?php endif ?> diff --git a/app/Template/user_view/profile.php b/app/Template/user_view/profile.php index 9c9d3282..486ca428 100644 --- a/app/Template/user_view/profile.php +++ b/app/Template/user_view/profile.php @@ -1,9 +1,11 @@ <section id="main"> <br> <?= $this->avatar->render($user['id'], $user['username'], $user['name'], $user['email'], $user['avatar_path']) ?> - <ul class="listing"> - <li><?= t('Username:') ?> <strong><?= $this->text->e($user['username']) ?></strong></li> - <li><?= t('Name:') ?> <strong><?= $this->text->e($user['name']) ?: t('None') ?></strong></li> - <li><?= t('Email:') ?> <strong><?= $this->text->e($user['email']) ?: t('None') ?></strong></li> - </ul> -</section>
\ No newline at end of file + <div class="panel"> + <ul> + <li><?= t('Login:') ?> <strong><?= $this->text->e($user['username']) ?></strong></li> + <li><?= t('Full Name:') ?> <strong><?= $this->text->e($user['name']) ?: t('None') ?></strong></li> + <li><?= t('Email:') ?> <strong><?= $this->text->e($user['email']) ?: t('None') ?></strong></li> + </ul> + </div> +</section> diff --git a/app/Template/user_view/sessions.php b/app/Template/user_view/sessions.php index eda3ef7f..10497e4f 100644 --- a/app/Template/user_view/sessions.php +++ b/app/Template/user_view/sessions.php @@ -5,7 +5,7 @@ <?php if (empty($sessions)): ?> <p class="alert"><?= t('No session.') ?></p> <?php else: ?> - <table class="table-small table-fixed"> + <table class="table-small table-fixed table-scrolling table-striped"> <tr> <th class="column-20"><?= t('Creation date') ?></th> <th class="column-20"><?= t('Expiration date') ?></th> diff --git a/app/Template/user_view/share.php b/app/Template/user_view/share.php index 570b766e..318d98ea 100644 --- a/app/Template/user_view/share.php +++ b/app/Template/user_view/share.php @@ -3,10 +3,10 @@ </div> <?php if (! empty($user['token'])): ?> - <div class="listing"> + <div class="panel"> <ul class="no-bullet"> - <li><strong><i class="fa fa-rss-square"></i> <?= $this->url->link(t('RSS feed'), 'FeedController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> - <li><strong><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ICalendarController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> + <li><strong><?= $this->url->icon('rss-square', t('RSS feed'), 'FeedController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> + <li><strong><?= $this->url->icon('calendar', t('iCal feed'), 'ICalendarController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> </ul> </div> <?= $this->url->link(t('Disable public access'), 'UserViewController', 'share', array('user_id' => $user['id'], 'switch' => 'disable'), true, 'btn btn-red') ?> diff --git a/app/Template/user_view/show.php b/app/Template/user_view/show.php index fc11f8a1..e57fd4cd 100644 --- a/app/Template/user_view/show.php +++ b/app/Template/user_view/show.php @@ -1,9 +1,9 @@ <div class="page-header"> <h2><?= t('Summary') ?></h2> </div> -<ul class="listing"> - <li><?= t('Username:') ?> <strong><?= $this->text->e($user['username']) ?></strong></li> - <li><?= t('Name:') ?> <strong><?= $this->text->e($user['name']) ?: t('None') ?></strong></li> +<ul class="panel"> + <li><?= t('Login:') ?> <strong><?= $this->text->e($user['username']) ?></strong></li> + <li><?= t('Full Name:') ?> <strong><?= $this->text->e($user['name']) ?: t('None') ?></strong></li> <li><?= t('Email:') ?> <strong><?= $this->text->e($user['email']) ?: t('None') ?></strong></li> <li><?= t('Status:') ?> <strong><?= $user['is_active'] ? t('Active') : t('Inactive') ?></strong></li> </ul> @@ -11,20 +11,25 @@ <div class="page-header"> <h2><?= t('Security') ?></h2> </div> -<ul class="listing"> +<ul class="panel"> <li><?= t('Role:') ?> <strong><?= $this->user->getRoleName($user['role']) ?></strong></li> <li><?= t('Account type:') ?> <strong><?= $user['is_ldap_user'] ? t('Remote') : t('Local') ?></strong></li> <li><?= $user['twofactor_activated'] == 1 ? t('Two factor authentication enabled') : t('Two factor authentication disabled') ?></li> <li><?= t('Number of failed login:') ?> <strong><?= $user['nb_failed_login'] ?></strong></li> <?php if ($user['lock_expiration_date'] != 0): ?> <li><?= t('Account locked until:') ?> <strong><?= $this->dt->datetime($user['lock_expiration_date']) ?></strong></li> + <?php if ($this->user->isAdmin()): ?> + <li> + <?= $this->url->link(t('Unlock this user'), 'UserCredentialController', 'unlock', array('user_id' => $user['id']), true) ?> + </li> + <?php endif ?> <?php endif ?> </ul> <div class="page-header"> <h2><?= t('Preferences') ?></h2> </div> -<ul class="listing"> +<ul class="panel"> <li><?= t('Timezone:') ?> <strong><?= $this->text->in($user['timezone'], $timezones) ?></strong></li> <li><?= t('Language:') ?> <strong><?= $this->text->in($user['language'], $languages) ?></strong></li> <li><?= t('Notifications:') ?> <strong><?= $user['notifications_enabled'] == 1 ? t('Enabled') : t('Disabled') ?></strong></li> @@ -35,10 +40,10 @@ <h2><?= t('Public access') ?></h2> </div> - <div class="listing"> + <div class="panel"> <ul class="no-bullet"> - <li><strong><i class="fa fa-rss-square"></i> <?= $this->url->link(t('RSS feed'), 'FeedController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> - <li><strong><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ICalendarController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> + <li><strong><?= $this->url->icon('rss-square', t('RSS feed'), 'FeedController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> + <li><strong><?= $this->url->icon('calendar', t('iCal feed'), 'ICalendarController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> </ul> </div> <?php endif ?> diff --git a/app/Template/user_view/sidebar.php b/app/Template/user_view/sidebar.php index d200a7f5..ef494e42 100644 --- a/app/Template/user_view/sidebar.php +++ b/app/Template/user_view/sidebar.php @@ -1,5 +1,7 @@ <div class="sidebar"> - <h2><?= t('Information') ?></h2> + <div class="sidebar-title"> + <h2><?= t('Information') ?></h2> + </div> <ul> <?php if ($this->user->hasAccess('UserViewController', 'show')): ?> <li <?= $this->app->checkMenuSelection('UserViewController', 'show') ?>> @@ -12,24 +14,34 @@ </li> <?php endif ?> <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?> - <li <?= $this->app->checkMenuSelection('UserViewController', 'timesheet') ?>> - <?= $this->url->link(t('Time tracking'), 'UserViewController', 'timesheet', array('user_id' => $user['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('UserViewController', 'lastLogin') ?>> - <?= $this->url->link(t('Last logins'), 'UserViewController', 'lastLogin', array('user_id' => $user['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('UserViewController', 'sessions') ?>> - <?= $this->url->link(t('Persistent connections'), 'UserViewController', 'sessions', array('user_id' => $user['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('UserViewController', 'passwordReset') ?>> - <?= $this->url->link(t('Password reset history'), 'UserViewController', 'passwordReset', array('user_id' => $user['id'])) ?> - </li> + <?php if ($this->user->hasAccess('UserViewController', 'timesheet')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'timesheet') ?>> + <?= $this->url->link(t('Time tracking'), 'UserViewController', 'timesheet', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'lastLogin')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'lastLogin') ?>> + <?= $this->url->link(t('Last logins'), 'UserViewController', 'lastLogin', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'sessions')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'sessions') ?>> + <?= $this->url->link(t('Persistent connections'), 'UserViewController', 'sessions', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'passwordReset')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'passwordReset') ?>> + <?= $this->url->link(t('Password reset history'), 'UserViewController', 'passwordReset', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> <?php endif ?> <?= $this->hook->render('template:user:sidebar:information', array('user' => $user)) ?> </ul> - <h2><?= t('Actions') ?></h2> + <div class="sidebar-title"> + <h2><?= t('Actions') ?></h2> + </div> <ul> <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?> @@ -42,13 +54,13 @@ </li> <?php endif ?> - <?php if ($user['is_ldap_user'] == 0): ?> + <?php if ($user['is_ldap_user'] == 0 && $this->user->hasAccess('UserCredentialController', 'changePassword')): ?> <li <?= $this->app->checkMenuSelection('UserCredentialController', 'changePassword') ?>> <?= $this->url->link(t('Change password'), 'UserCredentialController', 'changePassword', array('user_id' => $user['id'])) ?> </li> <?php endif ?> - <?php if ($this->user->isCurrentUser($user['id'])): ?> + <?php if ($this->user->isCurrentUser($user['id']) && $this->user->hasAccess('TwoFactorController', 'index')): ?> <li <?= $this->app->checkMenuSelection('TwoFactorController', 'index') ?>> <?= $this->url->link(t('Two factor authentication'), 'TwoFactorController', 'index', array('user_id' => $user['id'])) ?> </li> @@ -58,18 +70,31 @@ </li> <?php endif ?> - <li <?= $this->app->checkMenuSelection('UserViewController', 'share') ?>> - <?= $this->url->link(t('Public access'), 'UserViewController', 'share', array('user_id' => $user['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('UserViewController', 'notifications') ?>> - <?= $this->url->link(t('Notifications'), 'UserViewController', 'notifications', array('user_id' => $user['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('UserViewController', 'external') ?>> - <?= $this->url->link(t('External accounts'), 'UserViewController', 'external', array('user_id' => $user['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('UserViewController', 'integrations') ?>> - <?= $this->url->link(t('Integrations'), 'UserViewController', 'integrations', array('user_id' => $user['id'])) ?> - </li> + <?php if ($this->user->hasAccess('UserViewController', 'share')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'share') ?>> + <?= $this->url->link(t('Public access'), 'UserViewController', 'share', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'notifications')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'notifications') ?>> + <?= $this->url->link(t('Notifications'), 'UserViewController', 'notifications', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'external')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'external') ?>> + <?= $this->url->link(t('External accounts'), 'UserViewController', 'external', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'integrations')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'integrations') ?>> + <?= $this->url->link(t('Integrations'), 'UserViewController', 'integrations', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserApiAccessController', 'show')): ?> + <li <?= $this->app->checkMenuSelection('UserApiAccessController', 'show') ?>> + <?= $this->url->link(t('API'), 'UserApiAccessController', 'show', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> <?php endif ?> <?php if ($this->user->hasAccess('UserCredentialController', 'changeAuthentication')): ?> diff --git a/app/Template/user_view/timesheet.php b/app/Template/user_view/timesheet.php index 3df57492..aeffd2f4 100644 --- a/app/Template/user_view/timesheet.php +++ b/app/Template/user_view/timesheet.php @@ -6,7 +6,7 @@ <?php if ($subtask_paginator->isEmpty()): ?> <p class="alert"><?= t('There is nothing to show.') ?></p> <?php else: ?> - <table class="table-fixed"> + <table class="table-fixed table-scrolling table-striped"> <tr> <th class="column-25"><?= $subtask_paginator->order(t('Task'), 'task_title') ?></th> <th class="column-25"><?= $subtask_paginator->order(t('Subtask'), 'subtask_title') ?></th> |