summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-18 16:59:06 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-18 16:59:06 -0500
commit5710bab97198234afced474250f20e24332fd6fc (patch)
tree812132c5855fc60203ed08496ee890b8285ee1d5
parent4d4d7b3e1f03df4381b06a91d5aecf24898549ea (diff)
Improve search tables
-rw-r--r--app/Template/search/activity.php4
-rw-r--r--app/Template/search/results.php14
2 files changed, 12 insertions, 6 deletions
diff --git a/app/Template/search/activity.php b/app/Template/search/activity.php
index 2582162b..6be346b6 100644
--- a/app/Template/search/activity.php
+++ b/app/Template/search/activity.php
@@ -37,7 +37,9 @@
<?php elseif (! empty($values['search']) && $nb_events === 0): ?>
<p class="alert"><?= t('Nothing found.') ?></p>
<?php else: ?>
- <?= $this->render('event/events', array('events' => $events)) ?>
+ <div class="margin-top">
+ <?= $this->render('event/events', array('events' => $events)) ?>
+ </div>
<?php endif ?>
</section>
diff --git a/app/Template/search/results.php b/app/Template/search/results.php
index 3fbfc314..f4d6d1db 100644
--- a/app/Template/search/results.php
+++ b/app/Template/search/results.php
@@ -1,7 +1,7 @@
-<table class="table-small table-scrolling">
+<table class="table-small table-scrolling margin-top">
<tr>
- <th class="column-8"><?= $paginator->order(t('Project'), 'tasks.project_id') ?></th>
<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>
@@ -12,12 +12,16 @@
</tr>
<?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 class="task-table color-<?= $task['color_id'] ?>">
- <?= $this->url->link('#'.$this->text->e($task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
- </td>
<td>
<?= $this->text->e($task['swimlane_name']) ?>
</td>