Merge branch 'main' of https://git.abbauf.com/Magang-2025/Undangan
This commit is contained in:
commit
b3f5e9ad47
@ -79,9 +79,58 @@
|
|||||||
|
|
||||||
<!-- Pagination -->
|
<!-- Pagination -->
|
||||||
<div class="p-4 flex justify-center">
|
<div class="p-4 flex justify-center">
|
||||||
{{ $kategoriFitur->links() }}
|
<div class="flex space-x-1">
|
||||||
|
{{-- Tombol Previous --}}
|
||||||
|
@if ($kategoriFitur->onFirstPage())
|
||||||
|
<span class="px-3 py-1 rounded-lg bg-gray-200 text-gray-500 cursor-not-allowed">Prev</span>
|
||||||
|
@else
|
||||||
|
<a href="{{ $kategoriFitur->previousPageUrl() }}"
|
||||||
|
class="px-3 py-1 rounded-lg bg-gray-200 text-gray-700 hover:bg-gray-300">Prev</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@php
|
||||||
|
$total = $kategoriFitur->lastPage();
|
||||||
|
$current = $kategoriFitur->currentPage();
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
{{-- Selalu tampilkan halaman pertama --}}
|
||||||
|
@if ($current > 2)
|
||||||
|
<a href="{{ $kategoriFitur->url(1) }}"
|
||||||
|
class="px-3 py-1 rounded-lg bg-gray-200 text-gray-700 hover:bg-blue-100">1</a>
|
||||||
|
@if ($current > 3)
|
||||||
|
<span class="px-3 py-1 text-gray-500">...</span>
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Halaman tengah --}}
|
||||||
|
@for ($i = max(1, $current - 1); $i <= min($total, $current + 1); $i++)
|
||||||
|
@if ($i == $current)
|
||||||
|
<span class="px-3 py-1 rounded-lg bg-blue-600 text-white font-semibold">{{ $i }}</span>
|
||||||
|
@else
|
||||||
|
<a href="{{ $kategoriFitur->url($i) }}"
|
||||||
|
class="px-3 py-1 rounded-lg bg-gray-200 text-gray-700 hover:bg-blue-100">{{ $i }}</a>
|
||||||
|
@endif
|
||||||
|
@endfor
|
||||||
|
|
||||||
|
{{-- Selalu tampilkan halaman terakhir --}}
|
||||||
|
@if ($current < $total - 1)
|
||||||
|
@if ($current < $total - 2)
|
||||||
|
<span class="px-3 py-1 text-gray-500">...</span>
|
||||||
|
@endif
|
||||||
|
<a href="{{ $kategoriFitur->url($total) }}"
|
||||||
|
class="px-3 py-1 rounded-lg bg-gray-200 text-gray-700 hover:bg-blue-100">{{ $total }}</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Tombol Next --}}
|
||||||
|
@if ($kategoriFitur->hasMorePages())
|
||||||
|
<a href="{{ $kategoriFitur->nextPageUrl() }}"
|
||||||
|
class="px-3 py-1 rounded-lg bg-gray-200 text-gray-700 hover:bg-gray-300">Next</a>
|
||||||
|
@else
|
||||||
|
<span class="px-3 py-1 rounded-lg bg-gray-200 text-gray-500 cursor-not-allowed">Next</span>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal Tambah -->
|
<!-- Modal Tambah -->
|
||||||
|
|||||||
@ -73,7 +73,7 @@
|
|||||||
<i class="bi bi-chevron-down transition-transform {{ $isFiturPage ? 'rotate-180' : '' }}"
|
<i class="bi bi-chevron-down transition-transform {{ $isFiturPage ? 'rotate-180' : '' }}"
|
||||||
id="manajemenFiturIcon"></i>
|
id="manajemenFiturIcon"></i>
|
||||||
</button>
|
</button>
|
||||||
<ul class="submenu pl-6 space-y-1 {{ $isFiturPage ? 'show' : '' }}" id="manajemenFiturSubmenu">
|
<ul class="submenu pl-6 space-y-1 mt-2 {{ $isFiturPage ? 'show' : '' }}" id="manajemenFiturSubmenu">
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ route('admin.kategori_fitur.index') }}"
|
<a href="{{ route('admin.kategori_fitur.index') }}"
|
||||||
class="block py-2 px-2 rounded {{ request()->is('admin/kategori_fitur*') ? 'bg-blue-100 text-blue-600' : 'text-gray-500 hover:text-blue-600 hover:bg-blue-50' }}">
|
class="block py-2 px-2 rounded {{ request()->is('admin/kategori_fitur*') ? 'bg-blue-100 text-blue-600' : 'text-gray-500 hover:text-blue-600 hover:bg-blue-50' }}">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user