blob: 0fc2468c62ff4057a85a2a4d33c4dd888748bfb9 (
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
72
|
<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)): ?>
<p class="alert"><?= t('No project') ?></p>
<?php else: ?>
<table>
<tr>
<th><?= t('Project') ?></th>
<th><?= t('Status') ?></th>
<th><?= t('Tasks') ?></th>
<th><?= t('Board') ?></th>
<?php if ($_SESSION['user']['is_admin'] == 1): ?>
<th><?= t('Actions') ?></th>
<?php endif ?>
</tr>
<?php foreach ($projects as $project): ?>
<tr>
<td>
<a href="?controller=board&action=show&project_id=<?= $project['id'] ?>"><?= Helper\escape($project['name']) ?></a>
</td>
<td>
<?= $project['is_active'] ? t('Active') : t('Inactive') ?>
</td>
<td>
<?= t('%d tasks on the board', $project['nb_active_tasks']) ?>, <?= t('%d tasks in total', $project['nb_tasks']) ?>
</td>
<td>
<ul>
<?php foreach ($project['columns'] as $column): ?>
<li>
<?= Helper\escape($column['title']) ?> (<?= $column['nb_active_tasks'] ?>)
</li>
<?php endforeach ?>
</ul>
</td>
<?php if ($_SESSION['user']['is_admin'] == 1): ?>
<td>
<ul>
<li>
<a href="?controller=project&action=edit&project_id=<?= $project['id'] ?>"><?= t('Edit project') ?></a>
</li>
<li>
<a href="?controller=board&action=edit&project_id=<?= $project['id'] ?>"><?= t('Edit board') ?></a>
</li>
<li>
<?php if ($project['is_active']): ?>
<a href="?controller=project&action=disable&project_id=<?= $project['id'] ?>"><?= t('Disable') ?></a>
<?php else: ?>
<a href="?controller=project&action=enable&project_id=<?= $project['id'] ?>"><?= t('Enable') ?></a>
<?php endif ?>
</li>
<li>
<a href="?controller=project&action=confirm&project_id=<?= $project['id'] ?>"><?= t('Remove') ?></a>
</li>
</ul>
</td>
<?php endif ?>
</tr>
<?php endforeach ?>
</table>
<?php endif ?>
</section>
</section>
|