summaryrefslogtreecommitdiff
path: root/app/Template/board
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2019-02-08 13:53:13 -0800
committerFrédéric Guillot <fred@kanboard.net>2019-02-08 13:53:13 -0800
commit029538846181309e9135a17f893e874b2e90f72b (patch)
treeb6e19516836c67d35a0ec842d321a7c9213d5952 /app/Template/board
parentba5878e7869655feda1983967ba80e7c2e811676 (diff)
Add new actions to reorder tasks by column
Diffstat (limited to 'app/Template/board')
-rw-r--r--app/Template/board/table_column.php23
1 files changed, 22 insertions, 1 deletions
diff --git a/app/Template/board/table_column.php b/app/Template/board/table_column.php
index 765d05a9..5b81d709 100644
--- a/app/Template/board/table_column.php
+++ b/app/Template/board/table_column.php
@@ -48,6 +48,27 @@
</li>
<?php endif ?>
+ <?php if ($column['nb_tasks'] > 0 && $this->user->hasProjectAccess('TaskModificationController', 'update', $column['project_id'])): ?>
+ <li>
+ <?= $this->url->icon('sort-numeric-asc', t('Reorder this column by priority (ASC)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'priority', 'direction' => 'asc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']]) ?>
+ </li>
+ <li>
+ <?= $this->url->icon('sort-numeric-desc', t('Reorder this column by priority (DESC)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'priority', 'direction' => 'desc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']]) ?>
+ </li>
+ <li>
+ <?= $this->url->icon('sort-amount-asc', t('Reorder this column by assignee and priority (ASC)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'assignee-priority', 'direction' => 'asc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']]) ?>
+ </li>
+ <li>
+ <?= $this->url->icon('sort-amount-desc', t('Reorder this column by assignee and priority (DESC)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'assignee-priority', 'direction' => 'desc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']]) ?>
+ </li>
+ <li>
+ <?= $this->url->icon('sort-alpha-asc', t('Reorder this column by assignee (A-Z)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'assignee', 'direction' => 'asc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']]) ?>
+ </li>
+ <li>
+ <?= $this->url->icon('sort-alpha-desc', t('Reorder this column by assignee (Z-A)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'assignee', 'direction' => 'desc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']]) ?>
+ </li>
+ <?php endif ?>
+
<?= $this->hook->render('template:board:column:dropdown', array('swimlane' => $swimlane, 'column' => $column)) ?>
</ul>
</span>
@@ -81,7 +102,7 @@
<?php endif ?>
</span>
<?php endif ?>
- <?= $this->hook->render('template:board:column:header', array('swimlane' => $swimlane, 'column' => $column)) ?>
+ <?= $this->hook->render('template:board:column:header', array('swimlane' => $swimlane, 'column' => $column)) ?>
</div>
</th>