blob: 7e9197b5157642591ef7faa26861259dae7e2d47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
<section id="main">
<div class="page-header">
<h2><?= t('Users') ?><span id="page-counter"> (<?= $nb_users ?>)</span></h2>
<?php if (Helper\is_admin()): ?>
<ul>
<li><a href="?controller=user&action=create"><?= t('New user') ?></a></li>
</ul>
<?php endif ?>
</div>
<section>
<?php if (empty($users)): ?>
<p class="alert"><?= t('No user') ?></p>
<?php else: ?>
<table>
<tr>
<th><?= t('Id') ?></th>
<th><?= t('Username') ?></th>
<th><?= t('Name') ?></th>
<th><?= t('Email') ?></th>
<th><?= t('Administrator') ?></th>
<th><?= t('Default project') ?></th>
<th><?= t('Notifications') ?></th>
<th><?= t('External accounts') ?></th>
<th><?= t('Account type') ?></th>
</tr>
<?php foreach ($users as $user): ?>
<tr>
<td>
<a href="?controller=user&action=show&user_id=<?= $user['id'] ?>">#<?= $user['id'] ?></a>
</td>
<td>
<a href="?controller=user&action=show&user_id=<?= $user['id'] ?>"><?= Helper\escape($user['username']) ?></a>
</td>
<td>
<?= Helper\escape($user['name']) ?>
</td>
<td>
<?= Helper\escape($user['email']) ?>
</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'); ?>
</td>
<td>
<?php if ($user['notifications_enabled'] == 1): ?>
<?= t('Enabled') ?>
<?php else: ?>
<?= t('Disabled') ?>
<?php endif ?>
</td>
<td>
<ul class="no-bullet">
<?php if ($user['google_id']): ?>
<li><?= t('Google account linked') ?></li>
<?php endif ?>
<?php if ($user['github_id']): ?>
<li><?= t('Github account linked') ?></li>
<?php endif ?>
</ul>
</td>
<td>
<?= $user['is_ldap_user'] ? t('Remote') : t('Local') ?>
</td>
</tr>
<?php endforeach ?>
</table>
<?php endif ?>
</section>
</section>
|