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>
|
||||
@@ -65,11 +65,11 @@
|
||||
<fieldset>
|
||||
<legend><?= t('Done badge') ?></legend>
|
||||
|
||||
<?= $this->form->checkbox('organon_tweaks_done_badge', t('Show a Done/Due badge on cards'), 1, isset($values['organon_tweaks_done_badge']) && $values['organon_tweaks_done_badge'] == 1) ?>
|
||||
<p class="form-help"><?= t('A two-state toggle badge on the board card (top-right) and the task view (near the due date): "Due" (red) until you click it, then "Done" (green). Off by default.') ?></p>
|
||||
<?= $this->form->checkbox('organon_tweaks_done_badge', t('Show a Done/Todo badge on cards'), 1, isset($values['organon_tweaks_done_badge']) && $values['organon_tweaks_done_badge'] == 1) ?>
|
||||
<p class="form-help"><?= t('A two-state toggle badge on the board card (above the title) and the task view (near the due date): "Todo" (red) until you click it, then "Done" (green). Off by default.') ?></p>
|
||||
|
||||
<?= $this->form->checkbox('organon_tweaks_done_closes_task', t('Marking Done also closes the task'), 1, isset($values['organon_tweaks_done_closes_task']) && $values['organon_tweaks_done_closes_task'] == 1) ?>
|
||||
<p class="form-help"><?= t('When on, "Done" means the task is closed (so it leaves the board unless you clear the status filter), and clicking Due reopens it -- native Close/Open stay in sync. When off, the badge is an independent marker that never changes the open/closed status.') ?></p>
|
||||
<p class="form-help"><?= t('When on, "Done" means the task is closed (so it leaves the board unless you clear the status filter), and clicking Todo reopens it -- native Close/Open stay in sync. When off, the badge is an independent marker that never changes the open/closed status.') ?></p>
|
||||
</fieldset>
|
||||
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* Done/Due badge styling (emitted into the head when the feature is enabled). NATURAL document flow --
|
||||
* Done/Todo badge styling (emitted into the head when the feature is enabled). NATURAL document flow --
|
||||
* the badge renders above the title (board card) or as a list item (task view); no absolute
|
||||
* positioning, so it adapts to any card / column / avatar / username size. Two states via .is-done:
|
||||
* Due = black filled box + black text on a light red (#ef9a9a); Done = checked box, black on light
|
||||
* Todo = black filled box + black text on a light red (#ef9a9a); Done = checked box, black on light
|
||||
* green (#a5d6a7). Both states use black text (core's `.task-board a { color:#000 }` forces the icon
|
||||
* black anyway, so the backgrounds are kept light for contrast). Colors are tunable.
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Done/Due badge in the task view, 4th column (near the due date). Rendered by
|
||||
* Done/Todo badge in the task view, 4th column (near the due date). Rendered by
|
||||
* template:task:details:fourth-column as a list item, matching the surrounding <li> fields. Same
|
||||
* two-state toggle as the board badge; only shown to users who may edit the task.
|
||||
*/
|
||||
@@ -12,7 +12,7 @@ $done = $this->OrganonDoneHelper->isDone($task);
|
||||
<li>
|
||||
<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' => 'task'),
|
||||
|
||||
Reference in New Issue
Block a user