summaryrefslogtreecommitdiff
path: root/app/Controller/SubtaskStatus.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller/SubtaskStatus.php')
-rw-r--r--app/Controller/SubtaskStatus.php28
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']));
+ }
+}