summaryrefslogtreecommitdiff
path: root/app/Template/user_view/sidebar.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-16 20:55:21 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-16 20:55:21 -0400
commit4514bc1d4b4abff23902e46da76e70f13a3647eb (patch)
treefb4f03d47f49bd8acc6fbae943ac44ac58df9540 /app/Template/user_view/sidebar.php
parentabdf6f97800e7e838b5841820815385b183bab67 (diff)
Improve user controllers and views
Diffstat (limited to 'app/Template/user_view/sidebar.php')
-rw-r--r--app/Template/user_view/sidebar.php83
1 files changed, 83 insertions, 0 deletions
diff --git a/app/Template/user_view/sidebar.php b/app/Template/user_view/sidebar.php
new file mode 100644
index 00000000..9a25df16
--- /dev/null
+++ b/app/Template/user_view/sidebar.php
@@ -0,0 +1,83 @@
+<div class="sidebar">
+ <h2><?= t('Information') ?></h2>
+ <ul>
+ <?php if ($this->user->hasAccess('UserViewController', 'show')): ?>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'show') ?>>
+ <?= $this->url->link(t('Summary'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
+ </li>
+ <?php endif ?>
+ <?php if ($this->user->isAdmin()): ?>
+ <li>
+ <?= $this->url->link(t('User dashboard'), 'DashboardController', 'show', array('user_id' => $user['id'])) ?>
+ </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 endif ?>
+
+ <?= $this->hook->render('template:user:sidebar:information', array('user' => $user)) ?>
+ </ul>
+
+ <h2><?= t('Actions') ?></h2>
+ <ul>
+ <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?>
+
+ <?php if ($this->user->hasAccess('UserViewController', 'edit')): ?>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'edit') ?>>
+ <?= $this->url->link(t('Edit profile'), 'UserViewController', 'edit', array('user_id' => $user['id'])) ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('AvatarFile') ?>>
+ <?= $this->url->link(t('Avatar'), 'AvatarFile', 'show', array('user_id' => $user['id'])) ?>
+ </li>
+ <?php endif ?>
+
+ <?php if ($user['is_ldap_user'] == 0): ?>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'password') ?>>
+ <?= $this->url->link(t('Change password'), 'UserViewController', 'password', array('user_id' => $user['id'])) ?>
+ </li>
+ <?php endif ?>
+
+ <?php if ($this->user->isCurrentUser($user['id'])): ?>
+ <li <?= $this->app->checkMenuSelection('twofactor', 'index') ?>>
+ <?= $this->url->link(t('Two factor authentication'), 'twofactor', 'index', array('user_id' => $user['id'])) ?>
+ </li>
+ <?php elseif ($this->user->hasAccess('twofactor', 'disable') && $user['twofactor_activated'] == 1): ?>
+ <li <?= $this->app->checkMenuSelection('twofactor', 'disable') ?>>
+ <?= $this->url->link(t('Two factor authentication'), 'twofactor', 'disable', array('user_id' => $user['id'])) ?>
+ </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 endif ?>
+
+ <?php if ($this->user->hasAccess('UserViewController', 'authentication')): ?>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'authentication') ?>>
+ <?= $this->url->link(t('Edit Authentication'), 'UserViewController', 'authentication', array('user_id' => $user['id'])) ?>
+ </li>
+ <?php endif ?>
+
+ <?= $this->hook->render('template:user:sidebar:actions', array('user' => $user)) ?>
+ </ul>
+</div>