Pagination refactoring

This commit is contained in:
Frederic Guillot
2015-01-18 17:59:41 -05:00
parent 74e4a7b064
commit 7c1c14cf64
21 changed files with 772 additions and 656 deletions

View File

@@ -1,15 +1,15 @@
<h2><?= t('My subtasks') ?></h2>
<?php if (empty($subtasks)): ?>
<?php if ($paginator->isEmpty()): ?>
<p class="alert"><?= t('There is nothing assigned to you.') ?></p>
<?php else: ?>
<table class="table-fixed">
<tr>
<th class="column-10"><?= $this->order('Id', 'tasks.id', $pagination) ?></th>
<th class="column-20"><?= $this->order(t('Project'), 'project_name', $pagination) ?></th>
<th class="column-15"><?= $this->order(t('Status'), 'status', $pagination) ?></th>
<th><?= $this->order(t('Subtask'), 'title', $pagination) ?></th>
<th class="column-10"><?= $paginator->order('Id', 'tasks.id') ?></th>
<th class="column-20"><?= $paginator->order(t('Project'), 'project_name') ?></th>
<th class="column-15"><?= $paginator->order(t('Status'), 'status') ?></th>
<th><?= $paginator->order(t('Subtask'), 'title') ?></th>
</tr>
<?php foreach ($subtasks as $subtask): ?>
<?php foreach ($paginator->getCollection() as $subtask): ?>
<tr>
<td class="task-table color-<?= $subtask['color_id'] ?>">
<?= $this->a('#'.$subtask['task_id'], 'task', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?>
@@ -27,5 +27,5 @@
<?php endforeach ?>
</table>
<?= $this->paginate($pagination) ?>
<?= $paginator ?>
<?php endif ?>