summaryrefslogtreecommitdiff
path: root/app/Template/board/table_swimlane.php
blob: be401633bc8da3d7681bc9a6a365f456a68d0a5e (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<tr id="swimlane-<?= $swimlane['id'] ?>">
    <!-- swimlane toggle -->
    <?php if (! $hide_swimlane): ?>
       <th class="board-swimlane-header">
           <?php if (! $not_editable): ?>
                <a href="#" class="board-swimlane-toggle" data-swimlane-id="<?= $swimlane['id'] ?>">
                    <i class="fa fa-minus-circle hide-icon-swimlane-<?= $swimlane['id'] ?>"></i>
                    <i class="fa fa-plus-circle show-icon-swimlane-<?= $swimlane['id'] ?>" style="display: none"></i>
                </a>
                <span class="board-swimlane-toggle-title show-icon-swimlane-<?= $swimlane['id'] ?>"><?= $this->e($swimlane['name']) ?></span>
           <?php endif ?>
        </th>
    <?php endif ?>

    <!-- column header title -->
    <?php foreach ($swimlane['columns'] as $column): ?>
    <th class="board-column-header board-column-header-<?= $column['id'] ?>" data-column-id="<?= $column['id'] ?>">
        <div class="board-column-collapsed">
            <span title="<?= t('Task count') ?>" class="board-column-header-task-count" title="<?= t('Show this column') ?>">
                <span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>
            </span>
        </div>
        <div class="board-column-expanded">
            <?php if (! $not_editable): ?>
                <div class="board-add-icon">
                    <?= $this->url->link('+', 'taskcreation', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover', t('Add a new task')) ?>
                </div>
            <?php endif ?>

            <span class="board-column-title" data-column-id="<?= $column['id'] ?>" title="<?= t('Hide this column') ?>">
                <?= $this->e($column['title']) ?>
            </span>

            <?php if (! $not_editable && ! empty($column['description'])): ?>
                <span class="tooltip pull-right" title='<?= $this->e($this->text->markdown($column['description'])) ?>'>
                    <i class="fa fa-info-circle"></i>
                </span>
            <?php endif ?>

            <?php if (! empty($column['score'])): ?>
                <span class="pull-right" title="<?= t('Score') ?>">
                    <?= $column['score'] ?>&nbsp;
                </span>
            <?php endif ?>

            <?php if ($column['task_limit']): ?>
                <span title="<?= t('Task limit') ?>">
                    (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>/<?= $this->e($column['task_limit']) ?>)
                </span>
            <?php else: ?>
                <span title="<?= t('Task count') ?>" class="board-column-header-task-count">
                    (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>)
                </span>
            <?php endif ?>
        </div>
    </th>
    <?php endforeach ?>
</tr>
<tr class="board-swimlane swimlane-row-<?= $swimlane['id'] ?>">

    <!-- swimlane title -->
    <?php if (! $hide_swimlane): ?>
        <th class="board-swimlane-title">
            <?= $this->e($swimlane['name']) ?>

            <div title="<?= t('Task count') ?>" class="board-column-header-task-count">
                (<span><?= $swimlane['nb_tasks'] ?></span>)
            </div>
        </th>
    <?php endif ?>

    <!-- task list -->
    <?php foreach ($swimlane['columns'] as $column): ?>
        <td class="board-column-<?= $column['id'] ?> <?= $column['task_limit'] && $column['nb_tasks'] > $column['task_limit'] ? 'board-task-list-limit' : '' ?>">
            <div class="board-task-list board-column-expanded" data-column-id="<?= $column['id'] ?>" data-swimlane-id="<?= $swimlane['id'] ?>" data-task-limit="<?= $column['task_limit'] ?>">
                <?php foreach ($column['tasks'] as $task): ?>
                    <?= $this->render($not_editable ? 'board/task_public' : 'board/task_private', array(
                        'project' => $project,
                        'task' => $task,
                        'board_highlight_period' => $board_highlight_period,
                        'not_editable' => $not_editable,
                    )) ?>
                <?php endforeach ?>
            </div>
            <div class="board-column-collapsed">
                <div class="board-rotation-wrapper">
                    <div class="board-column-title board-rotation" data-column-id="<?= $column['id'] ?>" title="<?= t('Show this column') ?>">
                        <?= $this->e($column['title']) ?>
                    </div>
                </div>
            </div>
        </td>
    <?php endforeach ?>
</tr>