summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-17 22:25:18 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-17 22:25:18 -0400
commit46ed06268dc3d591fb7bb90a5a9a75e77c17b86c (patch)
tree4e4cc7d42bed1d5ca5e1c9d65415def3161cad2c /app/Controller
parent996997a12d1b435956a96640eb6cf39045f6ef46 (diff)
Rename subtask controller
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/SubtaskController.php (renamed from app/Controller/Subtask.php)11
-rw-r--r--app/Controller/SubtaskRestrictionController.php (renamed from app/Controller/SubtaskRestriction.php)10
-rw-r--r--app/Controller/SubtaskStatusController.php (renamed from app/Controller/SubtaskStatus.php)4
3 files changed, 13 insertions, 12 deletions
diff --git a/app/Controller/Subtask.php b/app/Controller/SubtaskController.php
index dfe4415e..830548da 100644
--- a/app/Controller/Subtask.php
+++ b/app/Controller/SubtaskController.php
@@ -3,14 +3,15 @@
namespace Kanboard\Controller;
use Kanboard\Core\Controller\AccessForbiddenException;
+use Kanboard\Core\Controller\PageNotFoundException;
/**
* Subtask controller
*
- * @package controller
+ * @package Kanboard\Controller
* @author Frederic Guillot
*/
-class Subtask extends BaseController
+class SubtaskController extends BaseController
{
/**
* Creation form
@@ -19,7 +20,7 @@ class Subtask extends BaseController
* @param array $values
* @param array $errors
* @throws AccessForbiddenException
- * @throws \Kanboard\Core\Controller\PageNotFoundException
+ * @throws PageNotFoundException
*/
public function create(array $values = array(), array $errors = array())
{
@@ -76,7 +77,7 @@ class Subtask extends BaseController
* @param array $values
* @param array $errors
* @throws AccessForbiddenException
- * @throws \Kanboard\Core\Controller\PageNotFoundException
+ * @throws PageNotFoundException
*/
public function edit(array $values = array(), array $errors = array())
{
@@ -166,7 +167,7 @@ class Subtask extends BaseController
$task_id = $this->request->getIntegerParam('task_id');
$values = $this->request->getJson();
- if (! empty($values) && $this->helper->user->hasProjectAccess('Subtask', 'movePosition', $project_id)) {
+ if (! empty($values) && $this->helper->user->hasProjectAccess('SubtaskController', 'movePosition', $project_id)) {
$result = $this->subtask->changePosition($task_id, $values['subtask_id'], $values['position']);
$this->response->json(array('result' => $result));
} else {
diff --git a/app/Controller/SubtaskRestriction.php b/app/Controller/SubtaskRestrictionController.php
index bfa3031c..185371e7 100644
--- a/app/Controller/SubtaskRestriction.php
+++ b/app/Controller/SubtaskRestrictionController.php
@@ -7,22 +7,22 @@ use Kanboard\Model\Subtask as SubtaskModel;
/**
* Subtask Restriction
*
- * @package controller
+ * @package Kanboard\Controller
* @author Frederic Guillot
*/
-class SubtaskRestriction extends BaseController
+class SubtaskRestrictionController extends BaseController
{
/**
* Show popup
*
* @access public
*/
- public function popover()
+ public function show()
{
$task = $this->getTask();
$subtask = $this->getSubtask();
- $this->response->html($this->template->render('subtask_restriction/popover', array(
+ $this->response->html($this->template->render('subtask_restriction/show', array(
'status_list' => array(
SubtaskModel::STATUS_TODO => t('Todo'),
SubtaskModel::STATUS_DONE => t('Done'),
@@ -38,7 +38,7 @@ class SubtaskRestriction extends BaseController
*
* @access public
*/
- public function update()
+ public function save()
{
$task = $this->getTask();
$subtask = $this->getSubtask();
diff --git a/app/Controller/SubtaskStatus.php b/app/Controller/SubtaskStatusController.php
index e22e825e..e24002dc 100644
--- a/app/Controller/SubtaskStatus.php
+++ b/app/Controller/SubtaskStatusController.php
@@ -5,10 +5,10 @@ namespace Kanboard\Controller;
/**
* Subtask Status
*
- * @package controller
+ * @package Kanboard\Controller
* @author Frederic Guillot
*/
-class SubtaskStatus extends BaseController
+class SubtaskStatusController extends BaseController
{
/**
* Change status to the next status: Toto -> In Progress -> Done