develop
Last change
on this file since 5e56e8a was e6c1f87, checked in by beratkjufliju <kufliju@…>, 3 years ago |
added pagination, is_important
|
-
Property mode
set to
100644
|
File size:
2.2 KB
|
Rev | Line | |
---|
[e6c1f87] | 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')">«</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')">«</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 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"><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')">»</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')">»</a>
|
---|
| 43 | </li>
|
---|
| 44 | @endif
|
---|
| 45 | </ul>
|
---|
| 46 | </nav>
|
---|
| 47 | @endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.