summaryrefslogtreecommitdiff
path: root/app/Templates
diff options
context:
space:
mode:
Diffstat (limited to 'app/Templates')
-rw-r--r--app/Templates/project_search.php15
-rw-r--r--app/Templates/project_tasks.php7
-rw-r--r--app/Templates/task_table.php22
3 files changed, 28 insertions, 16 deletions
diff --git a/app/Templates/project_search.php b/app/Templates/project_search.php
index a810afce..7d5d8795 100644
--- a/app/Templates/project_search.php
+++ b/app/Templates/project_search.php
@@ -7,10 +7,10 @@
<?php endif ?>
</h2>
<ul>
- <li><a href="?controller=board&amp;action=show&amp;project_id=<?= $project['id'] ?>"><?= t('Back to the board') ?></a></li>
- <li><a href="?controller=project&amp;action=tasks&amp;project_id=<?= $project['id'] ?>"><?= t('Completed tasks') ?></a></li>
- <li><a href="?controller=project&amp;action=activity&amp;project_id=<?= $project['id'] ?>"><?= t('Activity') ?></a></li>
- <li><a href="?controller=project&amp;action=index"><?= t('List of projects') ?></a></li>
+ <li><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li>
+ <li><?= Helper\a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?></li>
+ <li><?= Helper\a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?></li>
+ <li><?= Helper\a(t('List of projects'), 'project', 'index') ?></li>
</ul>
</div>
<section>
@@ -25,7 +25,12 @@
<?php if (empty($tasks) && ! empty($values['search'])): ?>
<p class="alert"><?= t('Nothing found.') ?></p>
<?php elseif (! empty($tasks)): ?>
- <?= Helper\template('task_table', array('tasks' => $tasks, 'categories' => $categories, 'columns' => $columns)) ?>
+ <?= Helper\template('task_table', array(
+ 'tasks' => $tasks,
+ 'categories' => $categories,
+ 'columns' => $columns,
+ 'pagination' => $pagination,
+ )) ?>
<?php endif ?>
</section>
diff --git a/app/Templates/project_tasks.php b/app/Templates/project_tasks.php
index bc27befa..7b6f2d9c 100644
--- a/app/Templates/project_tasks.php
+++ b/app/Templates/project_tasks.php
@@ -12,7 +12,12 @@
<?php if (empty($tasks)): ?>
<p class="alert"><?= t('No task') ?></p>
<?php else: ?>
- <?= Helper\template('task_table', array('tasks' => $tasks, 'categories' => $categories, 'columns' => $columns)) ?>
+ <?= Helper\template('task_table', array(
+ 'tasks' => $tasks,
+ 'categories' => $categories,
+ 'columns' => $columns,
+ 'pagination' => $pagination,
+ )) ?>
<?php endif ?>
</section>
</section> \ No newline at end of file
diff --git a/app/Templates/task_table.php b/app/Templates/task_table.php
index d10d3f42..b6fdb2b9 100644
--- a/app/Templates/task_table.php
+++ b/app/Templates/task_table.php
@@ -1,14 +1,14 @@
<table>
<tr>
- <th><?= t('Id') ?></th>
- <th><?= t('Column') ?></th>
- <th><?= t('Category') ?></th>
- <th><?= t('Title') ?></th>
- <th><?= t('Assignee') ?></th>
- <th><?= t('Due date') ?></th>
- <th><?= t('Date created') ?></th>
- <th><?= t('Date completed') ?></th>
- <th><?= t('Status') ?></th>
+ <th><?= Helper\order(t('Id'), 'tasks.id', $pagination) ?></th>
+ <th><?= Helper\order(t('Column'), 'tasks.column_id', $pagination) ?></th>
+ <th><?= Helper\order(t('Category'), 'tasks.category_id', $pagination) ?></th>
+ <th><?= Helper\order(t('Title'), 'tasks.title', $pagination) ?></th>
+ <th><?= Helper\order(t('Assignee'), 'users.username', $pagination) ?></th>
+ <th><?= Helper\order(t('Due date'), 'tasks.date_due', $pagination) ?></th>
+ <th><?= Helper\order(t('Date created'), 'tasks.date_creation', $pagination) ?></th>
+ <th><?= Helper\order(t('Date completed'), 'tasks.date_completed', $pagination) ?></th>
+ <th><?= Helper\order(t('Status'), 'tasks.is_active', $pagination) ?></th>
</tr>
<?php foreach ($tasks as $task): ?>
<tr>
@@ -51,4 +51,6 @@
</td>
</tr>
<?php endforeach ?>
-</table> \ No newline at end of file
+</table>
+
+<?= Helper\paginate($pagination) ?>