From bb040cfb78d53696edd63bf256d0fd8ba3ccdbfa Mon Sep 17 00:00:00 2001
From: Frederic Guillot
Date: Sat, 30 Jan 2016 22:25:16 -0500
Subject: Simplify code to handle ajax popover and redirects
---
app/Template/board/task_menu.php | 4 ++--
app/Template/comment/create.php | 9 ++-------
app/Template/comment/forbidden.php | 7 -------
app/Template/file/screenshot.php | 2 +-
app/Template/task/comments.php | 1 -
app/Template/task/show.php | 1 -
app/Template/task_creation/form.php | 10 +---------
app/Template/task_external_link/create.php | 2 +-
app/Template/task_external_link/edit.php | 2 +-
app/Template/task_external_link/find.php | 8 ++------
app/Template/task_modification/edit_description.php | 8 ++------
app/Template/task_modification/edit_task.php | 8 ++------
app/Template/task_status/close.php | 2 +-
app/Template/task_status/open.php | 2 +-
app/Template/tasklink/create.php | 8 ++------
15 files changed, 18 insertions(+), 56 deletions(-)
delete mode 100644 app/Template/comment/forbidden.php
(limited to 'app/Template')
diff --git a/app/Template/board/task_menu.php b/app/Template/board/task_menu.php
index 9e26e15b..bd582185 100644
--- a/app/Template/board/task_menu.php
+++ b/app/Template/board/task_menu.php
@@ -10,9 +10,9 @@
= $this->url->link(t('Add external link'), 'TaskExternalLink', 'find', 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('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'popover') ?>
+ = $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
- = $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'popover') ?>
+ = $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
\ No newline at end of file
diff --git a/app/Template/comment/create.php b/app/Template/comment/create.php
index 8ce9aac3..15dd3a8e 100644
--- a/app/Template/comment/create.php
+++ b/app/Template/comment/create.php
@@ -1,8 +1,7 @@
-
-
diff --git a/app/Template/comment/forbidden.php b/app/Template/comment/forbidden.php
deleted file mode 100644
index 1e306d45..00000000
--- a/app/Template/comment/forbidden.php
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
- = t('Only administrators or the creator of the comment can access to this page.') ?>
-
\ No newline at end of file
diff --git a/app/Template/file/screenshot.php b/app/Template/file/screenshot.php
index 73b72eae..58b93ac3 100644
--- a/app/Template/file/screenshot.php
+++ b/app/Template/file/screenshot.php
@@ -6,7 +6,7 @@
= t('Take a screenshot and press CTRL+V or ⌘+V to paste here.') ?>
-
\ No newline at end of file
diff --git a/app/Template/task_modification/edit_description.php b/app/Template/task_modification/edit_description.php
index c38e885d..f5a9b0e1 100644
--- a/app/Template/task_modification/edit_description.php
+++ b/app/Template/task_modification/edit_description.php
@@ -2,7 +2,7 @@
= t('Edit the description') ?>
-
diff --git a/app/Template/task_modification/edit_task.php b/app/Template/task_modification/edit_task.php
index 2701dd8f..f825f4a4 100644
--- a/app/Template/task_modification/edit_task.php
+++ b/app/Template/task_modification/edit_task.php
@@ -1,7 +1,7 @@
-
\ No newline at end of file
diff --git a/app/Template/task_status/close.php b/app/Template/task_status/close.php
index d32863bd..7d200544 100644
--- a/app/Template/task_status/close.php
+++ b/app/Template/task_status/close.php
@@ -8,7 +8,7 @@
- = $this->url->link(t('Yes'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes', 'redirect' => $redirect), true, 'btn btn-red') ?>
+ = $this->url->link(t('Yes'), 'taskstatus', 'close', 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') ?>
diff --git a/app/Template/task_status/open.php b/app/Template/task_status/open.php
index 615b2464..5d19bfbe 100644
--- a/app/Template/task_status/open.php
+++ b/app/Template/task_status/open.php
@@ -8,7 +8,7 @@
- = $this->url->link(t('Yes'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes', 'redirect' => $redirect), true, 'btn btn-red') ?>
+ = $this->url->link(t('Yes'), 'taskstatus', 'open', 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') ?>
diff --git a/app/Template/tasklink/create.php b/app/Template/tasklink/create.php
index f4c3cdae..c0d49191 100644
--- a/app/Template/tasklink/create.php
+++ b/app/Template/tasklink/create.php
@@ -2,7 +2,7 @@
= t('Add a new link') ?>
-
\ No newline at end of file
--
cgit v1.2.3