| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- $c = Request::controllerName ();
- $a = Request::actionName ();
- $params = Request::params ();
- ?>
- <?php if ($this->nbPage > 1) { ?>
- <ul class="pagination">
- <?php if ($this->currentPage > 1) { ?>
- <?php $params[$getteur] = 1; ?>
- <li class="pager-first"><a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">« Début</a></li>
- <?php $params[$getteur] = $this->currentPage - 1; ?>
- <li class="pager-previous"><a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">‹ Précédent</a></li>
- <?php } ?>
-
- <?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="pager-item"><a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo $i; ?></a></li>
- <?php } else { ?>
- <li class="pager-current"><?php echo $i; ?></li>
- <?php } ?>
- <?php } ?>
- <?php } ?>
-
- <?php if ($this->currentPage < $this->nbPage) { ?>
- <?php $params[$getteur] = $this->currentPage + 1; ?>
- <li class="pager-next"><a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">Suivant ›</a></li>
- <?php $params[$getteur] = $this->nbPage; ?>
- <li class="pager-last"><a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">Fin »</a></li>
- <?php } ?>
- </ul>
- <?php } ?>
|