From bd64a2081ad1a5c953e38c746a9b5d4eecba088b Mon Sep 17 00:00:00 2001 From: Imbasaur Date: Sat, 16 Apr 2016 03:27:06 +0200 Subject: Task summary columns hooks (PR #2126) --- app/Template/task/details.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/Template/task') diff --git a/app/Template/task/details.php b/app/Template/task/details.php index 6093c157..141c4a0b 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -40,6 +40,8 @@
  • + + hook->render('template:task:details:first-column', array('task' => $task)) ?>
    @@ -64,6 +66,8 @@
  • + + hook->render('template:task:details:second-column', array('task' => $task)) ?>
    @@ -102,6 +106,8 @@ + + hook->render('template:task:details:third-column', array('task' => $task)) ?>
    @@ -132,6 +138,8 @@ dt->datetime($task['date_moved']) ?> + + hook->render('template:task:details:fourth-column', array('task' => $task)) ?>
    -- cgit v1.2.3 From 53c992d6801918527da90d203697e2f6ea09fe9b Mon Sep 17 00:00:00 2001 From: Olivier Maridat Date: Mon, 18 Apr 2016 19:31:17 +0200 Subject: Add hooks in task sidebar as in user sidebar (#2138) --- app/Template/task/sidebar.php | 6 ++++-- doc/plugin-hooks.markdown | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'app/Template/task') diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index 773b28dc..a2d73b8c 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -23,6 +23,8 @@ url->link(t('Time tracking'), 'task', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + + hook->render('template:task:sidebar:information', array('task' => $task)) ?> user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?> @@ -91,8 +93,8 @@ url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + + hook->render('template:task:sidebar:actions', array('task' => $task)) ?> - - hook->render('template:task:sidebar', array('task' => $task)) ?> diff --git a/doc/plugin-hooks.markdown b/doc/plugin-hooks.markdown index 15e98043..2237e354 100644 --- a/doc/plugin-hooks.markdown +++ b/doc/plugin-hooks.markdown @@ -174,7 +174,8 @@ List of template hooks: | `template:task:details:third-column` | Task summary third column | | `template:task:details:fourth-column` | Task summary fourth column | | `template:task:dropdown` | Task dropdown menu in listing pages | -| `template:task:sidebar` | Sidebar on task page | +| `template:task:sidebar:actions` | Sidebar on task page (section actions) | +| `template:task:sidebar:information` | Sidebar on task page (section information) | | `template:task:form:left-column` | Left column in task form | | `template:task:form:right-column` | Right column in task form | | `template:task:show:top ` | Show task page: top | -- cgit v1.2.3 From f74d7ef209701bba905c0179b30f24a6e3faa5db Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 24 Apr 2016 17:03:09 -0400 Subject: Added more template hooks --- ChangeLog | 1 + app/Template/task/details.php | 4 ++++ app/Template/task/dropdown.php | 2 +- app/Template/task/layout.php | 3 ++- app/Template/task/show.php | 2 +- app/Template/task_creation/form.php | 4 ++-- app/Template/task_modification/edit_task.php | 6 +++++- doc/plugin-hooks.markdown | 5 ++++- 8 files changed, 20 insertions(+), 7 deletions(-) (limited to 'app/Template/task') diff --git a/ChangeLog b/ChangeLog index 898d2b00..be44bc3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ New features: Improvements: +* Added more template hooks * Added tasks search with the API * Added priority field to API procedures * Added API procedure "getMemberGroups" diff --git a/app/Template/task/details.php b/app/Template/task/details.php index 141c4a0b..5b8b7c6d 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -1,6 +1,8 @@

    text->e($task['title']) ?>

    + hook->render('template:task:details:top', array('task' => $task)) ?> +
      @@ -149,4 +151,6 @@ url->button('fa-play', t('Set start date'), 'taskmodification', '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 f98f5172..6fea3728 100644 --- a/app/Template/task/dropdown.php +++ b/app/Template/task/dropdown.php @@ -55,6 +55,6 @@ - hook->render('template:task:dropdown') ?> + hook->render('template:task:dropdown', array('task' => $task)) ?> diff --git a/app/Template/task/layout.php b/app/Template/task/layout.php index 52db5d1b..ba2cd8d5 100644 --- a/app/Template/task/layout.php +++ b/app/Template/task/layout.php @@ -1,5 +1,6 @@
    projectHeader->render($project, 'Listing', 'show') ?> + hook->render('template:task:layout:top', array('task' => $task)) ?> -
    \ No newline at end of file + diff --git a/app/Template/task/show.php b/app/Template/task/show.php index 86422941..8f41d653 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -34,7 +34,7 @@ 'project' => $project, )) ?> -hook->render('template:task:show:before-attachements', array('task' => $task, 'project' => $project)) ?> +hook->render('template:task:show:before-attachments', array('task' => $task, 'project' => $project)) ?> render('task_file/show', array( 'task' => $task, 'files' => $files, diff --git a/app/Template/task_creation/form.php b/app/Template/task_creation/form.php index 9bfd839f..c963bdcf 100644 --- a/app/Template/task_creation/form.php +++ b/app/Template/task_creation/form.php @@ -29,7 +29,7 @@ form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?> - hook->render('template:task:form:left-column', array('values'=>$values, 'errors'=>$errors)) ?> + hook->render('template:task:form:left-column', array('values' => $values, 'errors' => $errors)) ?>
    @@ -43,7 +43,7 @@ task->selectTimeEstimated($values, $errors) ?> task->selectDueDate($values, $errors) ?> - hook->render('template:task:form:right-column', array('values'=>$values, 'errors'=>$errors)) ?> + hook->render('template:task:form:right-column', array('values' => $values, 'errors' => $errors)) ?>
    diff --git a/app/Template/task_modification/edit_task.php b/app/Template/task_modification/edit_task.php index b5891c15..5ddec5ea 100644 --- a/app/Template/task_modification/edit_task.php +++ b/app/Template/task_modification/edit_task.php @@ -14,6 +14,8 @@ task->selectCategory($categories_list, $values, $errors) ?> task->selectPriority($project, $values) ?> task->selectScore($values, $errors) ?> + + hook->render('template:task:form:left-column', array('values' => $values, 'errors' => $errors)) ?>
    @@ -21,6 +23,8 @@ task->selectTimeSpent($values, $errors) ?> task->selectStartDate($values, $errors) ?> task->selectDueDate($values, $errors) ?> + + hook->render('template:task:form:right-column', array('values' => $values, 'errors' => $errors)) ?>
    @@ -32,4 +36,4 @@ 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/doc/plugin-hooks.markdown b/doc/plugin-hooks.markdown index 2237e354..f6760f96 100644 --- a/doc/plugin-hooks.markdown +++ b/doc/plugin-hooks.markdown @@ -169,6 +169,9 @@ List of template hooks: | `template:project:integrations` | Integration page in projects settings | | `template:project:sidebar` | Sidebar in project settings | | `template:project-user:sidebar` | Sidebar on project user overview page | +| `template:task:layout:top` | Task layout top (after page header) | +| `template:task:details:top` | Task summary top | +| `template:task:details:bottom` | Task summary bottom | | `template:task:details:first-column` | Task summary first column | | `template:task:details:second-column` | Task summary second column | | `template:task:details:third-column` | Task summary third column | @@ -184,7 +187,7 @@ List of template hooks: | `template:task:show:before-tasklinks` | Show task page: before tasklinks | | `template:task:show:before-subtasks` | Show task page: before subtasks | | `template:task:show:before-timetracking` | Show task page: before timetracking | -| `template:task:show:before-attachements` | Show task page: before attachments | +| `template:task:show:before-attachments` | Show task page: before attachments | | `template:task:show:before-comments` | Show task page: before comments | | `template:user:authentication:form` | "Edit authentication" form in user profile | | `template:user:create-remote:form` | "Create remote user" form | -- cgit v1.2.3