From 5eb4b570a12a590a98c66d253b0ba54c6062a997 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 2 Feb 2016 21:28:07 -0500 Subject: Show subtask modification forms in inline popup --- app/Template/subtask/create.php | 4 ++-- app/Template/subtask/edit.php | 4 ++-- app/Template/subtask/remove.php | 2 +- app/Template/subtask/show.php | 22 +++++++++------------- app/Template/task/show.php | 1 + app/Template/task/sidebar.php | 15 ++++++++++++--- 6 files changed, 27 insertions(+), 21 deletions(-) (limited to 'app/Template') diff --git a/app/Template/subtask/create.php b/app/Template/subtask/create.php index e237619e..8fffd3a9 100644 --- a/app/Template/subtask/create.php +++ b/app/Template/subtask/create.php @@ -2,7 +2,7 @@

-
+ form->csrf() ?> form->hidden('task_id', $values) ?> @@ -15,6 +15,6 @@
- url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
diff --git a/app/Template/subtask/edit.php b/app/Template/subtask/edit.php index ca028108..acce625e 100644 --- a/app/Template/subtask/edit.php +++ b/app/Template/subtask/edit.php @@ -2,7 +2,7 @@

-
+ form->csrf() ?> form->hidden('id', $values) ?> @@ -15,6 +15,6 @@
- url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
diff --git a/app/Template/subtask/remove.php b/app/Template/subtask/remove.php index 65ade31d..9aef6842 100644 --- a/app/Template/subtask/remove.php +++ b/app/Template/subtask/remove.php @@ -12,6 +12,6 @@
url->link(t('Yes'), 'subtask', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), true, 'btn btn-red') ?> - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
\ No newline at end of file diff --git a/app/Template/subtask/show.php b/app/Template/subtask/show.php index 6945840f..027e9495 100644 --- a/app/Template/subtask/show.php +++ b/app/Template/subtask/show.php @@ -1,9 +1,10 @@ + +
- @@ -20,7 +21,7 @@ - subtask->toggleStatus($subtask, 'task') ?> + subtask->toggleStatus($subtask, $redirect) ?> render('subtask/icons', array('subtask' => $subtask)) . $this->e($subtask['title']) ?> @@ -66,19 +67,19 @@
@@ -90,11 +91,6 @@ user->hasProjectAccess('subtask', 'save', $task['project_id'])): ?> - - -
form->csrf() ?> form->hidden('task_id', array('task_id' => $task['id'])) ?> diff --git a/app/Template/task/show.php b/app/Template/task/show.php index 5fd73afb..246c8f33 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -19,6 +19,7 @@ 'project' => $project, 'users_list' => isset($users_list) ? $users_list : array(), 'editable' => $this->user->hasProjectAccess('subtask', 'edit', $project['id']), + 'redirect' => 'task', )) ?> render('tasklink/show', array( diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index b5a2c4b4..81cd3434 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -22,6 +22,18 @@ hook->render('template:task:sidebar:information') ?> +

+ +