Always display project name and task title in task views

This commit is contained in:
Frederic Guillot 2016-03-08 22:02:42 -05:00
parent d4eea1e252
commit f91f3214c1
21 changed files with 70 additions and 31 deletions

View File

@ -3,6 +3,7 @@ Version 1.0.27 (unreleased)
Improvements:
* Always display project name and task title in task views
* Improve automatic action creation
* Move notifications to the bottom of the screen
* Added the possibility to import automatic actions from another project

View File

@ -47,11 +47,10 @@ class Comment extends Base
);
}
$this->response->html($this->helper->layout->task('comment/create', array(
$this->response->html($this->template->render('comment/create', array(
'values' => $values,
'errors' => $errors,
'task' => $task,
'title' => t('Add a comment'),
)));
}
@ -90,7 +89,7 @@ class Comment extends Base
$task = $this->getTask();
$comment = $this->getComment();
$this->response->html($this->helper->layout->task('comment/edit', array(
$this->response->html($this->template->render('comment/edit', array(
'values' => empty($values) ? $comment : $values,
'errors' => $errors,
'comment' => $comment,
@ -135,7 +134,7 @@ class Comment extends Base
$task = $this->getTask();
$comment = $this->getComment();
$this->response->html($this->helper->layout->task('comment/remove', array(
$this->response->html($this->template->render('comment/remove', array(
'comment' => $comment,
'task' => $task,
'title' => t('Remove a comment')

View File

@ -23,6 +23,7 @@ class Subtask extends Base
'project' => $this->getProject(),
'subtasks' => $this->subtask->getAll($task['id']),
'editable' => true,
'show_title' => true,
)));
}
@ -42,7 +43,7 @@ class Subtask extends Base
);
}
$this->response->html($this->helper->layout->task('subtask/create', array(
$this->response->html($this->template->render('subtask/create', array(
'values' => $values,
'errors' => $errors,
'users_list' => $this->projectUserRole->getAssignableUsersList($task['project_id']),
@ -89,7 +90,7 @@ class Subtask extends Base
$task = $this->getTask();
$subtask = $this->getSubTask();
$this->response->html($this->helper->layout->task('subtask/edit', array(
$this->response->html($this->template->render('subtask/edit', array(
'values' => empty($values) ? $subtask : $values,
'errors' => $errors,
'users_list' => $this->projectUserRole->getAssignableUsersList($task['project_id']),
@ -135,7 +136,7 @@ class Subtask extends Base
$task = $this->getTask();
$subtask = $this->getSubtask();
$this->response->html($this->helper->layout->task('subtask/remove', array(
$this->response->html($this->template->render('subtask/remove', array(
'subtask' => $subtask,
'task' => $task,
)));

View File

@ -80,13 +80,7 @@ class Task extends Base
'task' => $task,
'values' => $values,
'link_label_list' => $this->link->getList(0, false),
'columns_list' => $this->column->getList($task['project_id']),
'colors_list' => $this->color->getList(),
'users_list' => $this->projectUserRole->getAssignableUsersList($task['project_id'], true, false, false),
'title' => $task['project_name'].' > '.$task['title'],
'recurrence_trigger_list' => $this->task->getRecurrenceTriggerList(),
'recurrence_timeframe_list' => $this->task->getRecurrenceTimeframeList(),
'recurrence_basedate_list' => $this->task->getRecurrenceBasedateList(),
)));
}
@ -100,7 +94,6 @@ class Task extends Base
$task = $this->getTask();
$this->response->html($this->helper->layout->task('task/analytics', array(
'title' => $task['title'],
'task' => $task,
'lead_time' => $this->taskAnalytic->getLeadTime($task),
'cycle_time' => $this->taskAnalytic->getCycleTime($task),
@ -171,7 +164,7 @@ class Task extends Base
$this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $task['project_id'])));
}
$this->response->html($this->helper->layout->task('task/remove', array(
$this->response->html($this->template->render('task/remove', array(
'task' => $task,
)));
}

View File

@ -37,7 +37,7 @@ class TaskExternalLink extends Base
{
$task = $this->getTask();
$this->response->html($this->helper->layout->task('task_external_link/find', array(
$this->response->html($this->template->render('task_external_link/find', array(
'values' => $values,
'errors' => $errors,
'task' => $task,
@ -60,7 +60,7 @@ class TaskExternalLink extends Base
$provider = $this->externalLinkManager->setUserInput($values)->find();
$link = $provider->getLink();
$this->response->html($this->helper->layout->task('task_external_link/create', array(
$this->response->html($this->template->render('task_external_link/create', array(
'values' => array(
'title' => $link->getTitle(),
'url' => $link->getUrl(),
@ -116,7 +116,7 @@ class TaskExternalLink extends Base
$provider = $this->externalLinkManager->getProvider($values['link_type']);
$this->response->html($this->helper->layout->task('task_external_link/edit', array(
$this->response->html($this->template->render('task_external_link/edit', array(
'values' => $values,
'errors' => $errors,
'task' => $task,
@ -158,7 +158,7 @@ class TaskExternalLink extends Base
return $this->notfound();
}
$this->response->html($this->helper->layout->task('task_external_link/remove', array(
$this->response->html($this->template->render('task_external_link/remove', array(
'link' => $link,
'task' => $task,
)));

View File

@ -23,7 +23,7 @@ class TaskRecurrence extends Base
$values = $task;
}
$this->response->html($this->helper->layout->task('task_recurrence/edit', array(
$this->response->html($this->template->render('task_recurrence/edit', array(
'values' => $values,
'errors' => $errors,
'task' => $task,

View File

@ -32,7 +32,7 @@ class Taskduplication extends Base
}
}
$this->response->html($this->helper->layout->task('task_duplication/duplicate', array(
$this->response->html($this->template->render('task_duplication/duplicate', array(
'task' => $task,
)));
}
@ -128,7 +128,7 @@ class Taskduplication extends Base
$users_list = array();
}
$this->response->html($this->helper->layout->task($template, array(
$this->response->html($this->template->render($template, array(
'values' => $values,
'task' => $task,
'projects_list' => $projects_list,

View File

@ -44,6 +44,7 @@ class Tasklink extends Base
'project' => $project,
'editable' => true,
'is_public' => false,
'show_title' => true,
)));
}
@ -56,7 +57,7 @@ class Tasklink extends Base
{
$task = $this->getTask();
$this->response->html($this->helper->layout->task('tasklink/create', array(
$this->response->html($this->template->render('tasklink/create', array(
'values' => $values,
'errors' => $errors,
'task' => $task,
@ -106,7 +107,7 @@ class Tasklink extends Base
$values['title'] = '#'.$opposite_task['id'].' - '.$opposite_task['title'];
}
$this->response->html($this->helper->layout->task('tasklink/edit', array(
$this->response->html($this->template->render('tasklink/edit', array(
'values' => $values,
'errors' => $errors,
'task_link' => $task_link,
@ -150,7 +151,7 @@ class Tasklink extends Base
$task = $this->getTask();
$link = $this->getTaskLink();
$this->response->html($this->helper->layout->task('tasklink/remove', array(
$this->response->html($this->template->render('tasklink/remove', array(
'link' => $link,
'task' => $task,
)));

View File

@ -37,7 +37,7 @@ class Taskmodification extends Base
$values = array('id' => $task['id'], 'description' => $task['description']);
}
$this->response->html($this->helper->layout->task('task_modification/edit_description', array(
$this->response->html($this->template->render('task_modification/edit_description', array(
'values' => $values,
'errors' => $errors,
'task' => $task,
@ -88,7 +88,7 @@ class Taskmodification extends Base
$values = $this->dateParser->format($values, array('date_due'), $this->config->get('application_date_format', DateParser::DATE_FORMAT));
$values = $this->dateParser->format($values, array('date_started'), $this->config->get('application_datetime_format', DateParser::DATE_TIME_FORMAT));
$this->response->html($this->helper->layout->task('task_modification/edit_task', array(
$this->response->html($this->template->render('task_modification/edit_task', array(
'project' => $project,
'values' => $values,
'errors' => $errors,

View File

@ -55,7 +55,7 @@ class Taskstatus extends Base
return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true);
}
$this->response->html($this->helper->layout->task($template, array(
$this->response->html($this->template->render($template, array(
'task' => $task,
)));
}

View File

@ -60,7 +60,7 @@ class LayoutHelper extends Base
*/
public function task($template, array $params)
{
$params['title'] = $params['task']['title'];
$params['title'] = $params['task']['project_name'];
return $this->subLayout('task/layout', 'task/sidebar', $template, $params);
}

View File

@ -1,3 +1,7 @@
<div class="task-show-title color-<?= $task['color_id'] ?>">
<h2><?= $this->text->e($task['title']) ?></h2>
</div>
<div class="page-header">
<h2><?= t('Activity stream') ?></h2>
</div>

View File

@ -1,3 +1,9 @@
<?php if (isset($show_title)): ?>
<div class="task-show-title color-<?= $task['color_id'] ?>">
<h2><?= $this->text->e($task['title']) ?></h2>
</div>
<?php endif ?>
<div class="page-header">
<h2><?= t('Sub-Tasks') ?></h2>
</div>

View File

@ -1,3 +1,6 @@
<div class="task-show-title color-<?= $task['color_id'] ?>">
<h2><?= $this->text->e($task['title']) ?></h2>
</div>
<div class="page-header">
<h2><?= t('Analytics') ?></h2>
</div>

View File

@ -1,3 +1,7 @@
<div class="task-show-title color-<?= $task['color_id'] ?>">
<h2><?= $this->text->e($task['title']) ?></h2>
</div>
<?= $this->render('task/time_tracking_summary', array('task' => $task)) ?>
<h3><?= t('Subtask timesheet') ?></h3>

View File

@ -1,3 +1,7 @@
<div class="task-show-title color-<?= $task['color_id'] ?>">
<h2><?= $this->text->e($task['title']) ?></h2>
</div>
<div class="page-header">
<h2><?= t('Transitions') ?></h2>
</div>

View File

@ -1,3 +1,7 @@
<div class="task-show-title color-<?= $task['color_id'] ?>">
<h2><?= $this->text->e($task['title']) ?></h2>
</div>
<div class="page-header">
<h2><?= t('External links') ?></h2>
</div>

View File

@ -1,3 +1,9 @@
<?php if (isset($show_title)): ?>
<div class="task-show-title color-<?= $task['color_id'] ?>">
<h2><?= $this->text->e($task['title']) ?></h2>
</div>
<?php endif ?>
<div class="page-header">
<h2><?= t('Internal links') ?></h2>
</div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -194,6 +194,19 @@ span.task-board-date-overdue {
line-height: 23px;
}
.task-show-title {
border: 2px solid #000;
border-radius: 8px;
margin-bottom: 20px;
}
.task-show-title h2 {
color: #555;
font-size: 1.8em;
margin: 0;
padding: 8px;
}
.task-show-description {
border-left: 4px solid #333;
padding-left: 20px;