Do not refresh the whole page when changing subtask status (work in progress)

This commit is contained in:
Frederic Guillot
2016-02-04 21:38:53 -05:00
parent 346151e103
commit 0f2b46dd6a
21 changed files with 243 additions and 254 deletions

View File

@@ -214,8 +214,7 @@ abstract class Base extends \Kanboard\Core\Base
$project = $this->project->getByIdWithOwner($project_id);
if (empty($project)) {
$this->flash->failure(t('Project not found.'));
$this->response->redirect($this->helper->url->to('project', 'index'));
$this->notfound();
}
return $project;
@@ -242,6 +241,23 @@ abstract class Base extends \Kanboard\Core\Base
return $user;
}
/**
* Get the current subtask
*
* @access protected
* @return array
*/
protected function getSubtask()
{
$subtask = $this->subtask->getById($this->request->getIntegerParam('subtask_id'));
if (empty($subtask)) {
$this->notfound();
}
return $subtask;
}
/**
* Common method to get project filters
*