看板初始化提交
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('External authentications') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php $html = $this->hook->render('template:user:external', array('user' => $user)) ?>
|
||||
|
||||
<?php if (empty($html)): ?>
|
||||
<p class="alert"><?= t('No external authentication enabled.') ?></p>
|
||||
<?php else: ?>
|
||||
<?= $html ?>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Integrations') ?></h2>
|
||||
</div>
|
||||
|
||||
<form method="post" action="<?= $this->url->href('UserViewController', 'integrations', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
<?= $this->form->csrf() ?>
|
||||
<?php $hooks = $this->hook->render('template:user:integrations', array('values' => $values)) ?>
|
||||
<?php if (! empty($hooks)): ?>
|
||||
<?= $hooks ?>
|
||||
<?php else: ?>
|
||||
<p class="alert"><?= t('No external integration registered.') ?></p>
|
||||
<?php endif ?>
|
||||
</form>
|
||||
@@ -0,0 +1,24 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Last logins') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php if (empty($last_logins)): ?>
|
||||
<p class="alert"><?= t('Never connected.') ?></p>
|
||||
<?php else: ?>
|
||||
<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>
|
||||
<th class="column-15"><?= t('IP address') ?></th>
|
||||
<th><?= t('User agent') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($last_logins as $login): ?>
|
||||
<tr>
|
||||
<td><?= $this->dt->datetime($login['date_creation']) ?></td>
|
||||
<td><?= $this->text->e($login['auth_type']) ?></td>
|
||||
<td><?= $this->text->e($login['ip']) ?></td>
|
||||
<td><?= $this->text->e($login['user_agent']) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,26 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<?php if ($this->user->hasAccess('UserCreationController', 'show')): ?>
|
||||
<ul>
|
||||
<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>
|
||||
<section class="sidebar-container" id="user-section">
|
||||
<?= $this->render('user_view/sidebar', array('user' => $user)) ?>
|
||||
<div class="sidebar-content">
|
||||
<?= $content_for_sublayout ?>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
@@ -0,0 +1,22 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Notifications') ?></h2>
|
||||
</div>
|
||||
|
||||
<form method="post" action="<?= $this->url->href('UserViewController', 'notifications', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<h4><?= t('Notification methods:') ?></h4>
|
||||
<?= $this->form->checkboxes('notification_types', $types, $notifications) ?>
|
||||
|
||||
<hr>
|
||||
<h4><?= t('I want to receive notifications for:') ?></h4>
|
||||
<?= $this->form->radios('notifications_filter', $filters, $notifications) ?>
|
||||
|
||||
<hr>
|
||||
<?php if (! empty($projects)): ?>
|
||||
<h4><?= t('I only want to receive notifications for these projects:') ?></h4>
|
||||
<?= $this->form->checkboxes('notification_projects', $projects, $notifications) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->modal->submitButtons() ?>
|
||||
</form>
|
||||
@@ -0,0 +1,26 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Last Password Reset') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php if (empty($tokens)): ?>
|
||||
<p class="alert"><?= t('The password has never been reinitialized.') ?></p>
|
||||
<?php else: ?>
|
||||
<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>
|
||||
<th class="column-5"><?= t('Active') ?></th>
|
||||
<th class="column-15"><?= t('IP address') ?></th>
|
||||
<th><?= t('User agent') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($tokens as $token): ?>
|
||||
<tr>
|
||||
<td><?= $this->dt->datetime($token['date_creation']) ?></td>
|
||||
<td><?= $this->dt->datetime($token['date_expiration']) ?></td>
|
||||
<td><?= $token['is_active'] == 0 ? t('No') : t('Yes') ?></td>
|
||||
<td><?= $this->text->e($token['ip']) ?></td>
|
||||
<td><?= $this->text->e($token['user_agent']) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,12 @@
|
||||
<section id="main">
|
||||
<br>
|
||||
<?= $this->avatar->render($user['id'], $user['username'], $user['name'], $user['email'], $user['avatar_path']) ?>
|
||||
<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>
|
||||
<?= $this->hook->render('template:user:show:profile:info', array('user' => $user)) ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,26 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Persistent connections') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php if (empty($sessions)): ?>
|
||||
<p class="alert"><?= t('No session.') ?></p>
|
||||
<?php else: ?>
|
||||
<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>
|
||||
<th class="column-15"><?= t('IP address') ?></th>
|
||||
<th><?= t('User agent') ?></th>
|
||||
<th class="column-10"><?= t('Action') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($sessions as $session): ?>
|
||||
<tr>
|
||||
<td><?= $this->dt->datetime($session['date_creation']) ?></td>
|
||||
<td><?= $this->dt->datetime($session['expiration']) ?></td>
|
||||
<td><?= $this->text->e($session['ip']) ?></td>
|
||||
<td><?= $this->text->e($session['user_agent']) ?></td>
|
||||
<td><?= $this->url->link(t('Remove'), 'UserViewController', 'removeSession', array('user_id' => $user['id'], 'id' => $session['id']), true, 'js-modal-replace') ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,15 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Public access') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php if (! empty($user['token'])): ?>
|
||||
<div class="panel">
|
||||
<ul class="no-bullet">
|
||||
<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 js-modal-replace') ?>
|
||||
<?php else: ?>
|
||||
<?= $this->url->link(t('Enable public access'), 'UserViewController', 'share', array('user_id' => $user['id'], 'switch' => 'enable'), true, 'btn btn-blue js-modal-replace') ?>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,53 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Summary') ?></h2>
|
||||
</div>
|
||||
<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>
|
||||
<?= $this->hook->render('template:user:show:profile:info', array('user' => $user)) ?>
|
||||
</ul>
|
||||
|
||||
<div class="page-header">
|
||||
<h2><?= t('Security') ?></h2>
|
||||
</div>
|
||||
<ul class="panel">
|
||||
<li><?= t('Role:') ?> <strong><?= $this->text->e($this->user->getRoleName($user['role'])) ?></strong></li>
|
||||
<li><?= t('Group membership(s):') ?> <strong><?= $this->text->e(implode(', ', $this->user->getUsersGroupNames($user['id'])['full_list'])) ?></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="panel">
|
||||
<li><?= t('Theme:') ?> <strong><?= $this->text->in($user['theme'], $themes) ?></strong></li>
|
||||
<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('Custom Filter:') ?> <strong><?= $this->text->e($user['filter']) ?></strong></li>
|
||||
<li><?= t('Notifications:') ?> <strong><?= $user['notifications_enabled'] == 1 ? t('Enabled') : t('Disabled') ?></strong></li>
|
||||
</ul>
|
||||
|
||||
<?php if (! empty($user['token'])): ?>
|
||||
<div class="page-header">
|
||||
<h2><?= t('Public access') ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<ul class="no-bullet">
|
||||
<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 ?>
|
||||
@@ -0,0 +1,108 @@
|
||||
<div class="sidebar">
|
||||
<div class="sidebar-title">
|
||||
<h2><?= t('Information') ?></h2>
|
||||
</div>
|
||||
<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'])): ?>
|
||||
<?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') && REMEMBER_ME_AUTH): ?>
|
||||
<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>
|
||||
|
||||
<div class="sidebar-title">
|
||||
<h2><?= t('Actions') ?></h2>
|
||||
</div>
|
||||
<ul>
|
||||
<?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?>
|
||||
|
||||
<?php if ($this->user->hasAccess('UserModificationController', 'show')): ?>
|
||||
<li <?= $this->app->checkMenuSelection('UserModificationController', 'show') ?>>
|
||||
<?= $this->url->link(t('Edit profile'), 'UserModificationController', 'show', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('AvatarFileController') ?>>
|
||||
<?= $this->url->link(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->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']) && $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>
|
||||
<?php elseif ($this->user->hasAccess('TwoFactorController', 'disable') && $user['twofactor_activated'] == 1): ?>
|
||||
<li <?= $this->app->checkMenuSelection('TwoFactorController', 'disable') ?>>
|
||||
<?= $this->url->link(t('Two factor authentication'), 'TwoFactorController', 'disable', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?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')): ?>
|
||||
<li <?= $this->app->checkMenuSelection('UserCredentialController', 'changeAuthentication') ?>>
|
||||
<?= $this->url->link(t('Edit Authentication'), 'UserCredentialController', 'changeAuthentication', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->hook->render('template:user:sidebar:actions', array('user' => $user)) ?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,29 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Time Tracking') ?></h2>
|
||||
</div>
|
||||
|
||||
<h3><?= t('Subtask timesheet') ?></h3>
|
||||
<?php if ($subtask_paginator->isEmpty()): ?>
|
||||
<p class="alert"><?= t('There is nothing to show.') ?></p>
|
||||
<?php else: ?>
|
||||
<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>
|
||||
<th class="column-20"><?= $subtask_paginator->order(t('Start'), 'start') ?></th>
|
||||
<th class="column-20"><?= $subtask_paginator->order(t('End'), 'end') ?></th>
|
||||
<th class="column-10"><?= $subtask_paginator->order(t('Time spent'), 'time_spent') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($subtask_paginator->getCollection() as $record): ?>
|
||||
<tr>
|
||||
<td><?= $this->url->link($this->text->e($record['task_title']), 'TaskViewController', 'show', array('task_id' => $record['task_id'])) ?></td>
|
||||
<td><?= $this->url->link($this->text->e($record['subtask_title']), 'TaskViewController', 'show', array('task_id' => $record['task_id'])) ?></td>
|
||||
<td><?= $this->dt->datetime($record['start']) ?></td>
|
||||
<td><?= $this->dt->datetime($record['end']) ?></td>
|
||||
<td><?= n($record['time_spent']).' '.t('hours') ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
||||
<?= $subtask_paginator ?>
|
||||
<?php endif ?>
|
||||
Reference in New Issue
Block a user