Display same task summary on all task view pages

This commit is contained in:
Frederic Guillot
2016-08-13 20:23:04 -04:00
parent ada3e6f89d
commit 521379a350
9 changed files with 68 additions and 60 deletions

View File

@@ -40,6 +40,7 @@ class ActivityController extends BaseController
'task' => $task, 'task' => $task,
'project' => $this->projectModel->getById($task['project_id']), 'project' => $this->projectModel->getById($task['project_id']),
'events' => $this->helper->projectActivity->getTaskEvents($task['id']), 'events' => $this->helper->projectActivity->getTaskEvents($task['id']),
'tags' => $this->taskTagModel->getList($task['id']),
))); )));
} }
} }

View File

@@ -91,6 +91,7 @@ class TaskViewController extends BaseController
'lead_time' => $this->taskAnalyticModel->getLeadTime($task), 'lead_time' => $this->taskAnalyticModel->getLeadTime($task),
'cycle_time' => $this->taskAnalyticModel->getCycleTime($task), 'cycle_time' => $this->taskAnalyticModel->getCycleTime($task),
'time_spent_columns' => $this->taskAnalyticModel->getTimeSpentByColumn($task), 'time_spent_columns' => $this->taskAnalyticModel->getTimeSpentByColumn($task),
'tags' => $this->taskTagModel->getList($task['id']),
))); )));
} }
@@ -115,6 +116,7 @@ class TaskViewController extends BaseController
'task' => $task, 'task' => $task,
'project' => $this->projectModel->getById($task['project_id']), 'project' => $this->projectModel->getById($task['project_id']),
'subtask_paginator' => $subtask_paginator, 'subtask_paginator' => $subtask_paginator,
'tags' => $this->taskTagModel->getList($task['id']),
))); )));
} }
@@ -131,6 +133,7 @@ class TaskViewController extends BaseController
'task' => $task, 'task' => $task,
'project' => $this->projectModel->getById($task['project_id']), 'project' => $this->projectModel->getById($task['project_id']),
'transitions' => $this->transitionModel->getAllByTask($task['id']), 'transitions' => $this->transitionModel->getAllByTask($task['id']),
'tags' => $this->taskTagModel->getList($task['id']),
))); )));
} }
} }

View File

@@ -1,6 +1,9 @@
<div class="task-show-title color-<?= $task['color_id'] ?>"> <?= $this->render('task/details', array(
<h2><?= $this->text->e($task['title']) ?></h2> 'task' => $task,
</div> 'tags' => $tags,
'project' => $project,
'editable' => false,
)) ?>
<div class="page-header"> <div class="page-header">
<h2><?= t('Activity stream') ?></h2> <h2><?= t('Activity stream') ?></h2>

View File

@@ -1,6 +1,10 @@
<div class="task-show-title color-<?= $task['color_id'] ?>"> <?= $this->render('task/details', array(
<h2><?= $this->text->e($task['title']) ?></h2> 'task' => $task,
</div> 'tags' => $tags,
'project' => $project,
'editable' => false,
)) ?>
<div class="page-header"> <div class="page-header">
<h2><?= t('Analytics') ?></h2> <h2><?= t('Analytics') ?></h2>
</div> </div>

View File

@@ -8,58 +8,58 @@
)) ?> )) ?>
<?php if (!empty($task['description'])): ?> <?php if (!empty($task['description'])): ?>
<?= $this->hook->render('template:task:show:before-description', array('task' => $task, 'project' => $project)) ?> <?= $this->hook->render('template:task:show:before-description', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task/description', array('task' => $task)) ?> <?= $this->render('task/description', array('task' => $task)) ?>
<?php endif ?> <?php endif ?>
<?php if(!empty($subtasks)): ?> <?php if(!empty($subtasks)): ?>
<?= $this->hook->render('template:task:show:before-subtasks', array('task' => $task, 'project' => $project)) ?> <?= $this->hook->render('template:task:show:before-subtasks', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('subtask/show', array( <?= $this->render('subtask/show', array(
'task' => $task, 'task' => $task,
'subtasks' => $subtasks, 'subtasks' => $subtasks,
'project' => $project, 'project' => $project,
'editable' => true, 'editable' => true,
)) ?> )) ?>
<?php endif ?> <?php endif ?>
<?php if (!empty($internal_links)): ?> <?php if (!empty($internal_links)): ?>
<?= $this->hook->render('template:task:show:before-internal-links', array('task' => $task, 'project' => $project)) ?> <?= $this->hook->render('template:task:show:before-internal-links', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task_internal_link/show', array( <?= $this->render('task_internal_link/show', array(
'task' => $task, 'task' => $task,
'links' => $internal_links, 'links' => $internal_links,
'project' => $project, 'project' => $project,
'link_label_list' => $link_label_list, 'link_label_list' => $link_label_list,
'editable' => true, 'editable' => true,
'is_public' => false, 'is_public' => false,
)) ?> )) ?>
<?php endif ?> <?php endif ?>
<?php if (!empty($external_links)): ?> <?php if (!empty($external_links)): ?>
<?= $this->hook->render('template:task:show:before-external-links', array('task' => $task, 'project' => $project)) ?> <?= $this->hook->render('template:task:show:before-external-links', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task_external_link/show', array( <?= $this->render('task_external_link/show', array(
'task' => $task, 'task' => $task,
'links' => $external_links, 'links' => $external_links,
'project' => $project, 'project' => $project,
)) ?> )) ?>
<?php endif ?> <?php endif ?>
<?php if (!empty($files) || !empty($images)): ?> <?php if (!empty($files) || !empty($images)): ?>
<?= $this->hook->render('template:task:show:before-attachments', array('task' => $task, 'project' => $project)) ?> <?= $this->hook->render('template:task:show:before-attachments', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task_file/show', array( <?= $this->render('task_file/show', array(
'task' => $task, 'task' => $task,
'files' => $files, 'files' => $files,
'images' => $images 'images' => $images
)) ?> )) ?>
<?php endif ?> <?php endif ?>
<?php if (!empty($comments)): ?> <?php if (!empty($comments)): ?>
<?= $this->hook->render('template:task:show:before-comments', array('task' => $task, 'project' => $project)) ?> <?= $this->hook->render('template:task:show:before-comments', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('comments/show', array( <?= $this->render('comments/show', array(
'task' => $task, 'task' => $task,
'comments' => $comments, 'comments' => $comments,
'project' => $project, 'project' => $project,
'editable' => $this->user->hasProjectAccess('CommentController', 'edit', $project['id']), 'editable' => $this->user->hasProjectAccess('CommentController', 'edit', $project['id']),
)) ?> )) ?>
<?php endif ?> <?php endif ?>
<?= $this->hook->render('template:task:show:bottom', array('task' => $task, 'project' => $project)) ?> <?= $this->hook->render('template:task:show:bottom', array('task' => $task, 'project' => $project)) ?>

View File

@@ -1,6 +1,9 @@
<div class="task-show-title color-<?= $task['color_id'] ?>"> <?= $this->render('task/details', array(
<h2><?= $this->text->e($task['title']) ?></h2> 'task' => $task,
</div> 'tags' => $tags,
'project' => $project,
'editable' => false,
)) ?>
<?= $this->render('task/time_tracking_summary', array('task' => $task)) ?> <?= $this->render('task/time_tracking_summary', array('task' => $task)) ?>

View File

@@ -1,6 +1,9 @@
<div class="task-show-title color-<?= $task['color_id'] ?>"> <?= $this->render('task/details', array(
<h2><?= $this->text->e($task['title']) ?></h2> 'task' => $task,
</div> 'tags' => $tags,
'project' => $project,
'editable' => false,
)) ?>
<div class="page-header"> <div class="page-header">
<h2><?= t('Transitions') ?></h2> <h2><?= t('Transitions') ?></h2>

File diff suppressed because one or more lines are too long

View File

@@ -27,12 +27,3 @@
color: color('medium') color: color('medium')
li li
line-height: 23px line-height: 23px
.task-show-title
border: 2px solid #000
border-radius: 8px
margin-bottom: 20px
h2
color: color('medium')
margin: 0
padding: 8px