summaryrefslogtreecommitdiff
path: root/app/Template/user_view
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/user_view')
-rw-r--r--app/Template/user_view/last.php4
-rw-r--r--app/Template/user_view/password_reset.php4
-rw-r--r--app/Template/user_view/sessions.php2
-rw-r--r--app/Template/user_view/sidebar.php76
-rw-r--r--app/Template/user_view/timesheet.php2
5 files changed, 54 insertions, 34 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/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/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/sidebar.php b/app/Template/user_view/sidebar.php
index d200a7f5..a80daefa 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,26 @@
</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 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>