diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-03-18 21:00:14 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-03-18 21:00:14 -0400 |
commit | 854457baf0043b51ce9c30f36a6fecaed97cb04d (patch) | |
tree | 0f73023f63654ee7313ac79e83d9d19e58658a1a /app/Template/subtask | |
parent | 68fba8fb64afe00aedccdf72f25d79b26356f2ab (diff) |
Improve task summary sections
Diffstat (limited to 'app/Template/subtask')
-rw-r--r-- | app/Template/subtask/show.php | 44 | ||||
-rw-r--r-- | app/Template/subtask/table.php | 2 |
2 files changed, 12 insertions, 34 deletions
diff --git a/app/Template/subtask/show.php b/app/Template/subtask/show.php index 0e94a305..fe436d51 100644 --- a/app/Template/subtask/show.php +++ b/app/Template/subtask/show.php @@ -1,32 +1,12 @@ -<?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> - <ul> - <li> - <i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - </ul> -</div> - -<div id="subtasks"> - - <?= $this->render('subtask/table', array('subtasks' => $subtasks, 'task' => $task, 'editable' => $editable)) ?> - - <?php if ($editable && $this->user->hasProjectAccess('subtask', 'save', $task['project_id'])): ?> - <form method="post" action="<?= $this->url->href('subtask', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> - <?= $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').'"')) ?> - <button type="submit" class="btn btn-blue"><?= t('Add') ?></button> - </form> - <?php endif ?> - -</div> +<section class="accordion-section <?= empty($subtasks) ? 'accordion-collapsed' : '' ?>"> + <div class="accordion-title"> + <h3><a href="#" class="fa accordion-toggle"></a> <?= t('Sub-Tasks') ?></h3> + </div> + <div class="accordion-content"> + <?= $this->render('subtask/table', array( + 'subtasks' => $subtasks, + 'task' => $task, + 'editable' => $editable + )) ?> + </div> +</section> diff --git a/app/Template/subtask/table.php b/app/Template/subtask/table.php index 0af02dcf..40510a2f 100644 --- a/app/Template/subtask/table.php +++ b/app/Template/subtask/table.php @@ -66,6 +66,4 @@ <?php endforeach ?> </tbody> </table> -<?php else: ?> - <p class="alert"><?= t('There is no subtask at the moment.') ?></p> <?php endif ?> |