summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-07-19 13:53:33 -0400
committerFrederic Guillot <fred@kanboard.net>2015-07-19 13:53:33 -0400
commit9eeb7d18201ad817d8c5eb88995a48c5bd44d22a (patch)
tree27759f30e7ea8fe22513f826b4971332cc0bf4a7
parent90ed654e2b6711211445910099e41cc2ef6d0b44 (diff)
Improve quick-add subtasks form
-rw-r--r--app/Controller/Task.php1
-rw-r--r--app/Template/subtask/show.php8
-rw-r--r--app/Template/task/show.php2
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'].' &gt; '.$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 @@
</td>
<td>
<?php if (! empty($subtask['username'])): ?>
- <?= $this->url->link($this->e($subtask['name'] ?: $subtask['username']), 'user', 'show', array('user_id' => $subtask['user_id'])) ?>
+ <?php if (! isset($not_editable)): ?>
+ <?= $this->url->link($this->e($subtask['name'] ?: $subtask['username']), 'user', 'show', array('user_id' => $subtask['user_id'])) ?>
+ <?php else: ?>
+ <?= $this->e($subtask['name'] ?: $subtask['username']) ?>
+ <?php endif ?>
<?php endif ?>
</td>
<td>
@@ -88,6 +92,8 @@
<?= $this->form->csrf() ?>
<?= $this->form->hidden('task_id', array('task_id' => $task['id'])) ?>
<?= $this->form->text('title', array(), array(), array('required', 'placeholder="'.t('Type here to create a new sub-task').'"')) ?>
+ <?= $this->form->numeric('time_estimated', array(), array(), array('placeholder="'.t('Original estimate').'"')) ?>
+ <?= $this->form->select('user_id', $users_list, array(), array(), array('placeholder="'.t('Assignee').'"')) ?>
<input type="submit" value="<?= t('Add') ?>" class="btn btn-blue"/>
</form>
<?php endif ?>
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 @@
<?= $this->render('task/time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?>
<?= $this->render('task/show_description', array('task' => $task)) ?>
<?= $this->render('tasklink/show', array('task' => $task, 'links' => $links, 'link_label_list' => $link_label_list)) ?>
-<?= $this->render('subtask/show', array('task' => $task, 'subtasks' => $subtasks, 'project' => $project)) ?>
+<?= $this->render('subtask/show', array('task' => $task, 'subtasks' => $subtasks, 'project' => $project, 'users_list' => isset($users_list) ? $users_list : array())) ?>
<?= $this->render('task/timesheet', array('task' => $task)) ?>
<?= $this->render('file/show', array('task' => $task, 'files' => $files, 'images' => $images)) ?>
<?= $this->render('task/comments', array('task' => $task, 'comments' => $comments, 'project' => $project)) ?>