summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJustin C. Klein Keane <justin@madirish.net>2016-04-20 14:24:05 -0400
committerJustin C. Klein Keane <justin@madirish.net>2016-04-20 14:24:05 -0400
commit1239920063457c7955129beaab9692c83e09676c (patch)
treed63fc1515d7879890db9fe897e5a35f540d57b9e /app
parentaea8784ab5f60a39551e03d04619a043b60205b2 (diff)
Add sortable Priority column on overview table interface
Diffstat (limited to 'app')
-rw-r--r--app/Model/TaskFinder.php24
-rw-r--r--app/Template/app/tasks.php6
2 files changed, 8 insertions, 22 deletions
diff --git a/app/Model/TaskFinder.php b/app/Model/TaskFinder.php
index d406b794..beb312e1 100644
--- a/app/Model/TaskFinder.php
+++ b/app/Model/TaskFinder.php
@@ -35,6 +35,7 @@ class TaskFinder extends Base
Task::TABLE.'.date_started',
Task::TABLE.'.project_id',
Task::TABLE.'.color_id',
+ Task::TABLE.'.priority',
Task::TABLE.'.time_spent',
Task::TABLE.'.time_estimated',
Project::TABLE.'.name AS project_name',
@@ -67,6 +68,7 @@ class TaskFinder extends Base
'tasks.date_creation',
'tasks.project_id',
'tasks.color_id',
+ 'tasks.priority',
'tasks.time_spent',
'tasks.time_estimated',
'projects.name AS project_name'
@@ -138,7 +140,6 @@ class TaskFinder extends Base
Project::TABLE.'.name AS project_name'
)
->join(User::TABLE, 'id', 'owner_id', Task::TABLE)
- ->left(User::TABLE, 'uc', 'id', Task::TABLE, 'creator_id')
->join(Category::TABLE, 'id', 'category_id', Task::TABLE)
->join(Column::TABLE, 'id', 'column_id', Task::TABLE)
->join(Swimlane::TABLE, 'id', 'swimlane_id', Task::TABLE)
@@ -364,27 +365,6 @@ class TaskFinder extends Base
}
/**
- * Get iCal query
- *
- * @access public
- * @return \PicoDb\Table
- */
- public function getICalQuery()
- {
- return $this->db->table(Task::TABLE)
- ->left(User::TABLE, 'ua', 'id', Task::TABLE, 'owner_id')
- ->left(User::TABLE, 'uc', 'id', Task::TABLE, 'creator_id')
- ->columns(
- Task::TABLE.'.*',
- 'ua.email AS assignee_email',
- 'ua.name AS assignee_name',
- 'ua.username AS assignee_username',
- 'uc.email AS creator_email',
- 'uc.username AS creator_username'
- );
- }
-
- /**
* Count all tasks for a given project and status
*
* @access public
diff --git a/app/Template/app/tasks.php b/app/Template/app/tasks.php
index d7826fb7..e773bac6 100644
--- a/app/Template/app/tasks.php
+++ b/app/Template/app/tasks.php
@@ -9,6 +9,7 @@
<th class="column-5"><?= $paginator->order('Id', 'tasks.id') ?></th>
<th class="column-20"><?= $paginator->order(t('Project'), 'project_name') ?></th>
<th><?= $paginator->order(t('Task'), 'title') ?></th>
+ <th class="column-5"><?= $paginator->order('Priority', 'tasks.priority') ?></th>
<th class="column-20"><?= t('Time tracking') ?></th>
<th class="column-20"><?= $paginator->order(t('Due date'), 'date_due') ?></th>
</tr>
@@ -24,6 +25,11 @@
<?= $this->url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</td>
<td>
+ <?php if ($task['priority'] > 0): ?>
+ <?= $this->text->e($task['priority'])?>
+ <?php endif?>
+ </td>
+ <td>
<?php if (! empty($task['time_spent'])): ?>
<strong><?= $this->text->e($task['time_spent']).'h' ?></strong> <?= t('spent') ?>
<?php endif ?>