This repository has been archived by the owner on Mar 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
/
paginator.phtml
60 lines (50 loc) · 1.61 KB
/
paginator.phtml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php if($this->pageCount): ?>
<div>
<ul class="pagination">
<!-- previous page link -->
<?php if(isset($this->previous)): ?>
<li>
<a href="<?php echo $this->url($this->route, array(), null, true); ?>?page=<?php echo $this->previous; ?>"><span aria-hidden="true">«</span></a>
</li>
<?php else: ?>
<li class="disabled">
<a href="#"><span aria-hidden="true">«</span></a>
</li>
<?php endif; ?>
<!-- first page link -->
<?php if(isset($this->first)): ?>
<li>
<a href="<?php echo $this->url($this->route, array(), null, true); ?>?page=<?php echo $this->first; ?>">first</a>
</li>
<?php endif; ?>
<!-- numbered page links -->
<?php foreach($this->pagesInRange as $page): ?>
<?php if($page != $this->current): ?>
<li>
<a href="<?php echo $this->url($this->route, array(), null, true); ?>?page=<?php echo $page; ?>"><?php echo $page; ?></a>
</li>
<?php else: ?>
<li class="active">
<a href="#"><?php echo $page; ?></a>
</li>
<?php endif; ?>
<?php endforeach; ?>
<!-- last page link -->
<?php if(isset($this->last)): ?>
<li>
<a href="<?php echo $this->url($this->route, array(), null, true); ?>?page=<?php echo $this->last; ?>">last</a>
</li>
<?php endif; ?>
<!-- next page link -->
<?php if(isset($this->next)): ?>
<li>
<a href="<?php echo $this->url($this->route, array(), null, true); ?>?page=<?php echo $this->next; ?>"><span aria-hidden="true">»</span></a>
</li>
<?php else: ?>
<li class="disabled">
<a href="#"><span aria-hidden="true">»</span></a>
</li>
<?php endif; ?>
</ul>
</div>
<?php endif; ?>