Add shortcut link to close a task from the dropdown menu

This commit is contained in:
Frederic Guillot
2015-02-01 19:34:01 -05:00
parent 7283692c1d
commit 24300f828a
2 changed files with 6 additions and 1 deletions

View File

@@ -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(