From 6bdc25490f02649242b1d96025f8da1f4c41884b Mon Sep 17 00:00:00 2001
From: Frederic Guillot
Date: Wed, 4 May 2016 21:51:38 -0400
Subject: Unify task drop-down menu between different views
---
app/Template/task/dropdown.php | 18 ++++++++++++++++++
app/Template/task/remove.php | 4 ++--
app/Template/task/sidebar.php | 2 +-
3 files changed, 21 insertions(+), 3 deletions(-)
(limited to 'app/Template/task')
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
@@ -7,6 +7,14 @@
= $this->url->link(t('Set automatically the start date'), 'taskmodification', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+
+
+ = $this->url->link(t('Change assignee'), 'BoardPopover', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+
+
+
+ = $this->url->link(t('Change category'), 'BoardPopover', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+
= $this->url->link(t('Edit the task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
@@ -31,6 +39,10 @@
= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+
+
+ = $this->url->link(t('Add a screenshot'), 'BoardPopover', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+
= $this->url->link(t('Duplicate'), 'taskduplication', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
@@ -43,6 +55,12 @@
= $this->url->link(t('Move to another project'), 'taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ user->canRemoveTask($task)): ?>
+
+
+ = $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+
+
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 @@
- = $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') ?>
-
\ No newline at end of file
+
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') ?>
- task->canRemove($task)): ?>
+ user->canRemoveTask($task)): ?>
= $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
--
cgit v1.2.3