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,14 +1,14 @@
<h2><?= t('My projects') ?></h2>
<?php if (empty($projects)): ?>
<?php if ($paginator->isEmpty()): ?>
<p class="alert"><?= t('Your are not member of any project.') ?></p>
<?php else: ?>
<table class="table-fixed">
<tr>
<th class="column-8"><?= $this->order('Id', 'id', $pagination) ?></th>
<th class="column-20"><?= $this->order(t('Project'), 'name', $pagination) ?></th>
<th class="column-8"><?= $paginator->order('Id', 'id') ?></th>
<th class="column-20"><?= $paginator->order(t('Project'), 'name') ?></th>
<th><?= t('Columns') ?></th>
</tr>
<?php foreach ($projects as $project): ?>
<?php foreach ($paginator->getCollection() as $project): ?>
<tr>
<td>
<?= $this->a('#'.$project['id'], 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link') ?>
@@ -17,6 +17,7 @@
<?php if ($this->isManager($project['id'])): ?>
<?= $this->a('<i class="fa fa-cog"></i>', 'project', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Settings')) ?>&nbsp;
<?php endif ?>
<?= $this->a('<i class="fa fa-calendar"></i>', 'calendar', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Calendar')) ?>&nbsp;
<?= $this->a($this->e($project['name']), 'board', 'show', array('project_id' => $project['id'])) ?>
</td>
@@ -30,5 +31,5 @@
<?php endforeach ?>
</table>
<?= $this->paginate($pagination) ?>
<?= $paginator ?>
<?php endif ?>