Add toggle button to show/hide subtasks in task list view
This commit is contained in:
@@ -7,6 +7,12 @@
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<div class="table-list-header-menu">
|
||||
<?php if ($this->user->hasSubtaskListActivated()): ?>
|
||||
<?= $this->url->icon('tasks', t('Hide subtasks'), 'TaskListController', 'show', array('project_id' => $project['id'], 'hide_subtasks' => 1)) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->url->icon('tasks', t('Show subtasks'), 'TaskListController', 'show', array('project_id' => $project['id'], 'show_subtasks' => 1)) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->render('task_list/sort_menu', array('paginator' => $paginator)) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -5,7 +5,11 @@
|
||||
<p class="alert"><?= t('No tasks found.') ?></p>
|
||||
<?php elseif (! $paginator->isEmpty()): ?>
|
||||
<div class="table-list">
|
||||
<?= $this->render('task_list/header', array('paginator' => $paginator)) ?>
|
||||
<?= $this->render('task_list/header', array(
|
||||
'paginator' => $paginator,
|
||||
'project' => $project,
|
||||
)) ?>
|
||||
|
||||
<?php foreach ($paginator->getCollection() as $task): ?>
|
||||
<div class="table-list-row color-<?= $task['color_id'] ?>">
|
||||
<?= $this->render('task_list/task_title', array(
|
||||
@@ -21,8 +25,11 @@
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('task_list/task_icons', array(
|
||||
'project' => $project,
|
||||
'task' => $task,
|
||||
'task' => $task,
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('task_list/task_subtasks', array(
|
||||
'task' => $task,
|
||||
)) ?>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
|
||||
22
app/Template/task_list/task_subtasks.php
Normal file
22
app/Template/task_list/task_subtasks.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php if (! empty($task['subtasks'])): ?>
|
||||
<div class="task-list-subtasks">
|
||||
<?php foreach ($task['subtasks'] as $subtask): ?>
|
||||
<div class="task-list-subtask">
|
||||
<span class="subtask-cell column-50">
|
||||
<?= $this->subtask->renderToggleStatus($task, $subtask) ?>
|
||||
</span>
|
||||
<span class="subtask-cell column-20 subtask-assignee">
|
||||
<?php if (! empty($subtask['username'])): ?>
|
||||
<?= $this->text->e($subtask['name'] ?: $subtask['username']) ?>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<span class="subtask-cell subtask-time-tracking-cell">
|
||||
<?= $this->render('subtask/timer', array(
|
||||
'task' => $task,
|
||||
'subtask' => $subtask,
|
||||
)) ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
Reference in New Issue
Block a user