summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/task_list/header.php12
-rw-r--r--app/Template/task_list/listing.php4
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(