@extends('layouts.app') @section('title', __('dashboard.Email Templates')) @section('page_heading', __('dashboard.Email Templates')) @section('content')
{{ __('dashboard.Email Templates') }} {{ $templates->total() }}
{{ __('dashboard.Email Campaigns') }} @can('create email templates') {{ __('dashboard.Add New Template') }} @endcan
@if($templates->isEmpty())
@include('layouts.partials.index-empty-state', ['icon' => 'fa-solid fa-envelope', 'title' => __('dashboard.No templates found'), 'message' => ''])
@else
@foreach($templates as $t) @endforeach
{{ __('dashboard.Template Name') }} {{ __('dashboard.Email Subject') }} {{ __('dashboard.Created By') }} {{ __('dashboard.Created At') }} {{ __('dashboard.Actions') }}
{{ $t->name }}
#{{ $t->id }}
{{ $t->subject }}
{{ mb_substr($t->creator->name ?? '?', 0, 1) }}
{{ $t->creator->name ?? '—' }}
{{ optional($t->created_at)->format('Y-m-d H:i') }} @canany(['edit email templates','delete email templates'])
@can('edit email templates') {{ __('dashboard.Edit') }} @endcan @can('delete email templates')
@csrf @method('DELETE')
@endcan
@endcanany
{{ $templates->links() }}
@endif
@endsection