@extends('admin.layouts.app') @section('title', $carousel->name . ' - ' . admin_trans('slides')) @section('page-title', $carousel->name) @section('content')
{{ admin_trans('carousels') }} {{ $carousel->name }}
{{ $carousel->is_active ? admin_trans('active') : admin_trans('inactive') }} @if($currentCountry && $availableLocales->count() > 0) {{ admin_trans('add_slide') }} @else @if(!$currentCountry) {{ admin_trans('select_country_first') }} @else {{ admin_trans('create_locale_first') }} @endif @endif
@if(!$currentCountry)

{{ admin_trans('select_country_first') }}

{{ admin_trans('use_country_filter_navbar') }}

@elseif($availableLocales->count() == 0)

{{ admin_trans('no_locales_available') }}

{{ admin_trans('please_create_locale_for_country') }} {{ $currentCountry->name }}

{{ admin_trans('create_locale') }}
@endif

{{ admin_trans('total_slides') }}

{{ $carousel->slides->count() }}

{{ admin_trans('slug') }}

{{ $carousel->slug }}

{{ admin_trans('type') }}

{{ $carousel->type }}

@if($currentCountry)
{{ $currentCountry->flag_emoji }}

{{ admin_trans('country') }}

{{ $currentCountry->name }}

@endif
@if($carousel->slides->isEmpty()) @if($currentCountry && $availableLocales->count() > 0) {{ admin_trans('add_slide') }} @endif @else
@foreach($carousel->slides as $slide)
@if($slide->getFirstMediaUrl('image'))
Slide
@else

{{ admin_trans('no_image') }}

@endif
@php $translation = $slide->translations->first(); @endphp @if($translation)

{{ $translation->title }}

@if($translation->description)

{{ $translation->description }}

@endif
@endif
@foreach($slide->translations->take(5) as $trans) {{ $trans->locale->code ?? 'N/A' }} @endforeach @if($slide->translations->count() > 5) +{{ $slide->translations->count() - 5 }} @endif
@if($slide->linkable)
{{ class_basename($slide->linkable_type) }}
@endif
@endforeach
@endif

{{ admin_trans('add_slide') }}

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

{{ admin_trans('creating_slide_for') }}

{{ $currentCountry->getName() }}

@foreach($availableLocales as $locale) @endforeach
@foreach($availableLocales as $locale)
@endforeach
@php $storesArray = $stores->map(function($store) { $translation = $store->translations->first(); return [ 'id' => $store->id, 'name' => $translation->name ?? 'Store #' . $store->id ]; })->toArray(); @endphp
@php $categoriesArray = $categories->map(function($category) { $translation = $category->translations->first(); return [ 'id' => $category->id, 'name' => $translation->name ?? 'Category #' . $category->id ]; })->toArray(); @endphp
{{ admin_trans('cancel') }} {{ admin_trans('create') }}
@else {{ admin_trans('close') }} @endif

{{ admin_trans('edit_slide') }}

@csrf @method('PUT') @if($availableLocales->count() > 0)
@foreach($availableLocales as $locale) @endforeach
@foreach($availableLocales as $locale)
@endforeach
@endif
Current Image
{{ admin_trans('cancel') }} {{ admin_trans('update') }}
@endsection @push('scripts') @endpush