@extends('layouts.portal') @section('title', 'Document Templates') @section('page_title', 'Document Templates') @section('page_subtitle', 'Manage the Will and Trust document layouts used across every portal') @section('sidebar') @include('admin.partials.sidebar', ['active' => 'templates']) @endsection @section('content') @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

Document Templates

Edit these like a Word document — headings, paragraphs, fonts, spacing and placeholders. Whatever is saved here is what Admin, Staff, Lawyer, Agent and Client all see on every generated document.

@foreach($types as $typeKey => $typeLabel) @php $group = $templates->get($typeKey, collect()); @endphp @php $default = $group->firstWhere('is_default', true); @endphp

{{ $typeLabel }}

{{ $group->count() }} template{{ $group->count() === 1 ? '' : 's' }}

@if($default)
Live / Default

{{ $default->name }}

v{{ $default->version }} · {{ $default->is_active ? 'Active' : 'Inactive' }}

@else

No template configured yet — documents of this type will show a placeholder message until one is created.

Create Template @endif @if($group->count() > 1)

OTHER VERSIONS

    @foreach($group->where('id', '!=', $default->id ?? null) as $tpl)
  • {{ $tpl->name }} (v{{ $tpl->version }}) Edit
  • @endforeach
@endif
@endforeach
@endsection