- Admin video list: description was stored as sanitized rich HTML, so
the admin's "{{ Str::limit(description, 55) }}" row printed literal
<p>…</p> tags in the preview. Pre-strip the HTML, collapse
whitespace, and surface the full stripped text in a title=""
tooltip. The visible title column now also carries title="" so the
admin can hover an ellipsized name to read it in full.
- Shared pagination partial (used by admin videos + users + feed
pagers) now ships First + Last buttons. The icons use the double-
chevron variants and the aria-label makes the destination explicit.
Buttons disable cleanly on page 1 and the last page.
- Audit-logs pager has the same four buttons: First, Prev, N…N, Next,
Last. Each disabled state carries a title tooltip so the admin
knows what each stub does without hovering through trial and error.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
102 lines
3.9 KiB
PHP
102 lines
3.9 KiB
PHP
@if ($paginator->hasPages())
|
|
@once('pagination-styles')
|
|
<style>
|
|
.pag-nav { display:flex; align-items:center; gap:4px; flex-wrap:wrap; }
|
|
.pag-item {
|
|
display:inline-flex; align-items:center; justify-content:center;
|
|
min-width:32px; height:32px; padding:0 8px;
|
|
border-radius:6px;
|
|
border:1px solid var(--border, var(--border-color, #252525));
|
|
background:var(--bg-card, var(--bg-secondary, #141414));
|
|
color:var(--text, var(--text-primary, #f0f0f0));
|
|
font-size:13px; font-weight:500; line-height:1;
|
|
text-decoration:none; cursor:pointer;
|
|
transition:background .15s, border-color .15s, color .15s;
|
|
user-select:none;
|
|
}
|
|
a.pag-item:hover {
|
|
background:var(--border-light, var(--border-color, #2e2e2e));
|
|
border-color:var(--border-light, var(--border-color, #303030));
|
|
color:var(--text, var(--text-primary, #f0f0f0));
|
|
}
|
|
.pag-item.active {
|
|
background:var(--brand, var(--brand-red, #e61e1e));
|
|
border-color:var(--brand, var(--brand-red, #e61e1e));
|
|
color:#fff;
|
|
cursor:default;
|
|
}
|
|
.pag-item.disabled {
|
|
opacity:.35; cursor:default; pointer-events:none;
|
|
}
|
|
.pag-item.dots {
|
|
border-color:transparent; background:transparent;
|
|
color:var(--text-2, var(--text-secondary, #888));
|
|
pointer-events:none;
|
|
}
|
|
</style>
|
|
@endonce
|
|
<nav class="pag-nav" aria-label="Pagination">
|
|
|
|
{{-- First --}}
|
|
@if ($paginator->onFirstPage())
|
|
<span class="pag-item disabled" aria-disabled="true" title="First page">
|
|
<i class="bi bi-chevron-double-left" style="font-size:11px;" aria-hidden="true"></i>
|
|
</span>
|
|
@else
|
|
<a class="pag-item" href="{{ $paginator->url(1) }}" aria-label="First page" title="First page">
|
|
<i class="bi bi-chevron-double-left" style="font-size:11px;" aria-hidden="true"></i>
|
|
</a>
|
|
@endif
|
|
|
|
{{-- Prev --}}
|
|
@if ($paginator->onFirstPage())
|
|
<span class="pag-item disabled" aria-disabled="true" title="Previous page">
|
|
<i class="bi bi-chevron-left" style="font-size:11px;" aria-hidden="true"></i>
|
|
</span>
|
|
@else
|
|
<a class="pag-item" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="Previous page" title="Previous page">
|
|
<i class="bi bi-chevron-left" style="font-size:11px;" aria-hidden="true"></i>
|
|
</a>
|
|
@endif
|
|
|
|
{{-- Page numbers --}}
|
|
@foreach ($elements as $element)
|
|
@if (is_string($element))
|
|
<span class="pag-item dots">{{ $element }}</span>
|
|
@endif
|
|
@if (is_array($element))
|
|
@foreach ($element as $page => $url)
|
|
@if ($page == $paginator->currentPage())
|
|
<span class="pag-item active" aria-current="page">{{ $page }}</span>
|
|
@else
|
|
<a class="pag-item" href="{{ $url }}">{{ $page }}</a>
|
|
@endif
|
|
@endforeach
|
|
@endif
|
|
@endforeach
|
|
|
|
{{-- Next --}}
|
|
@if ($paginator->hasMorePages())
|
|
<a class="pag-item" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="Next page" title="Next page">
|
|
<i class="bi bi-chevron-right" style="font-size:11px;" aria-hidden="true"></i>
|
|
</a>
|
|
@else
|
|
<span class="pag-item disabled" aria-disabled="true" title="Next page">
|
|
<i class="bi bi-chevron-right" style="font-size:11px;" aria-hidden="true"></i>
|
|
</span>
|
|
@endif
|
|
|
|
{{-- Last --}}
|
|
@if ($paginator->hasMorePages() && $paginator->lastPage() > $paginator->currentPage())
|
|
<a class="pag-item" href="{{ $paginator->url($paginator->lastPage()) }}" aria-label="Last page" title="Last page ({{ $paginator->lastPage() }})">
|
|
<i class="bi bi-chevron-double-right" style="font-size:11px;" aria-hidden="true"></i>
|
|
</a>
|
|
@else
|
|
<span class="pag-item disabled" aria-disabled="true" title="Last page">
|
|
<i class="bi bi-chevron-double-right" style="font-size:11px;" aria-hidden="true"></i>
|
|
</span>
|
|
@endif
|
|
|
|
</nav>
|
|
@endif
|