diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-02-07 09:34:05 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-02-07 09:34:05 -0500 |
commit | 07dd8882e813d03dd2121a21cda8afd19ee90fc9 (patch) | |
tree | cbf94d5c3025c55c235a10f8b17d2e926f745724 | |
parent | 3fa445fce49d6c7e14e5b0cbc76e5fe2c52f73ba (diff) |
Fix subtask redirection
-rw-r--r-- | app/Controller/Subtask.php | 1 | ||||
-rw-r--r-- | app/ServiceProvider/RouteProvider.php | 5 | ||||
-rw-r--r-- | app/Template/subtask/menu.php | 4 | ||||
-rw-r--r-- | app/Template/subtask/show.php | 2 | ||||
-rw-r--r-- | app/Template/subtask/table.php | 1 | ||||
-rw-r--r-- | app/Template/task/show.php | 1 |
6 files changed, 6 insertions, 8 deletions
diff --git a/app/Controller/Subtask.php b/app/Controller/Subtask.php index 57d1987d..f8798906 100644 --- a/app/Controller/Subtask.php +++ b/app/Controller/Subtask.php @@ -23,6 +23,7 @@ class Subtask extends Base 'project' => $this->getProject(), 'subtasks' => $this->subtask->getAll($task['id']), 'editable' => true, + 'redirect' => 'subtask', ))); } diff --git a/app/ServiceProvider/RouteProvider.php b/app/ServiceProvider/RouteProvider.php index d09c3907..683ea1c1 100644 --- a/app/ServiceProvider/RouteProvider.php +++ b/app/ServiceProvider/RouteProvider.php @@ -135,11 +135,6 @@ class RouteProvider implements ServiceProviderInterface $container['route']->addRoute('gantt/:project_id', 'gantt', 'project'); $container['route']->addRoute('gantt/:project_id/sort/:sorting', 'gantt', 'project'); - // Subtask routes - $container['route']->addRoute('project/:project_id/task/:task_id/subtask/create', 'subtask', 'create'); - $container['route']->addRoute('project/:project_id/task/:task_id/subtask/:subtask_id/remove', 'subtask', 'confirm'); - $container['route']->addRoute('project/:project_id/task/:task_id/subtask/:subtask_id/edit', 'subtask', 'edit'); - // Feed routes $container['route']->addRoute('feed/project/:token', 'feed', 'project'); $container['route']->addRoute('feed/user/:token', 'feed', 'user'); diff --git a/app/Template/subtask/menu.php b/app/Template/subtask/menu.php index 878ad68c..16174bcf 100644 --- a/app/Template/subtask/menu.php +++ b/app/Template/subtask/menu.php @@ -3,12 +3,12 @@ <ul> <?php if ($subtask['position'] != $first_position): ?> <li> - <?= $this->url->link(t('Move Up'), 'subtask', 'movePosition', array('project_id' => $task['id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'direction' => 'up'), true) ?> + <?= $this->url->link(t('Move Up'), 'subtask', 'movePosition', array('project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'direction' => 'up', 'redirect' => $redirect), true) ?> </li> <?php endif ?> <?php if ($subtask['position'] != $last_position): ?> <li> - <?= $this->url->link(t('Move Down'), 'subtask', 'movePosition', array('project_id' => $task['id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'direction' => 'down'), true) ?> + <?= $this->url->link(t('Move Down'), 'subtask', 'movePosition', array('project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'direction' => 'down', 'redirect' => $redirect), true) ?> </li> <?php endif ?> <li> diff --git a/app/Template/subtask/show.php b/app/Template/subtask/show.php index b0326c48..bd999496 100644 --- a/app/Template/subtask/show.php +++ b/app/Template/subtask/show.php @@ -4,7 +4,7 @@ <div id="subtasks"> - <?= $this->render('subtask/table', array('subtasks' => $subtasks, 'task' => $task, 'editable' => $editable)) ?> + <?= $this->render('subtask/table', array('subtasks' => $subtasks, 'task' => $task, 'editable' => $editable, 'redirect' => $redirect)) ?> <?php if ($editable && $this->user->hasProjectAccess('subtask', 'save', $task['project_id'])): ?> <form method="post" action="<?= $this->url->href('subtask', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> diff --git a/app/Template/subtask/table.php b/app/Template/subtask/table.php index fea3ae2b..8ad9664c 100644 --- a/app/Template/subtask/table.php +++ b/app/Template/subtask/table.php @@ -58,6 +58,7 @@ 'subtask' => $subtask, 'first_position' => $first_position, 'last_position' => $last_position, + 'redirect' => $redirect, )) ?> </td> <?php endif ?> diff --git a/app/Template/task/show.php b/app/Template/task/show.php index 277c99c0..43906a81 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -12,6 +12,7 @@ 'project' => $project, 'users_list' => isset($users_list) ? $users_list : array(), 'editable' => true, + 'redirect' => 'task', )) ?> <?= $this->render('tasklink/show', array( |