diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-02-04 21:38:53 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-02-04 21:38:53 -0500 |
commit | 0f2b46dd6a9a1dc17768de2c415f382df95142e8 (patch) | |
tree | 55191fce45c7c06b7d2b45834ea4151745c3db77 /app/Controller/SubtaskStatus.php | |
parent | 346151e103431e8de12520b26daae10676b8faf5 (diff) |
Do not refresh the whole page when changing subtask status (work in progress)
Diffstat (limited to 'app/Controller/SubtaskStatus.php')
-rw-r--r-- | app/Controller/SubtaskStatus.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/app/Controller/SubtaskStatus.php b/app/Controller/SubtaskStatus.php new file mode 100644 index 00000000..efe8a974 --- /dev/null +++ b/app/Controller/SubtaskStatus.php @@ -0,0 +1,28 @@ +<?php + +namespace Kanboard\Controller; + +/** + * Subtask Status + * + * @package controller + * @author Frederic Guillot + */ +class SubtaskStatus extends Base +{ + /** + * Change status to the next status: Toto -> In Progress -> Done + * + * @access public + */ + public function change() + { + $task = $this->getTask(); + $subtask = $this->getSubtask(); + + $status = $this->subtask->toggleStatus($subtask['id']); + $subtask['status'] = $status; + + $this->response->html($this->helper->subtask->toggleStatus($subtask, $task['project_id'])); + } +} |