summaryrefslogtreecommitdiff
path: root/app/Template/task_list/header.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-26 19:30:02 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-26 19:30:02 -0500
commitf3deb6492a74f1ffa9e3391274e0ab7947a04016 (patch)
treecbf7a3563cf1543bd131dd114f8dc89afdf5328f /app/Template/task_list/header.php
parent4f325193be4f16a9658258fecd525e71917156a0 (diff)
Add toggle button to show/hide subtasks in task list view
Diffstat (limited to 'app/Template/task_list/header.php')
-rw-r--r--app/Template/task_list/header.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/Template/task_list/header.php b/app/Template/task_list/header.php
index fb05dbdc..6501a919 100644
--- a/app/Template/task_list/header.php
+++ b/app/Template/task_list/header.php
@@ -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> \ No newline at end of file