summaryrefslogtreecommitdiff
path: root/app/Template/task/dropdown.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2018-06-07 15:02:10 -0700
committerFrédéric Guillot <fred@kanboard.net>2018-06-07 15:02:10 -0700
commit9d4be201aaaeaac23f4b18fb6c91caca857a2f0f (patch)
tree0b669aa0d7d382679100a69c0f9a59287b906568 /app/Template/task/dropdown.php
parentdfea2f23653644b574322a5199c120a32e1f29f3 (diff)
Add quick link assign me in different views
Diffstat (limited to 'app/Template/task/dropdown.php')
-rw-r--r--app/Template/task/dropdown.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/Template/task/dropdown.php b/app/Template/task/dropdown.php
index 44fe6eeb..1bad6615 100644
--- a/app/Template/task/dropdown.php
+++ b/app/Template/task/dropdown.php
@@ -2,9 +2,14 @@
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><strong>#<?= $task['id'] ?> <i class="fa fa-caret-down"></i></strong></a>
<ul>
<?php if ($this->projectRole->canUpdateTask($task)): ?>
+ <?php if (array_key_exists('owner_id', $task) && $task['owner_id'] != $this->user->getId()): ?>
+ <li>
+ <?= $this->url->icon('hand-o-right', t('Assign to me'), 'TaskModificationController', 'assignToMe', ['task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => isset($redirect) ? $redirect : '']) ?>
+ </li>
+ <?php endif ?>
<?php if (array_key_exists('date_started', $task) && empty($task['date_started'])): ?>
<li>
- <?= $this->url->icon('play', t('Set the start date automatically'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->icon('play', t('Set the start date automatically'), 'TaskModificationController', 'start', ['task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => isset($redirect) ? $redirect : '']) ?>
</li>
<?php endif ?>
<li>