summaryrefslogtreecommitdiff
path: root/app/Template/project
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-07-07 20:19:57 -0400
committerFrederic Guillot <fred@kanboard.net>2015-07-07 20:19:57 -0400
commit2f8beda6af9a3f360379ed689c2eb81833e23039 (patch)
treeb7b52c1358864c6ecc89a22d01c1569c10561857 /app/Template/project
parent4807f3e8a0ac2cca2706fb8215b762541982c682 (diff)
Move board collapse/expand mode to server side to avoid board flickering
Diffstat (limited to 'app/Template/project')
-rw-r--r--app/Template/project/filters.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/app/Template/project/filters.php b/app/Template/project/filters.php
index 396baadf..3beb2f44 100644
--- a/app/Template/project/filters.php
+++ b/app/Template/project/filters.php
@@ -5,12 +5,13 @@
<ul>
<?php if (isset($is_board)): ?>
<li>
- <span class="filter-collapse">
- <i class="fa fa-compress fa-fw"></i> <a href="#" class="filter-collapse-link" title="<?= t('Keyboard shortcut: "%s"', 's') ?>"><?= t('Collapse tasks') ?></a>
- </span>
- <span class="filter-expand" style="display: none">
- <i class="fa fa-expand fa-fw"></i> <a href="#" class="filter-expand-link" title="<?= t('Keyboard shortcut: "%s"', 's') ?>"><?= t('Expand tasks') ?></a>
- </span>
+ <?php if ($this->board->isCollapsed($project['id'])): ?>
+ <i class="fa fa-expand fa-fw"></i>
+ <?= $this->url->link(t('Expand tasks'), 'board', 'expand', array('project_id' => $project['id']), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?>
+ <?php else: ?>
+ <i class="fa fa-compress fa-fw"></i>
+ <?= $this->url->link(t('Collapse tasks'), 'board', 'collapse', array('project_id' => $project['id']), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?>
+ <?php endif ?>
</li>
<li>
<span class="filter-compact">