@extends('layouts.dashboard')
@section('content')
@php
/**
* Content pages list. The editor is its own screen (/admin/pages/new, /admin/pages/{id}/edit),
* so this file is a table and nothing else โ no dialog markup, no rich-text bundle, no per-row
* copy of every field's value sitting in data attributes.
*
* @var array $rows page rows
* @var array $pager
*/
@endphp
@php /* .qm-d2: the dashboard density standard (app.css ยง35) */
@endphp
@php // Page primary action โ top-bar subheader slot (leaves the table card header for the
// title + any table-scoped utility). ob_start captures the button HTML for the layout slot.
ob_start();
@endphp
{{ t_raw('admin.pages.add_btn') }}
@php \App\Support\View::slot('subhead', ob_get_clean());
@endphp
{{ t_raw('admin.pages.title') }}
| {{ t_raw('common.title') }} | {{ t_raw('common.slug') }} | {{ t_raw('common.status') }} | {{ t_raw('common.updated') }} | {{ t_raw('common.actions') }} |
@php /* The pages the product ships with โ About, Partner, Help, Contact. They are real
routes rather than rows, so they never appeared here and an operator had no way
to find them. They lead the list because they are the ones people look for, and
they carry no delete: a built-in page is edited, never removed. */
@endphp
@foreach (\App\Services\PageContent::slugs() as $builtIn)
@php $bpRoute = \App\Services\PageContent::route($builtIn); @endphp
| {{ \App\Services\PageContent::title($builtIn) }} |
{{ ltrim($bpRoute, '/') }} |
{{ t_raw('common.status_published') }} |
{{ t_raw('admin.pages.built_in') }} |
|
@endforeach
@if ($rows)
@foreach ($rows as $p)
| {{ $p['title'] }} |
{{ $p['slug'] }} |
{!! $p['status'] === 'published' ? t('common.status_published') : t('common.status_draft') !!} |
{!! fmt_day($p['updated_at']) !!} |
@if ($p['status'] === 'published')
@else
@endif
@if (!in_array($p['slug'], \App\Http\Controllers\Admin\PageController::CORE_SLUGS, true))
@endif
|
@endforeach
@else
@partial('table-empty', ['colspan' => 5, 'icon' => 'fa-file-alt', 'msg' => t('admin.pages.empty')])
@endif
@partial('table-toolbar', ['pager' => $pager, 'base' => '/admin/pages'])
@php /* /.qm-d2 */
@endphp
@endsection