summaryrefslogtreecommitdiff
path: root/app/Template/task
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-04 21:51:38 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-04 21:51:38 -0400
commit6bdc25490f02649242b1d96025f8da1f4c41884b (patch)
treeab30b54786c0c08f85facb6d0703f7837b4bc471 /app/Template/task
parent60c8867feeeefcf160fb1432419887f17a0d957b (diff)
Unify task drop-down menu between different views
Diffstat (limited to 'app/Template/task')
-rw-r--r--app/Template/task/dropdown.php18
-rw-r--r--app/Template/task/remove.php4
-rw-r--r--app/Template/task/sidebar.php2
3 files changed, 21 insertions, 3 deletions
diff --git a/app/Template/task/dropdown.php b/app/Template/task/dropdown.php
index 6fea3728..567249df 100644
--- a/app/Template/task/dropdown.php
+++ b/app/Template/task/dropdown.php
@@ -8,6 +8,14 @@
</li>
<?php endif ?>
<li>
+ <i class="fa fa-user fa-fw"></i>
+ <?= $this->url->link(t('Change assignee'), 'BoardPopover', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-tag fa-fw"></i>
+ <?= $this->url->link(t('Change category'), 'BoardPopover', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
<i class="fa fa-pencil-square-o fa-fw"></i>
<?= $this->url->link(t('Edit the task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
@@ -32,6 +40,10 @@
<?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
+ <i class="fa fa-camera fa-fw"></i>
+ <?= $this->url->link(t('Add a screenshot'), 'BoardPopover', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
<i class="fa fa-files-o fa-fw"></i>
<?= $this->url->link(t('Duplicate'), 'taskduplication', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
@@ -43,6 +55,12 @@
<i class="fa fa-clone fa-fw"></i>
<?= $this->url->link(t('Move to another project'), 'taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
+ <?php if ($this->user->canRemoveTask($task)): ?>
+ <li>
+ <i class="fa fa-trash-o fa-fw"></i>
+ <?= $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <?php endif ?>
<?php if (isset($task['is_active'])): ?>
<li>
<?php if ($task['is_active'] == 1): ?>
diff --git a/app/Template/task/remove.php b/app/Template/task/remove.php
index eb0809b1..b869b646 100644
--- a/app/Template/task/remove.php
+++ b/app/Template/task/remove.php
@@ -8,8 +8,8 @@
</p>
<div class="form-actions">
- <?= $this->url->link(t('Yes'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red popover-link') ?>
<?= t('or') ?>
<?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
</div>
-</div> \ No newline at end of file
+</div>
diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php
index a2d73b8c..46f9e1a2 100644
--- a/app/Template/task/sidebar.php
+++ b/app/Template/task/sidebar.php
@@ -87,7 +87,7 @@
<?= $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
<?php endif ?>
</li>
- <?php if ($this->task->canRemove($task)): ?>
+ <?php if ($this->user->canRemoveTask($task)): ?>
<li>
<i class="fa fa-trash-o fa-fw"></i>
<?= $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>