Todo/Done menu mark all in this column
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Done/Due badge on the board card face. Rendered by template:board:private:task:before-title; the
|
||||
* Done/Todo badge on the board card face. Rendered by template:board:private:task:before-title; the
|
||||
* CSS in layout/done_style.php pins it to the top-right (below the header) and colors the two states.
|
||||
* Only shown to users who may edit the task (a read-only viewer sees no badge). Expanded cards only
|
||||
* (collapsed cards do not fire this hook).
|
||||
@@ -12,7 +12,7 @@ $done = $this->OrganonDoneHelper->isDone($task);
|
||||
?>
|
||||
<span class="organontweaks-done<?= $done ? ' is-done' : '' ?>">
|
||||
<?= $this->url->link(
|
||||
$done ? '<i class="fa fa-check-square"></i> '.t('Done') : '<i class="fa fa-square"></i> '.t('Due'),
|
||||
$done ? '<i class="fa fa-check-square"></i> '.t('Done') : '<i class="fa fa-square"></i> '.t('Todo'),
|
||||
'DoneController',
|
||||
'toggle',
|
||||
array('plugin' => 'OrganonTweaks', 'task_id' => $task['id'], 'project_id' => $task['project_id'], 'from' => 'board'),
|
||||
|
||||
35
Template/board/mark_all_confirm.php
Normal file
35
Template/board/mark_all_confirm.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* The "Mark all as Done/Todo" modal: one modal serving both purposes -- confirm and pick direction.
|
||||
* Two buttons set every task in the column to the same state; cancel closes the modal. Each button is
|
||||
* a CSRF link to DoneController::markColumn.
|
||||
*/
|
||||
?>
|
||||
<div class="page-header">
|
||||
<h2><?= t('Mark all tasks in this column') ?></h2>
|
||||
</div>
|
||||
|
||||
<p class="confirm">
|
||||
<?= t('Set every task in this column to the same state. Already-done tasks are overwritten (no harm).') ?>
|
||||
</p>
|
||||
|
||||
<div class="form-actions">
|
||||
<?= $this->url->link(t('Mark all Done'), 'DoneController', 'markColumn', array(
|
||||
'plugin' => 'OrganonTweaks',
|
||||
'project_id' => $project_id,
|
||||
'column_id' => $column_id,
|
||||
'swimlane_id' => $swimlane_id,
|
||||
'direction' => 'done',
|
||||
), true, 'btn btn-blue') ?>
|
||||
|
||||
<?= $this->url->link(t('Mark all Todo'), 'DoneController', 'markColumn', array(
|
||||
'plugin' => 'OrganonTweaks',
|
||||
'project_id' => $project_id,
|
||||
'column_id' => $column_id,
|
||||
'swimlane_id' => $swimlane_id,
|
||||
'direction' => 'todo',
|
||||
), true, 'btn btn-red') ?>
|
||||
|
||||
<?= t('or') ?>
|
||||
<?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $project_id), false, 'close-popover') ?>
|
||||
</div>
|
||||
19
Template/board/mark_all_item.php
Normal file
19
Template/board/mark_all_item.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* "Mark all as Done/Todo" entry in the board column header dropdown. Like the "Remove this Column"
|
||||
* item, the column hook renders outside the native menu <ul>, so this is hidden and moved into the
|
||||
* menu by Asset/js/relocate.js. Shown only on non-empty columns to users who may modify tasks.
|
||||
* Clicking opens a modal (DoneController::confirmColumn) that both confirms and picks the direction.
|
||||
*/
|
||||
if ($column['nb_tasks'] <= 0 || ! $this->user->hasProjectAccess('TaskModificationController', 'update', $column['project_id'])) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<li class="organontweaks-markall-item" style="display: none;">
|
||||
<?= $this->modal->medium('check-square-o', t('Mark all as Done/Todo'), 'DoneController', 'confirmColumn', array(
|
||||
'plugin' => 'OrganonTweaks',
|
||||
'project_id' => $column['project_id'],
|
||||
'column_id' => $column['id'],
|
||||
'swimlane_id' => $swimlane['id'],
|
||||
)) ?>
|
||||
</li>
|
||||
Reference in New Issue
Block a user