summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-02-01 19:34:01 -0500
committerFrederic Guillot <fred@kanboard.net>2015-02-01 19:34:01 -0500
commit24300f828a684eedf71d63374effb2be95c13b1a (patch)
treebe83322f4c28d9da2d1dfe7046cfca22aec0702f /app/Controller
parent7283692c1d565ec262546bdc816e8a5004df86ea (diff)
Add shortcut link to close a task from the dropdown menu
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/Task.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/Controller/Task.php b/app/Controller/Task.php
index c25a4b9d..205e480f 100644
--- a/app/Controller/Task.php
+++ b/app/Controller/Task.php
@@ -261,7 +261,11 @@ class Task extends Base
$this->session->flashError(t('Unable to close this task.'));
}
- $this->response->redirect('?controller=task&action=show&task_id='.$task['id'].'&project_id='.$task['project_id']);
+ if ($this->request->getStringParam('redirect') === 'board') {
+ $this->response->redirect($this->helper->url('board', 'show', array('project_id' => $task['project_id'])));
+ }
+
+ $this->response->redirect($this->helper->url('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])));
}
$this->response->html($this->taskLayout('task/close', array(