Final changes
This commit is contained in:
34
resources/views/modcp/pagination.blade.php
Normal file
34
resources/views/modcp/pagination.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php /** @var \Illuminate\Pagination\LengthAwarePaginator $paginator */ ?>
|
||||
@if ($paginator->hasPages())
|
||||
<div class="database-pagination">
|
||||
|
||||
@if ($paginator->onFirstPage())
|
||||
<button class="btn" disabled>«</button>
|
||||
@else
|
||||
<a class="btn" href="{{ $paginator->previousPageUrl() }}">«</a>
|
||||
@endif
|
||||
|
||||
{{-- Pages --}}
|
||||
@foreach ($elements as $element)
|
||||
@if (is_string($element))
|
||||
<button class="btn" disabled>{{ $element }}</button>
|
||||
@endif
|
||||
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
<a
|
||||
class="btn {{ $page == $paginator->currentPage() ? 'active' : '' }}"
|
||||
href="{{ $url }}"
|
||||
>{{ $page }}</a>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@if ($paginator->hasMorePages())
|
||||
<a class="btn" href="{{ $paginator->nextPageUrl() }}">»</a>
|
||||
@else
|
||||
<button class="btn" disabled>»</button>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@endif
|
||||
Reference in New Issue
Block a user