diff options
Diffstat (limited to 'app/Controller/Task.php')
-rw-r--r-- | app/Controller/Task.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/app/Controller/Task.php b/app/Controller/Task.php index fdd20b5e..741db61e 100644 --- a/app/Controller/Task.php +++ b/app/Controller/Task.php @@ -36,6 +36,7 @@ class Task extends Base 'project' => $project, 'comments' => $this->comment->getAll($task['id']), 'subtasks' => $this->subtask->getAll($task['id']), + 'links' => $this->taskLink->getLinks($task['id']), 'task' => $task, 'columns_list' => $this->board->getColumnsList($task['project_id']), 'colors_list' => $this->color->getList(), @@ -70,6 +71,7 @@ class Task extends Base 'files' => $this->file->getAll($task['id']), 'comments' => $this->comment->getAll($task['id']), 'subtasks' => $subtasks, + 'links' => $this->taskLink->getLinks($task['id']), 'task' => $task, 'values' => $values, 'columns_list' => $this->board->getColumnsList($task['project_id']), @@ -249,6 +251,7 @@ class Task extends Base public function close() { $task = $this->getTask(); + $redirect = $this->request->getStringParam('redirect'); if ($this->request->getStringParam('confirmation') === 'yes') { @@ -260,15 +263,23 @@ class Task extends Base $this->session->flashError(t('Unable to close this task.')); } - if ($this->request->getStringParam('redirect') === 'board') { + if ($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']))); } + if ($this->request->isAjax()) { + $this->response->html($this->template->render('task/close', array( + 'task' => $task, + 'redirect' => $redirect, + ))); + } + $this->response->html($this->taskLayout('task/close', array( 'task' => $task, + 'redirect' => $redirect, ))); } |