summaryrefslogtreecommitdiff
path: root/app/Templates/board_show.php
blob: d5f31413aacaa4125374d7dd3c871d86979b174a (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
<table id="board" data-project-id="<?= $current_project_id ?>" data-time="<?= time() ?>" data-check-interval="<?= BOARD_CHECK_INTERVAL ?>" data-csrf-token=<?= \Core\Security::getCSRFToken() ?>>
<tr>
    <?php $column_with = round(100 / count($board), 2); ?>
    <?php foreach ($board as $column): ?>
    <th width="<?= $column_with ?>%">
        <div class="board-add-icon">
	    <a href="?controller=task&amp;action=create&amp;project_id=<?= $column['project_id'] ?>&amp;column_id=<?= $column['id'] ?>" title="<?= t('Add a new task') ?>">+</a>
        </div>
        <?= Helper\escape($column['title']) ?>
        <?php if ($column['task_limit']): ?>
            <span title="<?= t('Task limit') ?>" class="task-limit">
                (
                 <span id="task-number-column-<?= $column['id'] ?>"><?= count($column['tasks']) ?></span>
                 /
                 <?= Helper\escape($column['task_limit']) ?>
                )
            </span>
        <?php endif ?>
    </th>
    <?php endforeach ?>
</tr>
<tr>
    <?php foreach ($board as $column): ?>
    <td
        id="column-<?= $column['id'] ?>"
        class="column <?= $column['task_limit'] && count($column['tasks']) > $column['task_limit'] ? 'task-limit-warning' : '' ?>"
        data-column-id="<?= $column['id'] ?>"
        data-task-limit="<?= $column['task_limit'] ?>"
        >
        <?php foreach ($column['tasks'] as $task): ?>
        <div class="task-board draggable-item task-<?= $task['color_id'] ?>"
             data-task-id="<?= $task['id'] ?>"
             data-owner-id="<?= $task['owner_id'] ?>"
             data-category-id="<?= $task['category_id'] ?>"
             data-due-date="<?= $task['date_due'] ?>"
             title="<?= t('View this task') ?>">

            <?= Helper\template('board_task', array('task' => $task, 'categories' => $categories)) ?>

        </div>
        <?php endforeach ?>
    </td>
    <?php endforeach ?>
</tr>
</table>