| 1 |
@if ($paginator->hasPages()) |
| 2 |
<nav role="navigation" aria-label="{{ __('Pagination Navigation') }}"> |
| 3 |
|
| 4 |
<div class="flex gap-2 items-center justify-between sm:hidden"> |
| 5 |
|
| 6 |
@if ($paginator->onFirstPage()) |
| 7 |
<span class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-600 bg-white border border-gray-300 cursor-not-allowed leading-5 rounded-md dark:text-gray-300 dark:bg-gray-700 dark:border-gray-600"> |
| 8 |
{!! __('pagination.previous') !!} |
| 9 |
</span> |
| 10 |
@else |
| 11 |
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-700 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-800 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-200 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-900 dark:hover:text-gray-200"> |
| 12 |
{!! __('pagination.previous') !!} |
| 13 |
</a> |
| 14 |
@endif |
| 15 |
|
| 16 |
@if ($paginator->hasMorePages()) |
| 17 |
<a href="{{ $paginator->nextPageUrl() }}" rel="next" class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-700 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-800 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-200 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-900 dark:hover:text-gray-200"> |
| 18 |
{!! __('pagination.next') !!} |
| 19 |
</a> |
| 20 |
@else |
| 21 |
<span class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-600 bg-white border border-gray-300 cursor-not-allowed leading-5 rounded-md dark:text-gray-300 dark:bg-gray-700 dark:border-gray-600"> |
| 22 |
{!! __('pagination.next') !!} |
| 23 |
</span> |
| 24 |
@endif |
| 25 |
|
| 26 |
</div> |
| 27 |
|
| 28 |
<div class="hidden sm:flex-1 sm:flex sm:gap-2 sm:items-center sm:justify-between"> |
| 29 |
|
| 30 |
<div> |
| 31 |
<p class="text-sm text-gray-700 leading-5 dark:text-gray-600"> |
| 32 |
{!! __('Showing') !!} |
| 33 |
@if ($paginator->firstItem()) |
| 34 |
<span class="font-medium">{{ $paginator->firstItem() }}</span> |
| 35 |
{!! __('to') !!} |
| 36 |
<span class="font-medium">{{ $paginator->lastItem() }}</span> |
| 37 |
@else |
| 38 |
{{ $paginator->count() }} |
| 39 |
@endif |
| 40 |
{!! __('of') !!} |
| 41 |
<span class="font-medium">{{ $paginator->total() }}</span> |
| 42 |
{!! __('results') !!} |
| 43 |
</p> |
| 44 |
</div> |
| 45 |
|
| 46 |
<div> |
| 47 |
<span class="inline-flex rtl:flex-row-reverse shadow-sm rounded-md"> |
| 48 |
|
| 49 |
{{-- Previous Page Link --}} |
| 50 |
@if ($paginator->onFirstPage()) |
| 51 |
<span aria-disabled="true" aria-label="{{ __('pagination.previous') }}"> |
| 52 |
<span class="inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-not-allowed rounded-l-md leading-5 dark:bg-gray-700 dark:border-gray-600 dark:text-gray-400" aria-hidden="true"> |
| 53 |
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
| 54 |
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" /> |
| 55 |
</svg> |
| 56 |
</span> |
| 57 |
</span> |
| 58 |
@else |
| 59 |
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-l-md leading-5 hover:text-gray-400 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:active:bg-gray-700 dark:focus:border-blue-800 dark:text-gray-300 dark:hover:bg-gray-900 dark:hover:text-gray-300" aria-label="{{ __('pagination.previous') }}"> |
| 60 |
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
| 61 |
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" /> |
| 62 |
</svg> |
| 63 |
</a> |
| 64 |
@endif |
| 65 |
|
| 66 |
{{-- Pagination Elements --}} |
| 67 |
@foreach ($elements as $element) |
| 68 |
{{-- "Three Dots" Separator --}} |
| 69 |
@if (is_string($element)) |
| 70 |
<span aria-disabled="true"> |
| 71 |
<span class="inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 cursor-default leading-5 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300">{{ $element }}</span> |
| 72 |
</span> |
| 73 |
@endif |
| 74 |
|
| 75 |
{{-- Array Of Links --}} |
| 76 |
@if (is_array($element)) |
| 77 |
@foreach ($element as $page => $url) |
| 78 |
@if ($page == $paginator->currentPage()) |
| 79 |
<span aria-current="page"> |
| 80 |
<span class="inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-gray-200 border border-gray-300 cursor-default leading-5 dark:bg-gray-700 dark:border-gray-600 dark:text-gray-300">{{ $page }}</span> |
| 81 |
</span> |
| 82 |
@else |
| 83 |
<a href="{{ $url }}" class="inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 hover:text-gray-700 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:hover:text-gray-300 dark:active:bg-gray-700 dark:focus:border-blue-800 hover:bg-gray-100 dark:hover:bg-gray-900" aria-label="{{ __('Go to page :page', ['page' => $page]) }}"> |
| 84 |
{{ $page }} |
| 85 |
</a> |
| 86 |
@endif |
| 87 |
@endforeach |
| 88 |
@endif |
| 89 |
@endforeach |
| 90 |
|
| 91 |
{{-- Next Page Link --}} |
| 92 |
@if ($paginator->hasMorePages()) |
| 93 |
<a href="{{ $paginator->nextPageUrl() }}" rel="next" class="inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-r-md leading-5 hover:text-gray-400 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:active:bg-gray-700 dark:focus:border-blue-800 dark:text-gray-300 dark:hover:bg-gray-900 dark:hover:text-gray-300" aria-label="{{ __('pagination.next') }}"> |
| 94 |
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
| 95 |
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" /> |
| 96 |
</svg> |
| 97 |
</a> |
| 98 |
@else |
| 99 |
<span aria-disabled="true" aria-label="{{ __('pagination.next') }}"> |
| 100 |
<span class="inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-not-allowed rounded-r-md leading-5 dark:bg-gray-700 dark:border-gray-600 dark:text-gray-400" aria-hidden="true"> |
| 101 |
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
| 102 |
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" /> |
| 103 |
</svg> |
| 104 |
</span> |
| 105 |
</span> |
| 106 |
@endif |
| 107 |
</span> |
| 108 |
</div> |
| 109 |
</div> |
| 110 |
</nav> |
| 111 |
@endif |