From 521379a350da1e67be88a81f0434ec8f5df37e5e Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 13 Aug 2016 20:23:04 -0400 Subject: Display same task summary on all task view pages --- app/Controller/ActivityController.php | 1 + app/Controller/TaskViewController.php | 3 ++ app/Template/activity/task.php | 11 +++-- app/Template/task/analytics.php | 10 ++-- app/Template/task/show.php | 74 ++++++++++++++--------------- app/Template/task/time_tracking_details.php | 9 ++-- app/Template/task/transitions.php | 9 ++-- assets/css/app.min.css | 2 +- assets/sass/_task_summary.sass | 9 ---- 9 files changed, 68 insertions(+), 60 deletions(-) diff --git a/app/Controller/ActivityController.php b/app/Controller/ActivityController.php index 9f9841af..476e4aac 100644 --- a/app/Controller/ActivityController.php +++ b/app/Controller/ActivityController.php @@ -40,6 +40,7 @@ class ActivityController extends BaseController 'task' => $task, 'project' => $this->projectModel->getById($task['project_id']), 'events' => $this->helper->projectActivity->getTaskEvents($task['id']), + 'tags' => $this->taskTagModel->getList($task['id']), ))); } } diff --git a/app/Controller/TaskViewController.php b/app/Controller/TaskViewController.php index e40ebdc0..36597457 100644 --- a/app/Controller/TaskViewController.php +++ b/app/Controller/TaskViewController.php @@ -91,6 +91,7 @@ class TaskViewController extends BaseController 'lead_time' => $this->taskAnalyticModel->getLeadTime($task), 'cycle_time' => $this->taskAnalyticModel->getCycleTime($task), 'time_spent_columns' => $this->taskAnalyticModel->getTimeSpentByColumn($task), + 'tags' => $this->taskTagModel->getList($task['id']), ))); } @@ -115,6 +116,7 @@ class TaskViewController extends BaseController 'task' => $task, 'project' => $this->projectModel->getById($task['project_id']), 'subtask_paginator' => $subtask_paginator, + 'tags' => $this->taskTagModel->getList($task['id']), ))); } @@ -131,6 +133,7 @@ class TaskViewController extends BaseController 'task' => $task, 'project' => $this->projectModel->getById($task['project_id']), 'transitions' => $this->transitionModel->getAllByTask($task['id']), + 'tags' => $this->taskTagModel->getList($task['id']), ))); } } diff --git a/app/Template/activity/task.php b/app/Template/activity/task.php index 04c64c63..39953d1a 100644 --- a/app/Template/activity/task.php +++ b/app/Template/activity/task.php @@ -1,9 +1,12 @@ -
-

text->e($task['title']) ?>

-
+render('task/details', array( + 'task' => $task, + 'tags' => $tags, + 'project' => $project, + 'editable' => false, +)) ?> -render('event/events', array('events' => $events)) ?> \ No newline at end of file +render('event/events', array('events' => $events)) ?> diff --git a/app/Template/task/analytics.php b/app/Template/task/analytics.php index db2d0cef..ecfef242 100644 --- a/app/Template/task/analytics.php +++ b/app/Template/task/analytics.php @@ -1,6 +1,10 @@ -
-

text->e($task['title']) ?>

-
+render('task/details', array( + 'task' => $task, + 'tags' => $tags, + 'project' => $project, + 'editable' => false, +)) ?> + diff --git a/app/Template/task/show.php b/app/Template/task/show.php index b18c2bca..a5c2d5a7 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -8,58 +8,58 @@ )) ?> -hook->render('template:task:show:before-description', array('task' => $task, 'project' => $project)) ?> -render('task/description', array('task' => $task)) ?> + hook->render('template:task:show:before-description', array('task' => $task, 'project' => $project)) ?> + render('task/description', array('task' => $task)) ?> -hook->render('template:task:show:before-subtasks', array('task' => $task, 'project' => $project)) ?> -render('subtask/show', array( - 'task' => $task, - 'subtasks' => $subtasks, - 'project' => $project, - 'editable' => true, -)) ?> + hook->render('template:task:show:before-subtasks', array('task' => $task, 'project' => $project)) ?> + render('subtask/show', array( + 'task' => $task, + 'subtasks' => $subtasks, + 'project' => $project, + 'editable' => true, + )) ?> -hook->render('template:task:show:before-internal-links', array('task' => $task, 'project' => $project)) ?> -render('task_internal_link/show', array( - 'task' => $task, - 'links' => $internal_links, - 'project' => $project, - 'link_label_list' => $link_label_list, - 'editable' => true, - 'is_public' => false, -)) ?> + hook->render('template:task:show:before-internal-links', array('task' => $task, 'project' => $project)) ?> + render('task_internal_link/show', array( + 'task' => $task, + 'links' => $internal_links, + 'project' => $project, + 'link_label_list' => $link_label_list, + 'editable' => true, + 'is_public' => false, + )) ?> -hook->render('template:task:show:before-external-links', array('task' => $task, 'project' => $project)) ?> -render('task_external_link/show', array( - 'task' => $task, - 'links' => $external_links, - 'project' => $project, -)) ?> + hook->render('template:task:show:before-external-links', array('task' => $task, 'project' => $project)) ?> + render('task_external_link/show', array( + 'task' => $task, + 'links' => $external_links, + 'project' => $project, + )) ?> -hook->render('template:task:show:before-attachments', array('task' => $task, 'project' => $project)) ?> -render('task_file/show', array( - 'task' => $task, - 'files' => $files, - 'images' => $images -)) ?> + hook->render('template:task:show:before-attachments', array('task' => $task, 'project' => $project)) ?> + render('task_file/show', array( + 'task' => $task, + 'files' => $files, + 'images' => $images + )) ?> -hook->render('template:task:show:before-comments', array('task' => $task, 'project' => $project)) ?> -render('comments/show', array( - 'task' => $task, - 'comments' => $comments, - 'project' => $project, - 'editable' => $this->user->hasProjectAccess('CommentController', 'edit', $project['id']), -)) ?> + hook->render('template:task:show:before-comments', array('task' => $task, 'project' => $project)) ?> + render('comments/show', array( + 'task' => $task, + 'comments' => $comments, + 'project' => $project, + 'editable' => $this->user->hasProjectAccess('CommentController', 'edit', $project['id']), + )) ?> hook->render('template:task:show:bottom', array('task' => $task, 'project' => $project)) ?> diff --git a/app/Template/task/time_tracking_details.php b/app/Template/task/time_tracking_details.php index 1a179522..2b46ca6b 100644 --- a/app/Template/task/time_tracking_details.php +++ b/app/Template/task/time_tracking_details.php @@ -1,6 +1,9 @@ -
-

text->e($task['title']) ?>

-
+render('task/details', array( + 'task' => $task, + 'tags' => $tags, + 'project' => $project, + 'editable' => false, +)) ?> render('task/time_tracking_summary', array('task' => $task)) ?> diff --git a/app/Template/task/transitions.php b/app/Template/task/transitions.php index 9e04c4e1..6f5f02a6 100644 --- a/app/Template/task/transitions.php +++ b/app/Template/task/transitions.php @@ -1,6 +1,9 @@ -
-

text->e($task['title']) ?>

-
+render('task/details', array( + 'task' => $task, + 'tags' => $tags, + 'project' => $project, + 'editable' => false, +)) ?>