summaryrefslogtreecommitdiff
path: root/app/Template/board
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-08-15 17:10:42 -0400
committerFrederic Guillot <fred@kanboard.net>2015-08-15 17:10:42 -0400
commitcea32af4064d483b02f070db86a7a84d723bea81 (patch)
tree83c6af0da1ff01e51abebe26f01f24ed34766ef4 /app/Template/board
parentfece613c06aeb8e5bb65ffb94788ba015014d183 (diff)
Add show/hide columns on the board
Diffstat (limited to 'app/Template/board')
-rw-r--r--app/Template/board/table_swimlane.php78
1 files changed, 47 insertions, 31 deletions
diff --git a/app/Template/board/table_swimlane.php b/app/Template/board/table_swimlane.php
index 77ec7423..a132762c 100644
--- a/app/Template/board/table_swimlane.php
+++ b/app/Template/board/table_swimlane.php
@@ -1,7 +1,7 @@
<tr id="swimlane-<?= $swimlane['id'] ?>">
<!-- swimlane toggle -->
<?php if (! $hide_swimlane): ?>
- <th>
+ <th class="board-swimlane-header">
<?php if (! $not_editable && $swimlane['nb_tasks'] > 0): ?>
<a href="#" class="board-swimlane-toggle" data-swimlane-id="<?= $swimlane['id'] ?>">
<i class="fa fa-minus-circle hide-icon-swimlane-<?= $swimlane['id'] ?>"></i>
@@ -14,36 +14,45 @@
<!-- column header title -->
<?php foreach ($swimlane['columns'] as $column): ?>
- <th class="board-column-header">
- <?php if (! $not_editable): ?>
- <div class="board-add-icon">
- <?= $this->url->link('+', 'taskcreation', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover', t('Add a new task')) ?>
- </div>
- <?php endif ?>
-
- <?= $this->e($column['title']) ?>
-
- <?php if (! $not_editable && ! empty($column['description'])): ?>
- <span class="tooltip pull-right" title='<?= $this->e($this->text->markdown($column['description'])) ?>'>
- <i class="fa fa-info-circle"></i>
+ <th class="board-column-header board-column-header-<?= $column['id'] ?>" data-column-id="<?= $column['id'] ?>">
+ <div class="board-column-collapsed">
+ <span title="<?= t('Task count') ?>" class="board-column-header-task-count" title="<?= t('Show this column') ?>">
+ <span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>
</span>
- <?php endif ?>
+ </div>
+ <div class="board-column-expanded">
+ <?php if (! $not_editable): ?>
+ <div class="board-add-icon">
+ <?= $this->url->link('+', 'taskcreation', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover', t('Add a new task')) ?>
+ </div>
+ <?php endif ?>
- <?php if (! empty($column['score'])): ?>
- <span class="column-score pull-right" title="<?= t('Score') ?>">
- <?= $column['score'] ?>&nbsp;
+ <span class="board-column-title" data-column-id="<?= $column['id'] ?>" title="<?= t('Hide this column') ?>">
+ <?= $this->e($column['title']) ?>
</span>
- <?php endif ?>
- <?php if ($column['task_limit']): ?>
- <span title="<?= t('Task limit') ?>" class="task-limit">
- (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>/<?= $this->e($column['task_limit']) ?>)
- </span>
- <?php else: ?>
- <span title="<?= t('Task count') ?>" class="task-count">
- (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>)
- </span>
- <?php endif ?>
+ <?php if (! $not_editable && ! empty($column['description'])): ?>
+ <span class="tooltip pull-right" title='<?= $this->e($this->text->markdown($column['description'])) ?>'>
+ <i class="fa fa-info-circle"></i>
+ </span>
+ <?php endif ?>
+
+ <?php if (! empty($column['score'])): ?>
+ <span class="pull-right" title="<?= t('Score') ?>">
+ <?= $column['score'] ?>&nbsp;
+ </span>
+ <?php endif ?>
+
+ <?php if ($column['task_limit']): ?>
+ <span title="<?= t('Task limit') ?>">
+ (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>/<?= $this->e($column['task_limit']) ?>)
+ </span>
+ <?php else: ?>
+ <span title="<?= t('Task count') ?>" class="board-column-header-task-count">
+ (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>)
+ </span>
+ <?php endif ?>
+ </div>
</th>
<?php endforeach ?>
</tr>
@@ -54,16 +63,16 @@
<th class="board-swimlane-title">
<?= $this->e($swimlane['name']) ?>
- <span title="<?= t('Task count') ?>" class="task-count">
+ <div title="<?= t('Task count') ?>" class="board-column-header-task-count">
(<span><?= $swimlane['nb_tasks'] ?></span>)
- </span>
+ </div>
</th>
<?php endif ?>
<!-- task list -->
<?php foreach ($swimlane['columns'] as $column): ?>
- <td id="column-<?= $column['id'] ?>" class="<?= $column['task_limit'] && $column['nb_tasks'] > $column['task_limit'] ? 'board-task-list-limit' : '' ?>">
- <div class="board-task-list" data-column-id="<?= $column['id'] ?>" data-swimlane-id="<?= $swimlane['id'] ?>" data-task-limit="<?= $column['task_limit'] ?>">
+ <td class="board-column-<?= $column['id'] ?> <?= $column['task_limit'] && $column['nb_tasks'] > $column['task_limit'] ? 'board-task-list-limit' : '' ?>">
+ <div class="board-task-list board-column-expanded" data-column-id="<?= $column['id'] ?>" data-swimlane-id="<?= $swimlane['id'] ?>" data-task-limit="<?= $column['task_limit'] ?>">
<?php foreach ($column['tasks'] as $task): ?>
<?= $this->render($not_editable ? 'board/task_public' : 'board/task_private', array(
'project' => $project,
@@ -73,6 +82,13 @@
)) ?>
<?php endforeach ?>
</div>
+ <div class="board-column-collapsed">
+ <div class="board-rotation-wrapper">
+ <div class="board-column-title board-rotation" data-column-id="<?= $column['id'] ?>" title="<?= t('Show this column') ?>">
+ <?= $this->e($column['title']) ?>
+ </div>
+ </div>
+ </div>
</td>
<?php endforeach ?>
</tr> \ No newline at end of file