@if(isset($data) && !empty($data)) @php($template = $data->first()) @else @php($template = null) @endif @if($template)

View Template: {{ $template->template_name }}

@if($permission['edit'] ?? true) Edit Template @endif @if($permission['index'] ?? true) Back to Templates @endif
Template Details

{{ $template->template_name }}

@if($template->subject) {{ $template->subject }} @else No subject @endif

@php($statusInfo = $template->statuses[$template->status] ?? null) @if($statusInfo) {{ $statusInfo['name'] }} @else Unknown @endif

@if($template->tenant && $template->tenant_id > 0)

{{ $template->tenant->name }}

@else

Global Template

@endif

{{ strlen(strip_tags($template->template_content ?? '')) }} characters

{{ \App\Helpers\Helper::showdate($template->created_at) }}

{{ \App\Helpers\Helper::showdate($template->updated_at) }}

@if($template->template_content)
{!! $template->template_content !!}
@endif
@else
Template Not Found

The requested template could not be found or may have been deleted.

Back to Templates
@endif @push('page_css') @endpush