summaryrefslogtreecommitdiff
path: root/app/Template/board
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-09-26 20:41:14 -0400
committerFrederic Guillot <fred@kanboard.net>2015-09-26 20:41:14 -0400
commit6c03925f23a91722471f33d3561543f4180f2b42 (patch)
treeb4cb8461fd83dcb4f52db765a37dffbb783a8887 /app/Template/board
parent625a84d174cd94c7e772ed8cb4c95a0b7aeff140 (diff)
Show number of tasks for each column across all swimlanes
Diffstat (limited to 'app/Template/board')
-rw-r--r--app/Template/board/table_column.php12
-rw-r--r--app/Template/board/table_container.php3
-rw-r--r--app/Template/board/table_tasks.php5
3 files changed, 11 insertions, 9 deletions
diff --git a/app/Template/board/table_column.php b/app/Template/board/table_column.php
index bfb18a26..de7ca5e6 100644
--- a/app/Template/board/table_column.php
+++ b/app/Template/board/table_column.php
@@ -7,7 +7,7 @@
<!-- column in collapsed mode -->
<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 id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_column_tasks'] ?></span>
</span>
</div>
@@ -35,13 +35,13 @@
</span>
<?php endif ?>
+ <span title="<?= t('Total number of tasks in this column across all swimlanes') ?>" class="board-column-header-task-count">
+ (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_column_tasks'] ?></span>)
+ </span>
+
<?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 id="task-number-column-<?= $column['id'] ?>"><?= $this->e($column['task_limit']) ?></span>)
</span>
<?php endif ?>
</div>
diff --git a/app/Template/board/table_container.php b/app/Template/board/table_container.php
index b20426a6..fb9212a7 100644
--- a/app/Template/board/table_container.php
+++ b/app/Template/board/table_container.php
@@ -13,7 +13,6 @@
>
<?php endif ?>
- <?php $nb_swimlanes = count($swimlanes) ?>
<?php foreach ($swimlanes as $index => $swimlane): ?>
<?php if (empty($swimlane['columns'])): ?>
<p class="alert alert-error"><?= t('There is no column in your project!') ?></p>
@@ -26,7 +25,7 @@
)) ?>
<?php endif ?>
- <?php if ($nb_swimlanes > 1): ?>
+ <?php if ($swimlane['nb_swimlanes'] > 1): ?>
<?= $this->render('board/table_swimlane', array(
'project' => $project,
'swimlane' => $swimlane,
diff --git a/app/Template/board/table_tasks.php b/app/Template/board/table_tasks.php
index f17e1132..edb4d323 100644
--- a/app/Template/board/table_tasks.php
+++ b/app/Template/board/table_tasks.php
@@ -1,7 +1,10 @@
<!-- task row -->
<tr class="board-swimlane swimlane-row-<?= $swimlane['id'] ?>">
<?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' : '' ?>">
+ <td class="
+ board-column-<?= $column['id'] ?>
+ <?= $column['task_limit'] > 0 && $column['nb_tasks'] > $column['task_limit'] ? 'board-task-list-limit' : '' ?>
+ ">
<!-- tasks list -->
<div class="board-task-list board-column-expanded" data-column-id="<?= $column['id'] ?>" data-swimlane-id="<?= $swimlane['id'] ?>" data-task-limit="<?= $column['task_limit'] ?>">