The [x] Done / [ ] Due checkbox v2.0
This commit is contained in:
24
Template/task/done_badge.php
Normal file
24
Template/task/done_badge.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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(
|
||||
$done ? '<i class="fa fa-check-square fa-fw"></i> '.t('Done') : '<i class="fa fa-square-o fa-fw"></i> '.t('Due'),
|
||||
'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>
|
||||
Reference in New Issue
Block a user