@extends('admin.layouts.app') @section('title', __('campaigns.tpl_title')) @section('header', __('campaigns.tpl_title')) @section('breadcrumb') {{ __('campaigns.title') }} / {{ __('campaigns.tpl_title') }} @endsection @section('header-actions') @endsection @section('content') @php $catColors = [ 'minimal' => ['badge-secondary', __('campaigns.tpl_cat_minimal')], 'newsletter' => ['badge-info', __('campaigns.tpl_cat_newsletter')], 'announcement' => ['badge-primary', __('campaigns.tpl_cat_announcement')], 'promotional' => ['badge-success', __('campaigns.tpl_cat_promotional')], 'custom' => ['badge-warning', __('campaigns.tpl_cat_custom')], ]; @endphp {{-- Template grid --}} @if($templates->isEmpty())

{{ __('campaigns.tpl_empty') }}

@else
@foreach($templates as $tpl) @php [$catBadge, $catLabel] = $catColors[$tpl->category] ?? ['badge-secondary', $tpl->category]; @endphp
{{-- Preview area --}}
{{-- Info --}}

{{ $tpl->name }}

@if($tpl->description)

{{ $tpl->description }}

@endif
{{ $catLabel }} @if($tpl->is_system) {{ __('campaigns.tpl_system') }} @endif
{{-- Actions --}}
{{ __('campaigns.tpl_preview') }} @if(!$tpl->is_system)
@csrf @method('DELETE')
@endif
@endforeach
@endif {{-- CREATE MODAL --}} {{-- EDIT MODAL --}} @endsection @push('scripts') @endpush