Minor improvements
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<h2><?= t('Projects') ?><span id="page-counter"> (<?= $nb_projects ?>)</span></h2>
|
||||
<?php if ($_SESSION['user']['is_admin'] == 1): ?>
|
||||
<ul>
|
||||
<li><a href="?controller=project&action=create"><?= t('New project') ?></a></li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<section>
|
||||
<?php if (empty($projects)): ?>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Edit user') ?></h2>
|
||||
<ul>
|
||||
<li><a href="?action=users"><?= t('All users') ?></a></li>
|
||||
<li><a href="?controller=user"><?= t('All users') ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<section>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<h2><?= t('Users') ?><span id="page-counter"> (<?= $nb_users ?>)</span></h2>
|
||||
<?php if ($_SESSION['user']['is_admin'] == 1): ?>
|
||||
<ul>
|
||||
<li><a href="?controller=user&action=create"><?= t('New user') ?></a></li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<section>
|
||||
<?php if (empty($users)): ?>
|
||||
@@ -14,9 +16,7 @@
|
||||
<th><?= t('Username') ?></th>
|
||||
<th><?= t('Administrator') ?></th>
|
||||
<th><?= t('Default Project') ?></th>
|
||||
<?php if ($_SESSION['user']['is_admin'] == 1): ?>
|
||||
<th><?= t('Actions') ?></th>
|
||||
<?php endif ?>
|
||||
<th><?= t('Actions') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($users as $user): ?>
|
||||
<tr>
|
||||
@@ -29,15 +29,17 @@
|
||||
<td>
|
||||
<?= $projects[$user['default_project_id']] ?>
|
||||
</td>
|
||||
<?php if ($_SESSION['user']['is_admin'] == 1): ?>
|
||||
<td>
|
||||
<a href="?controller=user&action=edit&user_id=<?= $user['id'] ?>"><?= t('edit') ?></a>
|
||||
<?php if (count($users) > 1): ?>
|
||||
<?= t('or') ?>
|
||||
<a href="?controller=user&action=confirm&user_id=<?= $user['id'] ?>"><?= t('remove') ?></a>
|
||||
<?php if ($_SESSION['user']['is_admin'] == 1 || $_SESSION['user']['id'] == $user['id']): ?>
|
||||
<a href="?controller=user&action=edit&user_id=<?= $user['id'] ?>"><?= t('edit') ?></a>
|
||||
<?php endif ?>
|
||||
<?php if ($_SESSION['user']['is_admin'] == 1): ?>
|
||||
<?php if (count($users) > 1): ?>
|
||||
<?= t('or') ?>
|
||||
<a href="?controller=user&action=confirm&user_id=<?= $user['id'] ?>"><?= t('remove') ?></a>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<?php endif ?>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user