From 9eeb7d18201ad817d8c5eb88995a48c5bd44d22a Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 19 Jul 2015 13:53:33 -0400 Subject: Improve quick-add subtasks form --- app/Controller/Task.php | 1 + app/Template/subtask/show.php | 8 +++++++- app/Template/task/show.php | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/Controller/Task.php b/app/Controller/Task.php index 676dccbe..db12a0c7 100644 --- a/app/Controller/Task.php +++ b/app/Controller/Task.php @@ -78,6 +78,7 @@ class Task extends Base 'link_label_list' => $this->link->getList(0, false), 'columns_list' => $this->board->getColumnsList($task['project_id']), 'colors_list' => $this->color->getList(), + 'users_list' => $this->projectPermission->getMemberList($task['project_id'], true, false, false), 'date_format' => $this->config->get('application_date_format'), 'date_formats' => $this->dateParser->getAvailableFormats(), 'title' => $task['project_name'].' > '.$task['title'], diff --git a/app/Template/subtask/show.php b/app/Template/subtask/show.php index cc82a74e..1f0f9bba 100644 --- a/app/Template/subtask/show.php +++ b/app/Template/subtask/show.php @@ -29,7 +29,11 @@ - url->link($this->e($subtask['name'] ?: $subtask['username']), 'user', 'show', array('user_id' => $subtask['user_id'])) ?> + + url->link($this->e($subtask['name'] ?: $subtask['username']), 'user', 'show', array('user_id' => $subtask['user_id'])) ?> + + e($subtask['name'] ?: $subtask['username']) ?> + @@ -88,6 +92,8 @@ form->csrf() ?> form->hidden('task_id', array('task_id' => $task['id'])) ?> form->text('title', array(), array(), array('required', 'placeholder="'.t('Type here to create a new sub-task').'"')) ?> + form->numeric('time_estimated', array(), array(), array('placeholder="'.t('Original estimate').'"')) ?> + form->select('user_id', $users_list, array(), array(), array('placeholder="'.t('Assignee').'"')) ?> diff --git a/app/Template/task/show.php b/app/Template/task/show.php index 54c124f6..a594d906 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -9,7 +9,7 @@ render('task/time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?> render('task/show_description', array('task' => $task)) ?> render('tasklink/show', array('task' => $task, 'links' => $links, 'link_label_list' => $link_label_list)) ?> -render('subtask/show', array('task' => $task, 'subtasks' => $subtasks, 'project' => $project)) ?> +render('subtask/show', array('task' => $task, 'subtasks' => $subtasks, 'project' => $project, 'users_list' => isset($users_list) ? $users_list : array())) ?> render('task/timesheet', array('task' => $task)) ?> render('file/show', array('task' => $task, 'files' => $files, 'images' => $images)) ?> render('task/comments', array('task' => $task, 'comments' => $comments, 'project' => $project)) ?> -- cgit v1.2.3