logs_pagination.phtml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. $c = Minz_Request::controllerName();
  3. $a = Minz_Request::actionName();
  4. $params = Minz_Request::params();
  5. ?>
  6. <?php if ($this->nbPage > 1) { ?>
  7. <ul class="pagination">
  8. <?php $params[$getteur] = 1; ?>
  9. <li class="item pager-first">
  10. <?php if ($this->currentPage > 1) { ?>
  11. <a href="<?php echo Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>">« <?php echo _t('gen.pagination.first'); ?></a>
  12. <?php } ?>
  13. </li>
  14. <?php $params[$getteur] = $this->currentPage - 1; ?>
  15. <li class="item pager-previous">
  16. <?php if ($this->currentPage > 1) { ?>
  17. <a href="<?php echo Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>">‹ <?php echo _t('gen.pagination.previous'); ?></a>
  18. <?php } ?>
  19. </li>
  20. <?php for ($i = $this->currentPage - 2; $i <= $this->currentPage + 2; $i++) { ?>
  21. <?php if($i > 0 && $i <= $this->nbPage) { ?>
  22. <?php if ($i != $this->currentPage) { ?>
  23. <?php $params[$getteur] = $i; ?>
  24. <li class="item pager-item"><a href="<?php echo Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo $i; ?></a></li>
  25. <?php } else { ?>
  26. <li class="item pager-current"><?php echo $i; ?></li>
  27. <?php } ?>
  28. <?php } ?>
  29. <?php } ?>
  30. <?php $params[$getteur] = $this->currentPage + 1; ?>
  31. <li class="item pager-next">
  32. <?php if ($this->currentPage < $this->nbPage) { ?>
  33. <a href="<?php echo Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo _t('gen.pagination.next'); ?> ›</a>
  34. <?php } ?>
  35. </li>
  36. <?php $params[$getteur] = $this->nbPage; ?>
  37. <li class="item pager-last">
  38. <?php if ($this->currentPage < $this->nbPage) { ?>
  39. <a href="<?php echo Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo _t('gen.pagination.last'); ?> »</a>
  40. <?php } ?>
  41. </li>
  42. </ul>
  43. <?php } ?>