{{ __('templates.title') }}

{{ __('templates.subtitle') }}

{{-- The list. Order is the operator's own, because the order they think in is neither alphabetical nor the order these happened to be written in. --}}

{{ __('templates.list') }}

@if ($templates->isEmpty())

{{ __('templates.empty') }}

@else
    @foreach ($templates as $template)
  • $template->active, 'text-muted line-through' => ! $template->active])> {{ $template->name }} @if (! $template->active) {{ __('templates.retired') }} @endif {{-- Two clicks, one value each, no height change: R20's exception. --}}

    {{ $template->subject }}

    {{ $template->body }}

    {{-- R20: editing opens a modal. A five-line textarea in a list row is the height jump the rule exists to stop. --}} {{ __('templates.edit') }} {{ $template->active ? __('templates.retire') : __('templates.restore') }}
  • @endforeach
@endif
{{-- Creating. A form that IS the page rather than a modal — R20 exempts exactly this, because nothing is being edited in place. --}}

{{ __('templates.new') }}

@error('body')

{{ $message }}

@enderror
{{ __('templates.create') }}
{{-- The placeholders, rendered from the renderer's own list so a token added there appears here without anybody writing it down twice. --}}

{{ __('templates.placeholders') }}

{{ __('templates.placeholders_note') }}

@foreach ($placeholders as $token => $explanation) {{-- Assembled in PHP, not inline: Blade's echo tag ends at the first }} it finds, so a literal one inside the expression cuts the tag in half and compiles to nonsense. Caught by the test that renders this page. --}} @php $literal = '{{'.$token.'}}'; @endphp
{{ $literal }}
{{ __($explanation) }}
@endforeach

{{ __('templates.unknown_note') }}