fix desain
This commit is contained in:
parent
c1848e0493
commit
5fe5273865
@ -110,13 +110,73 @@
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="p-2 text-center text-gray-500 border border-gray-300">Belum ada template</td>
|
||||
<td colspan="7" class="p-2 text-center text-gray-500 border border-gray-300">Belum ada
|
||||
template</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Pagination -->
|
||||
<div class="p-4 flex justify-center">
|
||||
<div class="flex space-x-1">
|
||||
{{-- Tombol Previous --}}
|
||||
@if ($templates->onFirstPage())
|
||||
<span class="px-3 py-1 rounded-lg bg-gray-200 text-gray-500 cursor-not-allowed">Prev</span>
|
||||
@else
|
||||
<a href="{{ $templates->previousPageUrl() }}"
|
||||
class="px-3 py-1 rounded-lg bg-gray-200 text-gray-700 hover:bg-gray-300">Prev</a>
|
||||
@endif
|
||||
|
||||
@php
|
||||
$total = $templates->lastPage();
|
||||
$current = $templates->currentPage();
|
||||
@endphp
|
||||
|
||||
{{-- Selalu tampilkan halaman pertama --}}
|
||||
@if ($current > 2)
|
||||
<a href="{{ $templates->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="{{ $templates->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="{{ $templates->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 ($templates->hasMorePages())
|
||||
<a href="{{ $templates->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>
|
||||
|
||||
|
||||
|
||||
<!-- Modal Tambah Template -->
|
||||
@if (!isset($kategori))
|
||||
@ -131,7 +191,8 @@
|
||||
|
||||
<!-- Scrollable content -->
|
||||
<div class="p-4 space-y-4 overflow-y-auto flex-1">
|
||||
<form action="{{ route('templates.store') }}" method="POST" enctype="multipart/form-data" class="h-full flex flex-col">
|
||||
<form action="{{ route('templates.store') }}" method="POST" enctype="multipart/form-data"
|
||||
class="h-full flex flex-col">
|
||||
@csrf
|
||||
<div class="flex-1 space-y-4">
|
||||
<div>
|
||||
@ -154,8 +215,7 @@
|
||||
<!-- FITUR -->
|
||||
<div>
|
||||
<label class="block text-sm font-medium">Fitur</label>
|
||||
<div id="fiturContainerTambah"
|
||||
class="space-y-3 max-h-64 overflow-auto p-2 border rounded">
|
||||
<div id="fiturContainerTambah" class="space-y-3 max-h-64 overflow-auto p-2 border rounded">
|
||||
@foreach ($kategoriFiturs as $kategoriFitur)
|
||||
<div>
|
||||
<p class="font-semibold text-gray-700 mb-1">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user