@extends('admin.layouts.app') @section('title', admin_trans('pages')) @section('page-title', admin_trans('pages')) @section('content')
@if(request('locale_id'))@endif @if(request('status'))@endif
@if($currentCountry && $availableLocales->count() > 1)
@if(request('search'))@endif @if(request('status'))@endif
@endif
@if(request('search'))@endif @if(request('locale_id'))@endif
@if(request()->hasAny(['search', 'locale_id', 'status'])) {{ admin_trans('clear_filters') }} @endif
{{ admin_trans('add_page') }}
{{ admin_trans('publish') }} {{ admin_trans('draft') }} {{ admin_trans('delete') }} {{ admin_trans('clear') }}
@if ($pages->isEmpty()) @if($currentCountry) {{ admin_trans('add_page') }} @else

{{ admin_trans('use_country_filter_navbar') }}

@endif @else @foreach ($pages as $page) @php $translation = $page->translations->first(); @endphp
{{ $translation->title ?? 'Page #' . $page->id }} @if ($translation && $translation->description)
{!! Str::limit(strip_tags($translation->description), 80) !!}
@endif
@foreach($page->translations->take(3) as $trans) {{ $trans->locale->code ?? 'N/A' }} @endforeach @if($page->translations->count() > 3) +{{ $page->translations->count() - 3 }} @endif
@csrf @method('PATCH')
{{ $page->created_at->format('Y-m-d') }}
@endforeach
@if ($pages->hasPages())
@endif @endif

{{ admin_trans('add_page') }}

@if($currentCountry && $availableLocales->count() > 0)
@csrf
{{ $currentCountry->flag_emoji }}

{{ admin_trans('creating_page_for') }}

{{ $currentCountry->getName() }}

@foreach($availableLocales as $locale) @endforeach
@foreach($availableLocales as $locale) @php $isRTL = $locale->direction === 'rtl'; @endphp
{{-- FIXED: استخدام نظام SecureTinyMCE الموحد --}} {{ admin_trans('description') }}
@endforeach
{{ admin_trans('cancel') }} {{ admin_trans('create') }}
@else {{ admin_trans('close') }} @endif

{{ admin_trans('edit_page') }}

@csrf @method('PUT') @if($availableLocales->count() > 0)
@foreach($availableLocales as $locale) @endforeach
@foreach($availableLocales as $locale) @php $isRTL = $locale->direction === 'rtl'; @endphp
{{-- FIXED: استخدام نظام TinyMCE الموحد مع ربط البيانات الصحيح --}}
{{ admin_trans('description') }}
@endforeach
@endif
{{ admin_trans('cancel') }} {{ admin_trans('update') }}
@endsection @push('scripts') @endpush