diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-02-19 17:28:26 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-02-19 17:28:32 -0500 |
commit | b5c56d4239c1f4e5c1b7894803c899b595797a26 (patch) | |
tree | 641670dde78bb03d9b3ae804fe24930d84c9eaa4 /app/Template/task_list | |
parent | 3b3e8033696e408e699b911c042361d62ce7b7ac (diff) |
Display task count in table header
Diffstat (limited to 'app/Template/task_list')
-rw-r--r-- | app/Template/task_list/header.php | 12 | ||||
-rw-r--r-- | app/Template/task_list/listing.php | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/app/Template/task_list/header.php b/app/Template/task_list/header.php new file mode 100644 index 00000000..c0f9df96 --- /dev/null +++ b/app/Template/task_list/header.php @@ -0,0 +1,12 @@ +<div class="task-list-header"> + <div class="task-list-header-count"> + <?php if ($paginator->getTotal() > 1): ?> + <?= t('%d tasks', $paginator->getTotal()) ?> + <?php else: ?> + <?= t('%d task', $paginator->getTotal()) ?> + <?php endif ?> + </div> + <div class="task-list-header-menu"> + <?= $this->render('task_list/sort_menu', array('paginator' => $paginator)) ?> + </div> +</div>
\ No newline at end of file diff --git a/app/Template/task_list/listing.php b/app/Template/task_list/listing.php index 76803a5c..793c13d4 100644 --- a/app/Template/task_list/listing.php +++ b/app/Template/task_list/listing.php @@ -5,9 +5,7 @@ <p class="alert"><?= t('No tasks found.') ?></p> <?php elseif (! $paginator->isEmpty()): ?> <div class="task-list"> - <div class="task-list-header"> - <?= $this->render('task_list/sort_menu', array('paginator' => $paginator)) ?> - </div> + <?= $this->render('task_list/header', array('paginator' => $paginator)) ?> <?php foreach ($paginator->getCollection() as $task): ?> <div class="task-list-row color-<?= $task['color_id'] ?>"> <?= $this->render('task_list/task_title', array( |