1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00
freshrss_ynh/sources/app/views/helpers/logs_pagination.phtml

48 lines
1.8 KiB
PHTML
Raw Normal View History

2014-07-23 15:52:50 +02:00
<?php
2015-02-08 18:55:48 +01:00
$c = Minz_Request::controllerName();
$a = Minz_Request::actionName();
$params = Minz_Request::params();
2014-07-23 15:52:50 +02:00
?>
<?php if ($this->nbPage > 1) { ?>
<ul class="pagination">
<?php $params[$getteur] = 1; ?>
<li class="item pager-first">
<?php if ($this->currentPage > 1) { ?>
2015-02-08 18:55:48 +01:00
<a href="<?php echo Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>">« <?php echo _t('gen.pagination.first'); ?></a>
2014-07-23 15:52:50 +02:00
<?php } ?>
</li>
<?php $params[$getteur] = $this->currentPage - 1; ?>
<li class="item pager-previous">
<?php if ($this->currentPage > 1) { ?>
2015-02-08 18:55:48 +01:00
<a href="<?php echo Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>"> <?php echo _t('gen.pagination.previous'); ?></a>
2014-07-23 15:52:50 +02:00
<?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; ?>
2015-02-08 18:55:48 +01:00
<li class="item pager-item"><a href="<?php echo Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo $i; ?></a></li>
2014-07-23 15:52:50 +02:00
<?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) { ?>
2015-02-08 18:55:48 +01:00
<a href="<?php echo Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo _t('gen.pagination.next'); ?> </a>
2014-07-23 15:52:50 +02:00
<?php } ?>
</li>
<?php $params[$getteur] = $this->nbPage; ?>
<li class="item pager-last">
<?php if ($this->currentPage < $this->nbPage) { ?>
2015-02-08 18:55:48 +01:00
<a href="<?php echo Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo _t('gen.pagination.last'); ?> »</a>
2014-07-23 15:52:50 +02:00
<?php } ?>
</li>
</ul>
<?php } ?>