aboutsummaryrefslogtreecommitdiff
path: root/app/views/helpers/logs_pagination.phtml
blob: bf9d91f0473eb96d4d2da240233b014b854d78c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
	$c = Minz_Request::controllerName();
	$a = Minz_Request::actionName();
	$params = Minz_Request::fetchGET();
?>

<?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 Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>">« <?php echo _t('gen.pagination.first'); ?></a>
		<?php } ?>
	</li>

	<?php $params[$getteur] = $this->currentPage - 1; ?>
	<li class="item pager-previous">
		<?php if ($this->currentPage > 1) { ?>
		<a href="<?php echo Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>">‹ <?php echo _t('gen.pagination.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 Minz_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 Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo _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="<?php echo Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo _t('gen.pagination.last'); ?> »</a>
		<?php } ?>
	</li>
</ul>
<?php } ?>