{{-- Admin Demos index. MIRROR OF: admin.committees.index — same layout components, CSS shape, badge / count chip patterns. Differences from committee: - Title column shows the bilingual demo title (locale-aware) - Extra "Type" + "Mode" columns from label_options - Cover image thumbnail in the title cell when present - No status-toggle confirmation dialog (Demo status is lifecycle- managed only by `demos:expire-past`, same as committee post-2026-06) --}} @extends('admin.layouts.app') @section('title', __('admin.demos.index.title') . ' — ' . __('admin.brand.name')) @section('page_title', __('admin.demos.index.title')) @push('styles') @endpush @section('content') {{-- Subtitle uses trans_choice to resolve the pluralization template — calling __() leaked the raw template `{0} No demos yet|{1} :count demo|[2,*] :count demos` onto the page. trans_choice picks the right branch based on the demo count. Same fix the Tags index page applied earlier. (2026-06-15) --}} @include('admin.partials.flash')
@foreach (request()->except(['per_page', 'page']) as $k => $v) @if (is_array($v)) @foreach ($v as $vv) @endforeach @else @endif @endforeach
@foreach (request()->only(['q', 'sort', 'dir']) as $key => $value) @endforeach @php $typeFilterOptions = $typeOptions->mapWithKeys(fn ($o) => [ (int) $o->id => app()->getLocale() === 'ar' ? $o->name_ar : $o->name_en, ])->all(); @endphp
@if ($demos->isEmpty()) @else
@foreach ($demos as $demo) @endforeach
{{ __('admin.demos.fields.type') }} {{ __('admin.demos.fields.mode') }} {{ __('admin.demos.fields.meeting_time') }} {{ __('admin.demos.fields.startups') }} {{ __('admin.demos.fields.investors') }} {{ __('admin.demos.fields.created_by') }} {{ __('admin.fields.actions') }}
@if ($demo->cover_image_url) @endif {{ $demo->localizedTitle() }} {{ $demo->monthLabel() }} @if ($demo->type) {{ app()->getLocale() === 'ar' ? $demo->type->name_ar : $demo->type->name_en }} @else — @endif @if ($demo->mode) {{ app()->getLocale() === 'ar' ? $demo->mode->name_ar : $demo->mode->name_en }} @else — @endif {{ optional($demo->meeting_date)->format('Y-m-d') }} {{ $demo->formattedMeetingTime() }} {{ $demo->startups_count ?? $demo->startups->count() }} {{ $demo->investors_count ?? $demo->investors->count() }} @if ($demo->status === \App\Models\Demo::STATUS_ACTIVE) {{ __('admin.demos.status.active') }} @else {{ __('admin.demos.status.expired') }} @endif {{ $demo->creator?->name ?? '—' }}
{{ $demos->links() }}
@endif
@endsection