46 lines
2.1 KiB
PHP
46 lines
2.1 KiB
PHP
@if ($paginator->hasPages())
|
||
<div class="mq-pagination">
|
||
<span class="mq-pag-info">
|
||
{{ $paginator->firstItem() }}–{{ $paginator->lastItem() }} von {{ $paginator->total() }}
|
||
</span>
|
||
<div class="mq-pag-btns">
|
||
|
||
@if ($paginator->onFirstPage())
|
||
<button class="mq-pag-btn" disabled>
|
||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M7.5 2L3.5 6l4 4" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||
</button>
|
||
@else
|
||
<button wire:click="previousPage" wire:loading.attr="disabled" class="mq-pag-btn">
|
||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M7.5 2L3.5 6l4 4" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||
</button>
|
||
@endif
|
||
|
||
@foreach ($elements as $element)
|
||
@if (is_string($element))
|
||
<button class="mq-pag-btn" disabled>…</button>
|
||
@endif
|
||
@if (is_array($element))
|
||
@foreach ($element as $page => $url)
|
||
@if ($page == $paginator->currentPage())
|
||
<button class="mq-pag-btn active">{{ $page }}</button>
|
||
@else
|
||
<button wire:click="gotoPage({{ $page }})" class="mq-pag-btn">{{ $page }}</button>
|
||
@endif
|
||
@endforeach
|
||
@endif
|
||
@endforeach
|
||
|
||
@if ($paginator->hasMorePages())
|
||
<button wire:click="nextPage" wire:loading.attr="disabled" class="mq-pag-btn">
|
||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M4.5 2L8.5 6l-4 4" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||
</button>
|
||
@else
|
||
<button class="mq-pag-btn" disabled>
|
||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M4.5 2L8.5 6l-4 4" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||
</button>
|
||
@endif
|
||
|
||
</div>
|
||
</div>
|
||
@endif
|