From 321b1914ef1ee4d7e1a39d60fddd1151cb195f9c Mon Sep 17 00:00:00 2001
From: Frederic Guillot
Date: Sun, 15 Feb 2015 19:35:28 -0500
Subject: Display confirmation box to close task from the board and improve
popover listeners
---
app/Template/board/task.php | 12 ++++++------
app/Template/board/task_footer.php | 2 +-
app/Template/file/show.php | 2 +-
app/Template/task/close.php | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
(limited to 'app/Template')
diff --git a/app/Template/board/task.php b/app/Template/board/task.php
index 4c5a4252..a2a617a6 100644
--- a/app/Template/board/task.php
+++ b/app/Template/board/task.php
@@ -17,11 +17,11 @@
- - = $this->a(t('Change assignee'), 'board', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'assignee-popover') ?>
- - = $this->a(t('Change category'), 'board', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'category-popover') ?>
- - = $this->a(t('Change description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-description-popover') ?>
- - = $this->a(t('Edit this task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-edit-popover') ?>
- - = $this->a(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes', 'redirect' => 'board'), true) ?>
+ - = $this->a(t('Change assignee'), 'board', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?>
+ - = $this->a(t('Change category'), 'board', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?>
+ - = $this->a(t('Change description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?>
+ - = $this->a(t('Edit this task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?>
+ - = $this->a(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'task-board-popover') ?>
@@ -39,7 +39,7 @@
'changeAssignee',
array('task_id' => $task['id'], 'project_id' => $task['project_id']),
false,
- 'assignee-popover',
+ 'task-board-popover',
t('Change assignee')
) ?>
diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php
index 04d425e8..d413692c 100644
--- a/app/Template/board/task_footer.php
+++ b/app/Template/board/task_footer.php
@@ -7,7 +7,7 @@
'changeCategory',
array('task_id' => $task['id'], 'project_id' => $task['project_id']),
false,
- 'category-popover',
+ 'task-board-popover',
t('Change category')
) ?>
diff --git a/app/Template/file/show.php b/app/Template/file/show.php
index 179f5744..298976f6 100644
--- a/app/Template/file/show.php
+++ b/app/Template/file/show.php
@@ -11,7 +11,7 @@
= $this->a($this->e($file['name']), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
- = $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'file-popover') ?>,
+ = $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?>,
= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
diff --git a/app/Template/task/close.php b/app/Template/task/close.php
index 316d58eb..a0a95787 100644
--- a/app/Template/task/close.php
+++ b/app/Template/task/close.php
@@ -8,8 +8,8 @@
- = $this->a(t('Yes'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
+ = $this->a(t('Yes'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes', 'redirect' => $redirect), true, 'btn btn-red') ?>
= t('or') ?>
- = $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ = $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
\ No newline at end of file
--
cgit v1.2.3