|
|
@@ -6,46 +6,53 @@
|
|
|
?>
|
|
|
|
|
|
<?php if ($this->nbPage > 1) { ?>
|
|
|
-<ul class="pagination">
|
|
|
- <?php
|
|
|
- /** @var int $getteur */
|
|
|
- $params[$getteur] = 1;
|
|
|
- ?>
|
|
|
- <li class="item pager-first">
|
|
|
- <?php if ($this->currentPage > 1) { ?>
|
|
|
- <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>">« <?= _t('gen.pagination.first') ?></a>
|
|
|
- <?php } ?>
|
|
|
- </li>
|
|
|
+<nav class="nav-pagination nav-list">
|
|
|
+ <ul class="pagination">
|
|
|
+ <?php
|
|
|
+ /** @var int $getteur */
|
|
|
+ $params[$getteur] = 1;
|
|
|
+ ?>
|
|
|
+ <li class="item pager-first">
|
|
|
+ <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>">« <?= _t('conf.logs.pagination.first') ?></a>
|
|
|
+ </li>
|
|
|
|
|
|
- <?php $params[$getteur] = $this->currentPage - 1; ?>
|
|
|
- <li class="item pager-previous">
|
|
|
- <?php if ($this->currentPage > 1) { ?>
|
|
|
- <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>">‹ <?= _t('gen.pagination.previous') ?></a>
|
|
|
- <?php } ?>
|
|
|
- </li>
|
|
|
+ <?php $params[$getteur] = $this->currentPage - 1; ?>
|
|
|
+ <li class="item pager-previous">
|
|
|
+ <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>">‹ <?= _t('conf.logs.pagination.previous') ?></a>
|
|
|
+ </li>
|
|
|
|
|
|
- <?php for ($i = $this->currentPage - 2; $i <= $this->currentPage + 2; $i++) { ?>
|
|
|
- <?php if($i > 0 && $i <= $this->nbPage) { ?>
|
|
|
- <?php if ($i != $this->currentPage) { ?>
|
|
|
- <?php $params[$getteur] = $i; ?>
|
|
|
- <li class="item pager-item"><a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>"><?= $i ?></a></li>
|
|
|
- <?php } else { ?>
|
|
|
- <li class="item pager-current"><?= $i ?></li>
|
|
|
- <?php } ?>
|
|
|
+ <?php if ($this->currentPage - 2 > 1) { ?>
|
|
|
+ <li class="item">…</a></li>
|
|
|
<?php } ?>
|
|
|
- <?php } ?>
|
|
|
|
|
|
- <?php $params[$getteur] = $this->currentPage + 1; ?>
|
|
|
- <li class="item pager-next">
|
|
|
- <?php if ($this->currentPage < $this->nbPage) { ?>
|
|
|
- <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>"><?= _t('gen.pagination.next') ?> ›</a>
|
|
|
- <?php } ?>
|
|
|
- </li>
|
|
|
- <?php $params[$getteur] = $this->nbPage; ?>
|
|
|
- <li class="item pager-last">
|
|
|
- <?php if ($this->currentPage < $this->nbPage) { ?>
|
|
|
- <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>"><?= _t('gen.pagination.last') ?> »</a>
|
|
|
+ <?php
|
|
|
+ for ($i = $this->currentPage - 2; $i <= $this->currentPage + 2; $i++) {
|
|
|
+ if($i > 0 && $i <= $this->nbPage) {
|
|
|
+ if ($i != $this->currentPage) {
|
|
|
+ $params[$getteur] = $i;
|
|
|
+ $class = '';
|
|
|
+ $aria = 'false';
|
|
|
+ } else {
|
|
|
+ $class = ' active';
|
|
|
+ $aria = 'true';
|
|
|
+ } ?>
|
|
|
+ <li class="item<?= $class ?>"><a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>" aria-current="<?= $aria ?>"><?= $i ?></a></li>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ } ?>
|
|
|
+
|
|
|
+ <?php if ($this->nbPage > $i - 1) { ?>
|
|
|
+ <li class="item">…</a></li>
|
|
|
<?php } ?>
|
|
|
- </li>
|
|
|
-</ul>
|
|
|
+
|
|
|
+ <?php $params[$getteur] = $this->currentPage + 1; ?>
|
|
|
+ <li class="item pager-next">
|
|
|
+ <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>"><?= _t('conf.logs.pagination.next') ?> ›</a>
|
|
|
+ </li>
|
|
|
+ <?php $params[$getteur] = $this->nbPage; ?>
|
|
|
+ <li class="item pager-last">
|
|
|
+ <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>"><?= _t('conf.logs.pagination.last') ?> »</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+</nav>
|
|
|
<?php } ?>
|