summaryrefslogtreecommitdiff
path: root/app/Template/search/results.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-03-11 18:08:25 -0500
committerFrederic Guillot <fred@kanboard.net>2017-03-11 18:08:25 -0500
commitbb9e7916574bd7e21550bf7505757fccae6cbdd0 (patch)
treee3a063c049e39bd0afd184cc96b45a35da322fcf /app/Template/search/results.php
parent748f1c09fbe3e160266e1fb6edb99b29725b6d3a (diff)
Use same layout as task listing for task search
Diffstat (limited to 'app/Template/search/results.php')
-rw-r--r--app/Template/search/results.php83
1 files changed, 28 insertions, 55 deletions
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 @@
-<table class="table-small table-scrolling margin-top">
- <tr>
- <th class="column-5"><?= $paginator->order(t('Id'), 'tasks.id') ?></th>
- <th class="column-8"><?= $paginator->order(t('Project'), 'tasks.project_id') ?></th>
- <th class="column-10"><?= $paginator->order(t('Swimlane'), 'tasks.swimlane_id') ?></th>
- <th class="column-10"><?= $paginator->order(t('Column'), 'tasks.column_id') ?></th>
- <th class="column-10"><?= $paginator->order(t('Category'), 'tasks.category_id') ?></th>
- <th><?= $paginator->order(t('Title'), 'tasks.title') ?></th>
- <th class="column-10"><?= $paginator->order(t('Assignee'), 'users.username') ?></th>
- <th class="column-10"><?= $paginator->order(t('Due date'), 'tasks.date_due') ?></th>
- <th class="column-5"><?= $paginator->order(t('Status'), 'tasks.is_active') ?></th>
- </tr>
+<div class="table-list">
+ <?= $this->render('task_list/header', array(
+ 'paginator' => $paginator,
+ )) ?>
+
<?php foreach ($paginator->getCollection() as $task): ?>
- <tr>
- <td class="color-<?= $task['color_id'] ?>">
- <?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
- <?= $this->render('task/dropdown', array('task' => $task)) ?>
- <?php else: ?>
- #<?= $task['id'] ?>
- <?php endif ?>
- </td>
- <td>
- <?= $this->url->link($this->text->e($task['project_name']), 'BoardViewController', 'show', array('project_id' => $task['project_id'])) ?>
- </td>
- <td>
- <?= $this->text->e($task['swimlane_name']) ?>
- </td>
- <td>
- <?= $this->text->e($task['column_name']) ?>
- </td>
- <td>
- <?= $this->text->e($task['category_name']) ?>
- </td>
- <td>
- <?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
- </td>
- <td>
- <?php if ($task['assignee_username']): ?>
- <?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>
- <?php else: ?>
- <?= t('Unassigned') ?>
- <?php endif ?>
- </td>
- <td>
- <?= $this->dt->date($task['date_due']) ?>
- </td>
- <td>
- <?php if ($task['is_active'] == \Kanboard\Model\TaskModel::STATUS_OPEN): ?>
- <?= t('Open') ?>
- <?php else: ?>
- <?= t('Closed') ?>
- <?php endif ?>
- </td>
- </tr>
+ <div class="table-list-row color-<?= $task['color_id'] ?>">
+ <?= $this->render('task_list/task_title', array(
+ 'task' => $task,
+ )) ?>
+
+ <?= $this->render('task_list/task_details', array(
+ 'task' => $task,
+ )) ?>
+
+ <?= $this->render('task_list/task_avatars', array(
+ 'task' => $task,
+ )) ?>
+
+ <?= $this->render('task_list/task_icons', array(
+ 'task' => $task,
+ )) ?>
+
+ <?= $this->render('task_list/task_subtasks', array(
+ 'task' => $task,
+ )) ?>
+ </div>
<?php endforeach ?>
-</table>
+</div>
-<?= $paginator ?>
+<?= $paginator ?> \ No newline at end of file