Helpers refactoring
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<div id="user-calendar"
|
||||
data-check-url="<?= $this->u('calendar', 'user') ?>"
|
||||
data-check-url="<?= $this->url->href('calendar', 'user') ?>"
|
||||
data-user-id="<?= $user['id'] ?>"
|
||||
data-save-url="<?= $this->u('calendar', 'save') ?>"
|
||||
data-save-url="<?= $this->url->href('calendar', 'save') ?>"
|
||||
>
|
||||
</div>
|
||||
@@ -1,42 +1,42 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Edit user') ?></h2>
|
||||
</div>
|
||||
<form method="post" action="<?= $this->u('user', 'edit', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
<form method="post" action="<?= $this->url->href('user', 'edit', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
|
||||
<?= $this->formCsrf() ?>
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<?= $this->formHidden('id', $values) ?>
|
||||
<?= $this->formHidden('is_ldap_user', $values) ?>
|
||||
<?= $this->form->hidden('id', $values) ?>
|
||||
<?= $this->form->hidden('is_ldap_user', $values) ?>
|
||||
|
||||
<?= $this->formLabel(t('Username'), 'username') ?>
|
||||
<?= $this->formText('username', $values, $errors, array('required', $values['is_ldap_user'] == 1 ? 'readonly' : '', 'maxlength="50"')) ?><br/>
|
||||
<?= $this->form->label(t('Username'), 'username') ?>
|
||||
<?= $this->form->text('username', $values, $errors, array('required', $values['is_ldap_user'] == 1 ? 'readonly' : '', 'maxlength="50"')) ?><br/>
|
||||
|
||||
<?= $this->formLabel(t('Name'), 'name') ?>
|
||||
<?= $this->formText('name', $values, $errors) ?><br/>
|
||||
<?= $this->form->label(t('Name'), 'name') ?>
|
||||
<?= $this->form->text('name', $values, $errors) ?><br/>
|
||||
|
||||
<?= $this->formLabel(t('Email'), 'email') ?>
|
||||
<?= $this->formEmail('email', $values, $errors) ?><br/>
|
||||
<?= $this->form->label(t('Email'), 'email') ?>
|
||||
<?= $this->form->email('email', $values, $errors) ?><br/>
|
||||
|
||||
<?= $this->formLabel(t('Default project'), 'default_project_id') ?>
|
||||
<?= $this->formSelect('default_project_id', $projects, $values, $errors) ?><br/>
|
||||
<?= $this->form->label(t('Default project'), 'default_project_id') ?>
|
||||
<?= $this->form->select('default_project_id', $projects, $values, $errors) ?><br/>
|
||||
|
||||
<?= $this->formLabel(t('Timezone'), 'timezone') ?>
|
||||
<?= $this->formSelect('timezone', $timezones, $values, $errors) ?><br/>
|
||||
<?= $this->form->label(t('Timezone'), 'timezone') ?>
|
||||
<?= $this->form->select('timezone', $timezones, $values, $errors) ?><br/>
|
||||
|
||||
<?= $this->formLabel(t('Language'), 'language') ?>
|
||||
<?= $this->formSelect('language', $languages, $values, $errors) ?><br/>
|
||||
<?= $this->form->label(t('Language'), 'language') ?>
|
||||
<?= $this->form->select('language', $languages, $values, $errors) ?><br/>
|
||||
|
||||
<div class="alert alert-error">
|
||||
<?= $this->formCheckbox('disable_login_form', t('Disable login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?><br/>
|
||||
<?= $this->form->checkbox('disable_login_form', t('Disable login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?><br/>
|
||||
|
||||
<?php if ($this->userSession->isAdmin()): ?>
|
||||
<?= $this->formCheckbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1) ?><br/>
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1) ?><br/>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?>
|
||||
<?= $this->a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
</div>
|
||||
</form>
|
||||
@@ -6,11 +6,11 @@
|
||||
<h3><i class="fa fa-google"></i> <?= t('Google Account') ?></h3>
|
||||
|
||||
<p class="listing">
|
||||
<?php if ($this->userSession->isCurrentUser($user['id'])): ?>
|
||||
<?php if ($this->user->isCurrentUser($user['id'])): ?>
|
||||
<?php if (empty($user['google_id'])): ?>
|
||||
<?= $this->a(t('Link my Google Account'), 'user', 'google', array(), true) ?>
|
||||
<?= $this->url->link(t('Link my Google Account'), 'user', 'google', array(), true) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->a(t('Unlink my Google Account'), 'user', 'unlinkGoogle', array(), true) ?>
|
||||
<?= $this->url->link(t('Unlink my Google Account'), 'user', 'unlinkGoogle', array(), true) ?>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
<?= empty($user['google_id']) ? t('No account linked.') : t('Account linked.') ?>
|
||||
@@ -22,11 +22,11 @@
|
||||
<h3><i class="fa fa-github"></i> <?= t('Github Account') ?></h3>
|
||||
|
||||
<p class="listing">
|
||||
<?php if ($this->userSession->isCurrentUser($user['id'])): ?>
|
||||
<?php if ($this->user->isCurrentUser($user['id'])): ?>
|
||||
<?php if (empty($user['github_id'])): ?>
|
||||
<?= $this->a(t('Link my GitHub Account'), 'user', 'github', array(), true) ?>
|
||||
<?= $this->url->link(t('Link my GitHub Account'), 'user', 'github', array(), true) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->a(t('Unlink my GitHub Account'), 'user', 'unlinkGitHub', array(), true) ?>
|
||||
<?= $this->url->link(t('Unlink my GitHub Account'), 'user', 'unlinkGitHub', array(), true) ?>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
<?= empty($user['github_id']) ? t('No account linked.') : t('Account linked.') ?>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<?php if ($this->userSession->isAdmin()): ?>
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<ul>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->a(t('New user'), 'user', 'create') ?></li>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New user'), 'user', 'create') ?></li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
@@ -26,10 +26,10 @@
|
||||
<?php foreach ($paginator->getCollection() as $user): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?= $this->a('#'.$user['id'], 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link('#'.$user['id'], 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->a($this->e($user['username']), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link($this->e($user['username']), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->e($user['name']) ?>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<td><?= dt('%B %e, %Y at %k:%M %p', $login['date_creation']) ?></td>
|
||||
<td><?= $this->e($login['auth_type']) ?></td>
|
||||
<td><?= $this->e($login['ip']) ?></td>
|
||||
<td><?= $this->e($this->summary($login['user_agent'])) ?></td>
|
||||
<td><?= $this->e($this->text->truncate($login['user_agent'])) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<?php if ($this->userSession->isAdmin()): ?>
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<ul>
|
||||
<li><i class="fa fa-user fa-fw"></i><?= $this->a(t('All users'), 'user', 'index') ?></li>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->a(t('New user'), 'user', 'create') ?></li>
|
||||
<li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New user'), 'user', 'create') ?></li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<ul>
|
||||
<li><i class="fa fa-user fa-fw"></i><?= $this->a(t('All users'), 'user', 'index') ?></li>
|
||||
<li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<section>
|
||||
<form method="post" action="<?= $this->u('user', 'save') ?>" autocomplete="off">
|
||||
<form method="post" action="<?= $this->url->href('user', 'save') ?>" autocomplete="off">
|
||||
|
||||
<?= $this->formCsrf() ?>
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<?= $this->formLabel(t('Username'), 'username') ?>
|
||||
<?= $this->formText('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?><br/>
|
||||
<?= $this->form->label(t('Username'), 'username') ?>
|
||||
<?= $this->form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?><br/>
|
||||
|
||||
<?= $this->formLabel(t('Name'), 'name') ?>
|
||||
<?= $this->formText('name', $values, $errors) ?><br/>
|
||||
<?= $this->form->label(t('Name'), 'name') ?>
|
||||
<?= $this->form->text('name', $values, $errors) ?><br/>
|
||||
|
||||
<?= $this->formLabel(t('Email'), 'email') ?>
|
||||
<?= $this->formEmail('email', $values, $errors) ?><br/>
|
||||
<?= $this->form->label(t('Email'), 'email') ?>
|
||||
<?= $this->form->email('email', $values, $errors) ?><br/>
|
||||
|
||||
<?= $this->formLabel(t('Password'), 'password') ?>
|
||||
<?= $this->formPassword('password', $values, $errors, array('required')) ?><br/>
|
||||
<?= $this->form->label(t('Password'), 'password') ?>
|
||||
<?= $this->form->password('password', $values, $errors, array('required')) ?><br/>
|
||||
|
||||
<?= $this->formLabel(t('Confirmation'), 'confirmation') ?>
|
||||
<?= $this->formPassword('confirmation', $values, $errors, array('required')) ?><br/>
|
||||
<?= $this->form->label(t('Confirmation'), 'confirmation') ?>
|
||||
<?= $this->form->password('confirmation', $values, $errors, array('required')) ?><br/>
|
||||
|
||||
<?= $this->formLabel(t('Default project'), 'default_project_id') ?>
|
||||
<?= $this->formSelect('default_project_id', $projects, $values, $errors) ?><br/>
|
||||
<?= $this->form->label(t('Default project'), 'default_project_id') ?>
|
||||
<?= $this->form->select('default_project_id', $projects, $values, $errors) ?><br/>
|
||||
|
||||
<?= $this->formLabel(t('Timezone'), 'timezone') ?>
|
||||
<?= $this->formSelect('timezone', $timezones, $values, $errors) ?><br/>
|
||||
<?= $this->form->label(t('Timezone'), 'timezone') ?>
|
||||
<?= $this->form->select('timezone', $timezones, $values, $errors) ?><br/>
|
||||
|
||||
<?= $this->formLabel(t('Language'), 'language') ?>
|
||||
<?= $this->formSelect('language', $languages, $values, $errors) ?><br/>
|
||||
<?= $this->form->label(t('Language'), 'language') ?>
|
||||
<?= $this->form->select('language', $languages, $values, $errors) ?><br/>
|
||||
|
||||
<?= $this->formCheckbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?>
|
||||
<?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?>
|
||||
<?= $this->a(t('cancel'), 'user', 'index') ?>
|
||||
<?= $this->url->link(t('cancel'), 'user', 'index') ?>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
<h2><?= t('Email notifications') ?></h2>
|
||||
</div>
|
||||
|
||||
<form method="post" action="<?= $this->u('user', 'notifications', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
<form method="post" action="<?= $this->url->href('user', 'notifications', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
|
||||
<?= $this->formCsrf() ?>
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<?= $this->formCheckbox('notifications_enabled', t('Enable email notifications'), '1', $notifications['notifications_enabled'] == 1) ?><br/>
|
||||
<?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), '1', $notifications['notifications_enabled'] == 1) ?><br/>
|
||||
|
||||
<?php if (! empty($projects)): ?>
|
||||
<p><?= t('I want to receive notifications only for those projects:') ?><br/><br/></p>
|
||||
|
||||
<div class="form-checkbox-group">
|
||||
<?php foreach ($projects as $project_id => $project_name): ?>
|
||||
<?= $this->formCheckbox('projects['.$project_id.']', $project_name, '1', isset($notifications['project_'.$project_id])) ?><br/>
|
||||
<?= $this->form->checkbox('projects['.$project_id.']', $project_name, '1', isset($notifications['project_'.$project_id])) ?><br/>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
@@ -21,6 +21,6 @@
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?>
|
||||
<?= $this->a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
</div>
|
||||
</form>
|
||||
@@ -2,25 +2,25 @@
|
||||
<h2><?= t('Password modification') ?></h2>
|
||||
</div>
|
||||
|
||||
<form method="post" action="<?= $this->u('user', 'password', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
<form method="post" action="<?= $this->url->href('user', 'password', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
|
||||
<?= $this->formHidden('id', $values) ?>
|
||||
<?= $this->formCsrf() ?>
|
||||
<?= $this->form->hidden('id', $values) ?>
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<div class="alert alert-error">
|
||||
<?= $this->formLabel(t('Current password for the user "%s"', $this->getFullname()), 'current_password') ?>
|
||||
<?= $this->formPassword('current_password', $values, $errors) ?><br/>
|
||||
<?= $this->form->label(t('Current password for the user "%s"', $this->user->getFullname()), 'current_password') ?>
|
||||
<?= $this->form->password('current_password', $values, $errors) ?><br/>
|
||||
</div>
|
||||
|
||||
<?= $this->formLabel(t('New password for the user "%s"', $this->getFullname($user)), 'password') ?>
|
||||
<?= $this->formPassword('password', $values, $errors) ?><br/>
|
||||
<?= $this->form->label(t('New password for the user "%s"', $this->user->getFullname($user)), 'password') ?>
|
||||
<?= $this->form->password('password', $values, $errors) ?><br/>
|
||||
|
||||
<?= $this->formLabel(t('Confirmation'), 'confirmation') ?>
|
||||
<?= $this->formPassword('confirmation', $values, $errors) ?><br/>
|
||||
<?= $this->form->label(t('Confirmation'), 'confirmation') ?>
|
||||
<?= $this->form->password('confirmation', $values, $errors) ?><br/>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?>
|
||||
<?= $this->a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<p class="alert alert-info"><?= t('Do you really want to remove this user: "%s"?', $user['name'] ?: $user['username']) ?></p>
|
||||
|
||||
<div class="form-actions">
|
||||
<?= $this->a(t('Yes'), 'user', 'remove', array('user_id' => $user['id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
|
||||
<?= $this->url->link(t('Yes'), 'user', 'remove', array('user_id' => $user['id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
|
||||
<?= t('or') ?>
|
||||
<?= $this->a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -18,8 +18,8 @@
|
||||
<td><?= dt('%B %e, %Y at %k:%M %p', $session['date_creation']) ?></td>
|
||||
<td><?= dt('%B %e, %Y at %k:%M %p', $session['expiration']) ?></td>
|
||||
<td><?= $this->e($session['ip']) ?></td>
|
||||
<td><?= $this->e($this->summary($session['user_agent'])) ?></td>
|
||||
<td><?= $this->a(t('Remove'), 'user', 'removeSession', array('user_id' => $user['id'], 'id' => $session['id']), true) ?></td>
|
||||
<td><?= $this->e($this->text->truncate($session['user_agent'])) ?></td>
|
||||
<td><?= $this->url->link(t('Remove'), 'user', 'removeSession', array('user_id' => $user['id'], 'id' => $session['id']), true) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
|
||||
<div class="listing">
|
||||
<ul class="no-bullet">
|
||||
<li><strong><i class="fa fa-calendar"></i> <?= $this->a(t('iCal feed'), 'ical', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li>
|
||||
<li><strong><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ical', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?= $this->a(t('Disable public access'), 'user', 'share', array('user_id' => $user['id'], 'switch' => 'disable'), true, 'btn btn-red') ?>
|
||||
<?= $this->url->link(t('Disable public access'), 'user', 'share', array('user_id' => $user['id'], 'switch' => 'disable'), true, 'btn btn-red') ?>
|
||||
|
||||
<?php else: ?>
|
||||
<?= $this->a(t('Enable public access'), 'user', 'share', array('user_id' => $user['id'], 'switch' => 'enable'), true, 'btn btn-blue') ?>
|
||||
<?= $this->url->link(t('Enable public access'), 'user', 'share', array('user_id' => $user['id'], 'switch' => 'enable'), true, 'btn btn-blue') ?>
|
||||
<?php endif ?>
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
</div>
|
||||
<ul class="listing">
|
||||
<li><?= t('Default project:') ?> <strong><?= (isset($user['default_project_id']) && isset($projects[$user['default_project_id']])) ? $this->e($projects[$user['default_project_id']]) : t('None') ?></strong></li>
|
||||
<li><?= t('Timezone:') ?> <strong><?= $this->inList($user['timezone'], $timezones) ?></strong></li>
|
||||
<li><?= t('Language:') ?> <strong><?= $this->inList($user['language'], $languages) ?></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('Notifications:') ?> <strong><?= $user['notifications_enabled'] == 1 ? t('Enabled') : t('Disabled') ?></strong></li>
|
||||
</ul>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<div class="listing">
|
||||
<ul class="no-bullet">
|
||||
<li><strong><i class="fa fa-calendar"></i> <?= $this->a(t('iCal feed'), 'ical', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li>
|
||||
<li><strong><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ical', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
@@ -2,75 +2,75 @@
|
||||
<h2><?= t('Information') ?></h2>
|
||||
<ul>
|
||||
<li>
|
||||
<?= $this->a(t('Summary'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('Summary'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php if ($this->userSession->isAdmin()): ?>
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<li>
|
||||
<?= $this->a(t('User dashboard'), 'app', 'dashboard', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('User dashboard'), 'app', 'dashboard', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->a(t('User calendar'), 'user', 'calendar', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('User calendar'), 'user', 'calendar', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php if ($this->userSession->isAdmin() || $this->userSession->isCurrentUser($user['id'])): ?>
|
||||
<?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?>
|
||||
<li>
|
||||
<?= $this->a(t('Time tracking'), 'user', 'timesheet', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('Time tracking'), 'user', 'timesheet', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->a(t('Last logins'), 'user', 'last', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('Last logins'), 'user', 'last', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->a(t('Persistent connections'), 'user', 'sessions', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('Persistent connections'), 'user', 'sessions', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
|
||||
<h2><?= t('Actions') ?></h2>
|
||||
<ul>
|
||||
<?php if ($this->userSession->isAdmin() || $this->userSession->isCurrentUser($user['id'])): ?>
|
||||
<?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?>
|
||||
<li>
|
||||
<?= $this->a(t('Edit profile'), 'user', 'edit', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('Edit profile'), 'user', 'edit', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
|
||||
<?php if ($user['is_ldap_user'] == 0): ?>
|
||||
<li>
|
||||
<?= $this->a(t('Change password'), 'user', 'password', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('Change password'), 'user', 'password', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($this->userSession->isCurrentUser($user['id'])): ?>
|
||||
<?php if ($this->user->isCurrentUser($user['id'])): ?>
|
||||
<li>
|
||||
<?= $this->a(t('Two factor authentication'), 'twofactor', 'index', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('Two factor authentication'), 'twofactor', 'index', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php elseif ($this->userSession->isAdmin() && $user['twofactor_activated'] == 1): ?>
|
||||
<?php elseif ($this->user->isAdmin() && $user['twofactor_activated'] == 1): ?>
|
||||
<li>
|
||||
<?= $this->a(t('Two factor authentication'), 'twofactor', 'disable', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('Two factor authentication'), 'twofactor', 'disable', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<li>
|
||||
<?= $this->a(t('Public access'), 'user', 'share', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('Public access'), 'user', 'share', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->a(t('Email notifications'), 'user', 'notifications', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('Email notifications'), 'user', 'notifications', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->a(t('External accounts'), 'user', 'external', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('External accounts'), 'user', 'external', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($this->userSession->isAdmin()): ?>
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<li>
|
||||
<?= $this->a(t('Hourly rates'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('Hourly rates'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->a(t('Manage timetable'), 'timetable', 'index', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('Manage timetable'), 'timetable', 'index', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($this->userSession->isAdmin() && ! $this->userSession->isCurrentUser($user['id'])): ?>
|
||||
<?php if ($this->user->isAdmin() && ! $this->user->isCurrentUser($user['id'])): ?>
|
||||
<li>
|
||||
<?= $this->a(t('Remove'), 'user', 'remove', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->url->link(t('Remove'), 'user', 'remove', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
</tr>
|
||||
<?php foreach ($subtask_paginator->getCollection() as $record): ?>
|
||||
<tr>
|
||||
<td><?= $this->a($this->e($record['task_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td>
|
||||
<td><?= $this->a($this->e($record['subtask_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td>
|
||||
<td><?= $this->url->link($this->e($record['task_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td>
|
||||
<td><?= $this->url->link($this->e($record['subtask_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td>
|
||||
<td><?= dt('%B %e, %Y at %k:%M %p', $record['start']) ?></td>
|
||||
<td><?= dt('%B %e, %Y at %k:%M %p', $record['end']) ?></td>
|
||||
<td><?= n($record['time_spent']).' '.t('hours') ?></td>
|
||||
|
||||
Reference in New Issue
Block a user