2026-07-18 21:24:36 -03:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* Done/Due 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.
|
|
|
|
|
*/
|
|
|
|
|
if (! $this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$done = $this->OrganonDoneHelper->isDone($task);
|
|
|
|
|
?>
|
|
|
|
|
<li>
|
|
|
|
|
<span class="organontweaks-done<?= $done ? ' is-done' : '' ?>">
|
|
|
|
|
<?= $this->url->link(
|
2026-07-18 21:49:15 -03:00
|
|
|
$done ? '<i class="fa fa-check-square"></i> '.t('Done') : '<i class="fa fa-square"></i> '.t('Due'),
|
2026-07-18 21:24:36 -03:00
|
|
|
'DoneController',
|
|
|
|
|
'toggle',
|
|
|
|
|
array('plugin' => 'OrganonTweaks', 'task_id' => $task['id'], 'project_id' => $task['project_id'], 'from' => 'task'),
|
|
|
|
|
true,
|
|
|
|
|
'',
|
|
|
|
|
$done ? t('Mark as not done') : t('Mark as done')
|
|
|
|
|
) ?>
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|