From 9d4be201aaaeaac23f4b18fb6c91caca857a2f0f Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Thu, 7 Jun 2018 15:02:10 -0700 Subject: Add quick link assign me in different views --- app/Template/board/task_private.php | 4 ++-- app/Template/dashboard/overview.php | 1 + app/Template/dashboard/tasks.php | 1 + app/Template/task/details.php | 21 ++++++++++----------- app/Template/task/dropdown.php | 7 ++++++- app/Template/task_list/listing.php | 1 + app/Template/task_list/task_title.php | 2 +- 7 files changed, 22 insertions(+), 15 deletions(-) (limited to 'app/Template') diff --git a/app/Template/board/task_private.php b/app/Template/board/task_private.php index ece5efbe..396184dd 100644 --- a/app/Template/board/task_private.php +++ b/app/Template/board/task_private.php @@ -18,7 +18,7 @@
user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> - render('task/dropdown', array('task' => $task)) ?> + render('task/dropdown', array('task' => $task, 'redirect' => 'board')) ?> modal->large('edit', '', 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> @@ -36,7 +36,7 @@
user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> - render('task/dropdown', array('task' => $task)) ?> + render('task/dropdown', array('task' => $task, 'redirect' => 'board')) ?> modal->large('edit', '', 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> diff --git a/app/Template/dashboard/overview.php b/app/Template/dashboard/overview.php index f38c0d44..a352ce02 100644 --- a/app/Template/dashboard/overview.php +++ b/app/Template/dashboard/overview.php @@ -63,6 +63,7 @@
render('task_list/task_title', array( 'task' => $task, + 'redirect' => 'dashboard', )) ?> render('task_list/task_details', array( diff --git a/app/Template/dashboard/tasks.php b/app/Template/dashboard/tasks.php index bde1e2f3..4392e40b 100644 --- a/app/Template/dashboard/tasks.php +++ b/app/Template/dashboard/tasks.php @@ -13,6 +13,7 @@
render('task_list/task_title', array( 'task' => $task, + 'redirect' => 'dashboard-tasks', )) ?> render('task_list/task_details', array( diff --git a/app/Template/task/details.php b/app/Template/task/details.php index cf305743..2712d49b 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -85,6 +85,9 @@ + user->getId()): ?> + - url->link(t('Assign to me'), 'TaskModificationController', 'assignToMe', ['task_id' => $task['id'], 'project_id' => $task['project_id']]) ?> +
  • @@ -116,12 +119,14 @@ dt->datetime($task['date_due']) ?>
  • - -
  • - +
  • + + dt->datetime($task['date_started']) ?> -
  • - + + url->link(t('Start now'), 'TaskModificationController', 'start', ['task_id' => $task['id'], 'project_id' => $task['project_id']]) ?> + +
  • dt->datetime($task['date_creation']) ?> @@ -164,11 +169,5 @@ )) ?> - -
    - url->button('play', t('Set start date'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> -
    - - hook->render('template:task:details:bottom', array('task' => $task)) ?> diff --git a/app/Template/task/dropdown.php b/app/Template/task/dropdown.php index 44fe6eeb..1bad6615 100644 --- a/app/Template/task/dropdown.php +++ b/app/Template/task/dropdown.php @@ -2,9 +2,14 @@ #
      projectRole->canUpdateTask($task)): ?> + user->getId()): ?> +
    • + url->icon('hand-o-right', t('Assign to me'), 'TaskModificationController', 'assignToMe', ['task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => isset($redirect) ? $redirect : '']) ?> +
    • +
    • - url->icon('play', t('Set the start date automatically'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + url->icon('play', t('Set the start date automatically'), 'TaskModificationController', 'start', ['task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => isset($redirect) ? $redirect : '']) ?>
    • diff --git a/app/Template/task_list/listing.php b/app/Template/task_list/listing.php index 7891b543..595a190b 100644 --- a/app/Template/task_list/listing.php +++ b/app/Template/task_list/listing.php @@ -15,6 +15,7 @@ render('task_list/task_title', array( 'task' => $task, 'show_items_selection' => true, + 'redirect' => 'list', )) ?> render('task_list/task_details', array( diff --git a/app/Template/task_list/task_title.php b/app/Template/task_list/task_title.php index 92d61b6c..662ce1e5 100644 --- a/app/Template/task_list/task_title.php +++ b/app/Template/task_list/task_title.php @@ -3,7 +3,7 @@ - render('task/dropdown', array('task' => $task)) ?> + render('task/dropdown', array('task' => $task, 'redirect' => isset($redirect) ? $redirect : '')) ?> -- cgit v1.2.3