Template helpers refactoring
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Edit user') ?></h2>
|
||||
</div>
|
||||
<form method="post" action="<?= Helper\u('user', 'edit', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
<form method="post" action="<?= $this->u('user', 'edit', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= $this->formCsrf() ?>
|
||||
|
||||
<?= Helper\form_hidden('id', $values) ?>
|
||||
<?= Helper\form_hidden('is_ldap_user', $values) ?>
|
||||
<?= $this->formHidden('id', $values) ?>
|
||||
<?= $this->formHidden('is_ldap_user', $values) ?>
|
||||
|
||||
<?= Helper\form_label(t('Username'), 'username') ?>
|
||||
<?= Helper\form_text('username', $values, $errors, array('required', $values['is_ldap_user'] == 1 ? 'readonly' : '')) ?><br/>
|
||||
<?= $this->formLabel(t('Username'), 'username') ?>
|
||||
<?= $this->formText('username', $values, $errors, array('required', $values['is_ldap_user'] == 1 ? 'readonly' : '')) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Name'), 'name') ?>
|
||||
<?= Helper\form_text('name', $values, $errors) ?><br/>
|
||||
<?= $this->formLabel(t('Name'), 'name') ?>
|
||||
<?= $this->formText('name', $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Email'), 'email') ?>
|
||||
<?= Helper\form_email('email', $values, $errors) ?><br/>
|
||||
<?= $this->formLabel(t('Email'), 'email') ?>
|
||||
<?= $this->formEmail('email', $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Default project'), 'default_project_id') ?>
|
||||
<?= Helper\form_select('default_project_id', $projects, $values, $errors) ?><br/>
|
||||
<?= $this->formLabel(t('Default project'), 'default_project_id') ?>
|
||||
<?= $this->formSelect('default_project_id', $projects, $values, $errors) ?><br/>
|
||||
|
||||
<?php if (Helper\is_admin()): ?>
|
||||
<?= Helper\form_checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?><br/>
|
||||
<?php if ($this->acl->isAdminUser()): ?>
|
||||
<?= $this->formCheckbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?><br/>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?>
|
||||
<?= Helper\a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->a(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 (Helper\is_current_user($user['id'])): ?>
|
||||
<?php if ($this->acl->isCurrentUser($user['id'])): ?>
|
||||
<?php if (empty($user['google_id'])): ?>
|
||||
<?= Helper\a(t('Link my Google Account'), 'user', 'google', array(), true) ?>
|
||||
<?= $this->a(t('Link my Google Account'), 'user', 'google', array(), true) ?>
|
||||
<?php else: ?>
|
||||
<?= Helper\a(t('Unlink my Google Account'), 'user', 'unlinkGoogle', array(), true) ?>
|
||||
<?= $this->a(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 (Helper\is_current_user($user['id'])): ?>
|
||||
<?php if ($this->acl->isCurrentUser($user['id'])): ?>
|
||||
<?php if (empty($user['github_id'])): ?>
|
||||
<?= Helper\a(t('Link my GitHub Account'), 'user', 'github', array(), true) ?>
|
||||
<?= $this->a(t('Link my GitHub Account'), 'user', 'github', array(), true) ?>
|
||||
<?php else: ?>
|
||||
<?= Helper\a(t('Unlink my GitHub Account'), 'user', 'unlinkGitHub', array(), true) ?>
|
||||
<?= $this->a(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 (Helper\is_admin()): ?>
|
||||
<?php if ($this->acl->isAdminUser()): ?>
|
||||
<ul>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= Helper\a(t('New user'), 'user', 'create') ?></li>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->a(t('New user'), 'user', 'create') ?></li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
@@ -12,35 +12,35 @@
|
||||
<?php else: ?>
|
||||
<table>
|
||||
<tr>
|
||||
<th><?= Helper\order(t('Id'), 'id', $pagination) ?></th>
|
||||
<th><?= Helper\order(t('Username'), 'username', $pagination) ?></th>
|
||||
<th><?= Helper\order(t('Name'), 'name', $pagination) ?></th>
|
||||
<th><?= Helper\order(t('Email'), 'email', $pagination) ?></th>
|
||||
<th><?= Helper\order(t('Administrator'), 'is_admin', $pagination) ?></th>
|
||||
<th><?= Helper\order(t('Default project'), 'default_project_id', $pagination) ?></th>
|
||||
<th><?= Helper\order(t('Notifications'), 'notifications_enabled', $pagination) ?></th>
|
||||
<th><?= $this->order(t('Id'), 'id', $pagination) ?></th>
|
||||
<th><?= $this->order(t('Username'), 'username', $pagination) ?></th>
|
||||
<th><?= $this->order(t('Name'), 'name', $pagination) ?></th>
|
||||
<th><?= $this->order(t('Email'), 'email', $pagination) ?></th>
|
||||
<th><?= $this->order(t('Administrator'), 'is_admin', $pagination) ?></th>
|
||||
<th><?= $this->order(t('Default project'), 'default_project_id', $pagination) ?></th>
|
||||
<th><?= $this->order(t('Notifications'), 'notifications_enabled', $pagination) ?></th>
|
||||
<th><?= t('External accounts') ?></th>
|
||||
<th><?= Helper\order(t('Account type'), 'is_ldap_user', $pagination) ?></th>
|
||||
<th><?= $this->order(t('Account type'), 'is_ldap_user', $pagination) ?></th>
|
||||
</tr>
|
||||
<?php foreach ($users as $user): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?= Helper\a('#'.$user['id'], 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->a('#'.$user['id'], 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= Helper\a(Helper\escape($user['username']), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->a($this->e($user['username']), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= Helper\escape($user['name']) ?>
|
||||
<?= $this->e($user['name']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:<?= Helper\escape($user['email']) ?>"><?= Helper\escape($user['email']) ?></a>
|
||||
<a href="mailto:<?= $this->e($user['email']) ?>"><?= $this->e($user['email']) ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<?= $user['is_admin'] ? t('Yes') : t('No') ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= (isset($user['default_project_id']) && isset($projects[$user['default_project_id']])) ? Helper\escape($projects[$user['default_project_id']]) : t('None'); ?>
|
||||
<?= (isset($user['default_project_id']) && isset($projects[$user['default_project_id']])) ? $this->e($projects[$user['default_project_id']]) : t('None'); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($user['notifications_enabled'] == 1): ?>
|
||||
@@ -66,7 +66,7 @@
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
||||
<?= Helper\paginate($pagination) ?>
|
||||
<?= $this->paginate($pagination) ?>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
<?php foreach($last_logins as $login): ?>
|
||||
<tr>
|
||||
<td><?= dt('%B %e, %Y at %k:%M %p', $login['date_creation']) ?></td>
|
||||
<td><?= Helper\escape($login['auth_type']) ?></td>
|
||||
<td><?= Helper\escape($login['ip']) ?></td>
|
||||
<td><?= Helper\escape(Helper\summary($login['user_agent'])) ?></td>
|
||||
<td><?= $this->e($login['auth_type']) ?></td>
|
||||
<td><?= $this->e($login['ip']) ?></td>
|
||||
<td><?= $this->e($this->summary($login['user_agent'])) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<?php if (Helper\is_admin()): ?>
|
||||
<?php if ($this->acl->isAdminUser()): ?>
|
||||
<ul>
|
||||
<li><i class="fa fa-user fa-fw"></i><?= Helper\a(t('All users'), 'user', 'index') ?></li>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= Helper\a(t('New user'), 'user', 'create') ?></li>
|
||||
<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>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<section class="sidebar-container" id="user-section">
|
||||
|
||||
<?= Helper\template('user/sidebar', array('user' => $user)) ?>
|
||||
<?= $this->render('user/sidebar', array('user' => $user)) ?>
|
||||
|
||||
<div class="sidebar-content">
|
||||
<?= $user_content_for_layout ?>
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
<div class="form-login">
|
||||
|
||||
<?php if (isset($errors['login'])): ?>
|
||||
<p class="alert alert-error"><?= Helper\escape($errors['login']) ?></p>
|
||||
<p class="alert alert-error"><?= $this->e($errors['login']) ?></p>
|
||||
<?php endif ?>
|
||||
|
||||
<form method="post" action="<?= Helper\u('user', 'check', array('redirect_query' => urlencode($redirect_query))) ?>">
|
||||
<form method="post" action="<?= $this->u('user', 'check', array('redirect_query' => urlencode($redirect_query))) ?>">
|
||||
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= $this->formCsrf() ?>
|
||||
|
||||
<?= Helper\form_label(t('Username'), 'username') ?>
|
||||
<?= Helper\form_text('username', $values, $errors, array('autofocus', 'required')) ?><br/>
|
||||
<?= $this->formLabel(t('Username'), 'username') ?>
|
||||
<?= $this->formText('username', $values, $errors, array('autofocus', 'required')) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Password'), 'password') ?>
|
||||
<?= Helper\form_password('password', $values, $errors, array('required')) ?>
|
||||
<?= $this->formLabel(t('Password'), 'password') ?>
|
||||
<?= $this->formPassword('password', $values, $errors, array('required')) ?>
|
||||
|
||||
<?= Helper\form_checkbox('remember_me', t('Remember Me'), 1) ?><br/>
|
||||
<?= $this->formCheckbox('remember_me', t('Remember Me'), 1) ?><br/>
|
||||
|
||||
<?php if (GOOGLE_AUTH): ?>
|
||||
<?= Helper\a(t('Login with my Google Account'), 'user', 'google') ?>
|
||||
<?= $this->a(t('Login with my Google Account'), 'user', 'google') ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (GITHUB_AUTH): ?>
|
||||
<?= Helper\a(t('Login with my GitHub Account'), 'user', 'gitHub') ?>
|
||||
<?= $this->a(t('Login with my GitHub Account'), 'user', 'gitHub') ?>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<ul>
|
||||
<li><i class="fa fa-user fa-fw"></i><?= Helper\a(t('All users'), 'user', 'index') ?></li>
|
||||
<li><i class="fa fa-user fa-fw"></i><?= $this->a(t('All users'), 'user', 'index') ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<section>
|
||||
<form method="post" action="<?= Helper\u('user', 'save') ?>" autocomplete="off">
|
||||
<form method="post" action="<?= $this->u('user', 'save') ?>" autocomplete="off">
|
||||
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= $this->formCsrf() ?>
|
||||
|
||||
<?= Helper\form_label(t('Username'), 'username') ?>
|
||||
<?= Helper\form_text('username', $values, $errors, array('autofocus', 'required')) ?><br/>
|
||||
<?= $this->formLabel(t('Username'), 'username') ?>
|
||||
<?= $this->formText('username', $values, $errors, array('autofocus', 'required')) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Name'), 'name') ?>
|
||||
<?= Helper\form_text('name', $values, $errors) ?><br/>
|
||||
<?= $this->formLabel(t('Name'), 'name') ?>
|
||||
<?= $this->formText('name', $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Email'), 'email') ?>
|
||||
<?= Helper\form_email('email', $values, $errors) ?><br/>
|
||||
<?= $this->formLabel(t('Email'), 'email') ?>
|
||||
<?= $this->formEmail('email', $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Password'), 'password') ?>
|
||||
<?= Helper\form_password('password', $values, $errors, array('required')) ?><br/>
|
||||
<?= $this->formLabel(t('Password'), 'password') ?>
|
||||
<?= $this->formPassword('password', $values, $errors, array('required')) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Confirmation'), 'confirmation') ?>
|
||||
<?= Helper\form_password('confirmation', $values, $errors, array('required')) ?><br/>
|
||||
<?= $this->formLabel(t('Confirmation'), 'confirmation') ?>
|
||||
<?= $this->formPassword('confirmation', $values, $errors, array('required')) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Default project'), 'default_project_id') ?>
|
||||
<?= Helper\form_select('default_project_id', $projects, $values, $errors) ?><br/>
|
||||
<?= $this->formLabel(t('Default project'), 'default_project_id') ?>
|
||||
<?= $this->formSelect('default_project_id', $projects, $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?>
|
||||
<?= $this->formCheckbox('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') ?>
|
||||
<?= Helper\a(t('cancel'), 'user', 'index') ?>
|
||||
<?= $this->a(t('cancel'), 'user', 'index') ?>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
<h2><?= t('Email notifications') ?></h2>
|
||||
</div>
|
||||
|
||||
<form method="post" action="<?= Helper\u('user', 'notifications', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
<form method="post" action="<?= $this->u('user', 'notifications', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= $this->formCsrf() ?>
|
||||
|
||||
<?= Helper\form_checkbox('notifications_enabled', t('Enable email notifications'), '1', $notifications['notifications_enabled'] == 1) ?><br/>
|
||||
<?= $this->formCheckbox('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): ?>
|
||||
<?= Helper\form_checkbox('projects['.$project_id.']', $project_name, '1', isset($notifications['project_'.$project_id])) ?><br/>
|
||||
<?= $this->formCheckbox('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') ?>
|
||||
<?= Helper\a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->a(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="<?= Helper\u('user', 'password', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
<form method="post" action="<?= $this->u('user', 'password', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
|
||||
<?= Helper\form_hidden('id', $values) ?>
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= $this->formHidden('id', $values) ?>
|
||||
<?= $this->formCsrf() ?>
|
||||
|
||||
<div class="alert alert-error">
|
||||
<?= Helper\form_label(t('Current password for the user "%s"', Helper\get_username()), 'current_password') ?>
|
||||
<?= Helper\form_password('current_password', $values, $errors) ?><br/>
|
||||
<?= $this->formLabel(t('Current password for the user "%s"', $this->getFullname()), 'current_password') ?>
|
||||
<?= $this->formPassword('current_password', $values, $errors) ?><br/>
|
||||
</div>
|
||||
|
||||
<?= Helper\form_label(t('New password for the user "%s"', Helper\get_username($user)), 'password') ?>
|
||||
<?= Helper\form_password('password', $values, $errors) ?><br/>
|
||||
<?= $this->formLabel(t('New password for the user "%s"', $this->getFullname($user)), 'password') ?>
|
||||
<?= $this->formPassword('password', $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Confirmation'), 'confirmation') ?>
|
||||
<?= Helper\form_password('confirmation', $values, $errors) ?><br/>
|
||||
<?= $this->formLabel(t('Confirmation'), 'confirmation') ?>
|
||||
<?= $this->formPassword('confirmation', $values, $errors) ?><br/>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?>
|
||||
<?= Helper\a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->a(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">
|
||||
<?= Helper\a(t('Yes'), 'user', 'remove', array('user_id' => $user['id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
|
||||
<?= $this->a(t('Yes'), 'user', 'remove', array('user_id' => $user['id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
|
||||
<?= t('or') ?>
|
||||
<?= Helper\a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -17,9 +17,9 @@
|
||||
<tr>
|
||||
<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><?= Helper\escape($session['ip']) ?></td>
|
||||
<td><?= Helper\escape(Helper\summary($session['user_agent'])) ?></td>
|
||||
<td><?= Helper\a(t('Remove'), 'user', 'removeSession', array('user_id' => $user['id'], 'id' => $session['id']), true) ?></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>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<h2><?= t('Summary') ?></h2>
|
||||
</div>
|
||||
<ul class="listing">
|
||||
<li><?= t('Username:') ?> <strong><?= Helper\escape($user['username']) ?></strong></li>
|
||||
<li><?= t('Name:') ?> <strong><?= Helper\escape($user['name']) ?></strong></li>
|
||||
<li><?= t('Email:') ?> <strong><?= Helper\escape($user['email']) ?></strong></li>
|
||||
<li><?= t('Default project:') ?> <strong><?= (isset($user['default_project_id']) && isset($projects[$user['default_project_id']])) ? Helper\escape($projects[$user['default_project_id']]) : t('None'); ?></strong></li>
|
||||
<li><?= t('Username:') ?> <strong><?= $this->e($user['username']) ?></strong></li>
|
||||
<li><?= t('Name:') ?> <strong><?= $this->e($user['name']) ?></strong></li>
|
||||
<li><?= t('Email:') ?> <strong><?= $this->e($user['email']) ?></strong></li>
|
||||
<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('Notifications:') ?> <strong><?= $user['notifications_enabled'] == 1 ? t('Enabled') : t('Disabled') ?></strong></li>
|
||||
<li><?= t('Group:') ?> <strong><?= $user['is_admin'] ? t('Administrator') : t('Regular user') ?></strong></li>
|
||||
<li><?= t('Account type:') ?> <strong><?= $user['is_ldap_user'] ? t('Remote') : t('Local') ?></strong></li>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
<h2><?= t('Actions') ?></h2>
|
||||
<ul>
|
||||
<li>
|
||||
<?= Helper\a(t('Summary'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->a(t('Summary'), 'user', 'show', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
|
||||
<?php if (Helper\is_admin() || Helper\is_current_user($user['id'])): ?>
|
||||
<?php if ($this->acl->isAdminUser() || $this->acl->isCurrentUser($user['id'])): ?>
|
||||
<li>
|
||||
<?= Helper\a(t('Edit profile'), 'user', 'edit', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->a(t('Edit profile'), 'user', 'edit', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
|
||||
<?php if ($user['is_ldap_user'] == 0): ?>
|
||||
<li>
|
||||
<?= Helper\a(t('Change password'), 'user', 'password', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->a(t('Change password'), 'user', 'password', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<li>
|
||||
<?= Helper\a(t('Email notifications'), 'user', 'notifications', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->a(t('Email notifications'), 'user', 'notifications', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= Helper\a(t('External accounts'), 'user', 'external', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->a(t('External accounts'), 'user', 'external', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= Helper\a(t('Last logins'), 'user', 'last', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->a(t('Last logins'), 'user', 'last', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= Helper\a(t('Persistent connections'), 'user', 'sessions', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->a(t('Persistent connections'), 'user', 'sessions', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (Helper\is_admin() && ! Helper\is_current_user($user['id'])): ?>
|
||||
<?php if ($this->acl->isAdminUser() && ! $this->acl->isCurrentUser($user['id'])): ?>
|
||||
<li>
|
||||
<?= Helper\a(t('Remove'), 'user', 'remove', array('user_id' => $user['id'])) ?>
|
||||
<?= $this->a(t('Remove'), 'user', 'remove', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user