summaryrefslogtreecommitdiff
path: root/app/Template/board/swimlane.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-12-26 17:43:13 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-12-26 17:43:13 -0500
commitcf821e117ce8b937cff7f386a107aaa81ba6bf9b (patch)
tree6075f4d1c5192f45e8b13479bc67f973b046fdf2 /app/Template/board/swimlane.php
parent2b27d986b374923a266c132ac0a67fb515d30d1c (diff)
Add swimlanes
Diffstat (limited to 'app/Template/board/swimlane.php')
-rw-r--r--app/Template/board/swimlane.php59
1 files changed, 59 insertions, 0 deletions
diff --git a/app/Template/board/swimlane.php b/app/Template/board/swimlane.php
new file mode 100644
index 00000000..e48eb6f1
--- /dev/null
+++ b/app/Template/board/swimlane.php
@@ -0,0 +1,59 @@
+<tr>
+ <?php if (! $hide_swimlane): ?>
+ <td width="10%"></td>
+ <?php endif ?>
+
+ <?php foreach ($swimlane['columns'] as $column): ?>
+ <th>
+ <?php if (! $not_editable): ?>
+ <div class="board-add-icon">
+ <?= Helper\a('+', 'task', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'task-creation-popover', t('Add a new task')) ?>
+ </div>
+ <?php endif ?>
+
+ <?= Helper\escape($column['title']) ?>
+
+ <?php if ($column['task_limit']): ?>
+ <span title="<?= t('Task limit') ?>" class="task-limit">
+ (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>/<?= Helper\escape($column['task_limit']) ?>)
+ </span>
+ <?php else: ?>
+ <span title="<?= t('Task count') ?>" class="task-count">
+ (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>)
+ </span>
+ <?php endif ?>
+ </th>
+ <?php endforeach ?>
+</tr>
+<tr>
+ <?php if (! $hide_swimlane): ?>
+ <th class="board-swimlane-title">
+ <?= Helper\escape($swimlane['name']) ?>
+ </th>
+ <?php endif ?>
+
+ <?php foreach ($swimlane['columns'] as $column): ?>
+
+ <?php if ($not_editable): ?>
+ <td>
+ <?php else: ?>
+ <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-swimlane-id="<?= $swimlane['id'] ?>"
+ data-task-limit="<?= $column['task_limit'] ?>">
+ <?php endif ?>
+
+ <?php foreach ($column['tasks'] as $task): ?>
+ <?= Helper\template('board/task', array(
+ 'project' => $project,
+ 'task' => $task,
+ 'categories' => $categories,
+ 'board_highlight_period' => $board_highlight_period,
+ 'not_editable' => $not_editable,
+ )) ?>
+ <?php endforeach ?>
+ </td>
+ <?php endforeach ?>
+</tr> \ No newline at end of file