{{ __('Sequences') }} @if ($canCampaign) {{ __('Email campaigns') }} @endif @if ($canManage) {{ __('New template') }} @endif
@foreach ($metrics as $m)

{{ $m['label'] }}

{{ number_format($m['value']) }}

{{ $m['sub'] }}
@endforeach
@php $tabMeta = [ 'all' => ['label' => __('All'), 'icon' => 'queue-list'], 'shared' => ['label' => __('Shared'), 'icon' => 'users'], 'personal' => ['label' => __('Only me'), 'icon' => 'user'], ]; @endphp
@foreach ($tabMeta as $key => $meta) @endforeach

{{ __('Templates') }}

{{ __('A saved email for a sequence, an email campaign, or an automation rule once a director approves it. A shared template is for the whole team. A personal one stays with you. Nothing here sends by itself.') }}

@forelse ($templates as $template) @empty @endforelse
{{ __('Name') }} {{ __('Subject') }} {{ __('Use') }} {{ __('Who sees it') }} {{ __('Actions') }}
{{ $template->name }} @if (! $template->is_active) {{ __('Inactive') }} @endif @if ($template->approved_for_automation) {{ __('Automation') }} @endif {{ $template->subject }} {{ __(\App\Models\Crm\EmailTemplate::PURPOSES[$template->purpose] ?? $template->purpose) }} {{ __(\App\Models\Crm\EmailTemplate::VISIBILITIES[$template->visibility] ?? $template->visibility) }}
@can('update', $template) @endcan @if ($canManage) @endif @if ($canApprove) @endif @can('delete', $template) @endcan
{{ $templates->links() }}
{{ $previewOnly ? __('Preview template') : ($editingId ? __('Edit template') : __('New template')) }}
@unless ($previewOnly)
{{ __('Insert into') }}
@foreach (\App\Models\Crm\EmailTemplate::MERGE_FIELDS as $field => $label) @endforeach
@endunless
@if ($previewContact)
{{ $previewContact->name }}
@else @if ($previewMatches->isNotEmpty())
    @foreach ($previewMatches as $match)
  • @endforeach
@endif @endif @if ($preview)

{{ __('Subject') }}

{{ $preview['subject'] !== '' ? $preview['subject'] : __('(blank)') }}

{!! $preview['body'] !!}
@endif
{{ $previewOnly ? __('Close') : __('Cancel') }} @unless ($previewOnly) {{ __('Save') }} {{ __('Saving…') }} @endunless