You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.7 KiB
47 lines
1.7 KiB
<?php |
|
$c = Request::controllerName (); |
|
$a = Request::actionName (); |
|
$params = Request::params (); |
|
?> |
|
|
|
<?php if ($this->nbPage > 1) { ?> |
|
<ul class="pagination"> |
|
<?php $params[$getteur] = 1; ?> |
|
<li class="item pager-first"> |
|
<?php if ($this->currentPage > 1) { ?> |
|
<a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">« <?php echo Translate::t('first'); ?></a> |
|
<?php } ?> |
|
</li> |
|
|
|
<?php $params[$getteur] = $this->currentPage - 1; ?> |
|
<li class="item pager-previous"> |
|
<?php if ($this->currentPage > 1) { ?> |
|
<a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">‹ <?php echo Translate::t('previous'); ?></a> |
|
<?php } ?> |
|
</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="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo $i; ?></a></li> |
|
<?php } else { ?> |
|
<li class="item pager-current"><?php echo $i; ?></li> |
|
<?php } ?> |
|
<?php } ?> |
|
<?php } ?> |
|
|
|
<?php $params[$getteur] = $this->currentPage + 1; ?> |
|
<li class="item pager-next"> |
|
<?php if ($this->currentPage < $this->nbPage) { ?> |
|
<a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo Translate::t('next'); ?> ›</a> |
|
<?php } ?> |
|
</li> |
|
<?php $params[$getteur] = $this->nbPage; ?> |
|
<li class="item pager-last"> |
|
<?php if ($this->currentPage < $this->nbPage) { ?> |
|
<a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo Translate::t('last'); ?> »</a> |
|
<?php } ?> |
|
</li> |
|
</ul> |
|
<?php } ?>
|
|
|