summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-04-30 13:33:19 -0400
committerFrederic Guillot <fred@kanboard.net>2017-04-30 13:33:19 -0400
commiteb972c07b7001dc7241c4612efdb1f10530eb6f3 (patch)
tree93b237e6edf9e613df8d71b5475940404bcac48a
parentbaf3b31cf50f779fc52223c431abd83ce4cb969f (diff)
Add sorting by start date for tasks list
-rw-r--r--app/Template/task_list/sort_menu.php3
-rw-r--r--app/Template/task_list/task_icons.php11
2 files changed, 12 insertions, 2 deletions
diff --git a/app/Template/task_list/sort_menu.php b/app/Template/task_list/sort_menu.php
index 48081fe0..4d0b1189 100644
--- a/app/Template/task_list/sort_menu.php
+++ b/app/Template/task_list/sort_menu.php
@@ -26,6 +26,9 @@
<?= $paginator->order(t('Due date'), \Kanboard\Model\TaskModel::TABLE.'.date_due') ?>
</li>
<li>
+ <?= $paginator->order(t('Start date'), \Kanboard\Model\TaskModel::TABLE.'.date_started') ?>
+ </li>
+ <li>
<?= $paginator->order(t('Status'), \Kanboard\Model\TaskModel::TABLE.'.is_active') ?>
</li>
</ul>
diff --git a/app/Template/task_list/task_icons.php b/app/Template/task_list/task_icons.php
index 8694d147..528c99b3 100644
--- a/app/Template/task_list/task_icons.php
+++ b/app/Template/task_list/task_icons.php
@@ -23,8 +23,15 @@
</span>
<?php endif ?>
+ <?php if (! empty($task['date_started'])): ?>
+ <span title="<?= t('Start date') ?>" class="task-date">
+ <i class="fa fa-clock-o"></i>
+ <?= $this->dt->date($task['date_started']) ?>
+ </span>
+ <?php endif ?>
+
<?php if (! empty($task['date_due'])): ?>
- <span class="task-date
+ <span title="<?= t('Due date') ?>" class="task-date
<?php if (date('Y-m-d') == date('Y-m-d', $task['date_due'])): ?>
task-date-today
<?php elseif (time() > $task['date_due']): ?>
@@ -32,7 +39,7 @@
<?php endif ?>
">
<i class="fa fa-calendar"></i>
- <?= $this->dt->date($task['date_due']) ?>
+ <?= $this->dt->date($task['date_due']) ?>
</span>
<?php endif ?>