From bb9e7916574bd7e21550bf7505757fccae6cbdd0 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 11 Mar 2017 18:08:25 -0500 Subject: Use same layout as task listing for task search --- app/Template/search/activity.php | 75 +++++++++++++++++------------------ app/Template/search/index.php | 81 ++++++++++++++++++-------------------- app/Template/search/results.php | 83 +++++++++++++-------------------------- app/Template/task_list/header.php | 10 +++-- 4 files changed, 108 insertions(+), 141 deletions(-) (limited to 'app/Template') diff --git a/app/Template/search/activity.php b/app/Template/search/activity.php index 6be346b6..c48cce22 100644 --- a/app/Template/search/activity.php +++ b/app/Template/search/activity.php @@ -1,45 +1,40 @@ -
- + -
-
+ +
+

+

project:"My project" creator:me

+ +

url->doc(t('View advanced search syntax'), 'search') ?>

+
+ +

+ + render('event/events', array('events' => $events)) ?> + diff --git a/app/Template/search/index.php b/app/Template/search/index.php index 9a5f2931..16bbac0f 100644 --- a/app/Template/search/index.php +++ b/app/Template/search/index.php @@ -1,47 +1,44 @@ -
- + -
-
+ +
+

+

project:"My project" assignee:me due:tomorrow

+ +

url->doc(t('View advanced search syntax'), 'search') ?>

+
+isEmpty()): ?> +

+isEmpty()): ?> + render('search/results', array( + 'paginator' => $paginator, + )) ?> + diff --git a/app/Template/search/results.php b/app/Template/search/results.php index f4d6d1db..f5a4cfc8 100644 --- a/app/Template/search/results.php +++ b/app/Template/search/results.php @@ -1,58 +1,31 @@ - - - - - - - - - - - - +
+ render('task_list/header', array( + 'paginator' => $paginator, + )) ?> + getCollection() as $task): ?> -
- - - - - - - - - - +
+ render('task_list/task_title', array( + 'task' => $task, + )) ?> + + render('task_list/task_details', array( + 'task' => $task, + )) ?> + + render('task_list/task_avatars', array( + 'task' => $task, + )) ?> + + render('task_list/task_icons', array( + 'task' => $task, + )) ?> + + render('task_list/task_subtasks', array( + 'task' => $task, + )) ?> +
-
order(t('Id'), 'tasks.id') ?>order(t('Project'), 'tasks.project_id') ?>order(t('Swimlane'), 'tasks.swimlane_id') ?>order(t('Column'), 'tasks.column_id') ?>order(t('Category'), 'tasks.category_id') ?>order(t('Title'), 'tasks.title') ?>order(t('Assignee'), 'users.username') ?>order(t('Due date'), 'tasks.date_due') ?>order(t('Status'), 'tasks.is_active') ?>
- user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> - render('task/dropdown', array('task' => $task)) ?> - - # - - - url->link($this->text->e($task['project_name']), 'BoardViewController', 'show', array('project_id' => $task['project_id'])) ?> - - text->e($task['swimlane_name']) ?> - - text->e($task['column_name']) ?> - - text->e($task['category_name']) ?> - - url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> - - - text->e($task['assignee_name'] ?: $task['assignee_username']) ?> - - - - - dt->date($task['date_due']) ?> - - - - - - -
+ - + \ No newline at end of file diff --git a/app/Template/task_list/header.php b/app/Template/task_list/header.php index 6501a919..7704e2df 100644 --- a/app/Template/task_list/header.php +++ b/app/Template/task_list/header.php @@ -7,10 +7,12 @@
- user->hasSubtaskListActivated()): ?> - url->icon('tasks', t('Hide subtasks'), 'TaskListController', 'show', array('project_id' => $project['id'], 'hide_subtasks' => 1)) ?> - - url->icon('tasks', t('Show subtasks'), 'TaskListController', 'show', array('project_id' => $project['id'], 'show_subtasks' => 1)) ?> + + user->hasSubtaskListActivated()): ?> + url->icon('tasks', t('Hide subtasks'), 'TaskListController', 'show', array('project_id' => $project['id'], 'hide_subtasks' => 1)) ?> + + url->icon('tasks', t('Show subtasks'), 'TaskListController', 'show', array('project_id' => $project['id'], 'show_subtasks' => 1)) ?> + render('task_list/sort_menu', array('paginator' => $paginator)) ?> -- cgit v1.2.3