source: resources/views/layouts/pagination.blade.php@ e651d0d

develop
Last change on this file since e651d0d was 0208bbd, checked in by Berat Kjufliju <kufliju@…>, 3 years ago

edited pagination

  • Property mode set to 100644
File size: 2.2 KB
Line 
1@if ($paginator->hasPages())
2
3
4 <nav aria-label="...">
5 <ul class="pagination justify-content-center">
6
7 @if ($paginator->onFirstPage())
8 <li class="page-item disabled"><a class="page-link" href="{{ \Request::url() }}" rel="prev" aria-label="@lang('pagination.first')">&laquo;</a>
9 </li>
10 <li class="page-item disabled"><a class="page-link" href="#">Previous <span class="sr-only"></span></a></li>
11 @else
12 <li class="page-item"><a class="page-link" href="{{ \Request::url() }}" rel="prev" aria-label="@lang('pagination.first')">&laquo;</a>
13 </li>
14 <li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">Previous</a></li>
15 @endif
16
17 @foreach ($elements as $element)
18
19 @if (is_string($element))
20 <li class="page-item-test disabled"><span>{{ $element }}</span></li>
21 @endif
22
23 @if (is_array($element))
24 @foreach ($element as $page => $url)
25 @if ($page == $paginator->currentPage())
26 <li class="page-item active"><a class="page-link" href="#">{{ $page }} <span class="sr-only"></span></a></li>
27 @else
28 <li class="page-item-test"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
29 @endif
30 @endforeach
31 @endif
32 @endforeach
33
34 @if ($paginator->hasMorePages())
35 <li><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">Next</a></li>
36 <li class="page-item">
37 <a class="page-link" href="{{ \Request::url().'?page='.$paginator->lastPage() }}" rel="last" aria-label="@lang('pagination.last')">&raquo;</a>
38 </li>
39 @else
40 <li class="page-item disabled"><a class="page-link" href="#">Next <span class="sr-only"></span></a></li>
41 <li class="page-item disabled">
42 <a class="page-link" href="{{ \Request::url().'?page='.$paginator->lastPage() }}" rel="last" aria-label="@lang('pagination.last')">&raquo;</a>
43 </li>
44 @endif
45 </ul>
46 </nav>
47@endif
Note: See TracBrowser for help on using the repository browser.