Fix subtask redirection
This commit is contained in:
parent
3fa445fce4
commit
07dd8882e8
|
|
@ -23,6 +23,7 @@ class Subtask extends Base
|
|||
'project' => $this->getProject(),
|
||||
'subtasks' => $this->subtask->getAll($task['id']),
|
||||
'editable' => true,
|
||||
'redirect' => 'subtask',
|
||||
)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@
|
|||
'subtask' => $subtask,
|
||||
'first_position' => $first_position,
|
||||
'last_position' => $last_position,
|
||||
'redirect' => $redirect,
|
||||
)) ?>
|
||||
</td>
|
||||
<?php endif ?>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
'project' => $project,
|
||||
'users_list' => isset($users_list) ? $users_list : array(),
|
||||
'editable' => true,
|
||||
'redirect' => 'task',
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('tasklink/show', array(
|
||||
|
|
|
|||
Loading…
Reference in New Issue