{{-- checkbox --}} {{-- title --}} {{-- SEO Details --}} {{-- status --}} {{-- actions --}} @php $currentSort = request()->query('sort', ''); $currentDir = request()->query('dir', ''); if (! in_array($currentDir, ['asc', 'desc'], true)) { $currentDir = ''; } $isEmpty = $data->isEmpty(); $sortIcon = function (string $col) use ($currentSort, $currentDir, $isEmpty) { if ($isEmpty) return ''; $active = $currentSort === $col; $upActive = $active && $currentDir === 'asc'; $downActive = $active && $currentDir === 'desc'; $upClass = $upActive ? 'text-white' : 'text-white/40'; $downClass = $downActive ? 'text-white' : 'text-white/40'; return sprintf( '', $upClass, $downClass ); }; @endphp {{-- Checkbox (select-all) --}} @if(!$isEmpty) @endif
{{ __('pages/admin/cms.table.title') }} {!! $sortIcon('title') !!}
SEO Details
{{ __('pages/admin/cms.table.status') }}
{{ __('pages/admin/cms.table.actions') }}
@foreach($data as $item) @if($item->title) {{ $item->title }} @else - @endif
@if(!empty($item->meta_title)) @else @endif {{ __('pages/admin/cms.table.meta_title') }}
@if(!empty($item->meta_keywords)) @else @endif {{ __('pages/admin/cms.table.meta_keywords') }}
@if(!empty($item->meta_description)) @else @endif {{ __('pages/admin/cms.table.meta_description') }}
@if(!($isArchivedPage ?? false)) {{-- Interactive status dropdown (active CMS page only) --}} @foreach($statuses as $status) @endforeach @else {{-- Read-only badge on archived page --}} {{ $item->status_label }} @endif
@if($isArchivedPage ?? false) {{-- Restore --}} @else @endif
@endforeach @if($data->isEmpty() && ($totalCms ?? 0) > 0)

{{ __('pages/admin/cms.no_data_available.title') }}

{{ __('pages/admin/cms.no_results_filtered') }}

{{ __('buttons.filter.clear') }}
@endif
{{ $data->links('components.ajax-pagination') }}