@extends('admin.layouts.layout') @section('content')

Site Templates

@if($permission['create'] ?? true) Add Template @endif @if($permission['destroy'] ?? true) Delete Multiple @endif
@if(!session('tenant_id')) @endif @if($permission['edit'] || $permission['destroy'] || $permission['show']) @endif @foreach ($data as $template) @if(!session('tenant_id')) @endif @if($permission['edit'] || $permission['destroy'] || $permission['show']) @endif @endforeach
Template Name Subject/Content LanguageTenantStatusAction
{{ $template->template_name }} @if($template->template_type) {{ $template->templateTypes[$template->template_type]['name'] ?? 'Unknown' }} @endif
@if($template->template_type == 1) {{ Str::limit(html_entity_decode(strip_tags($template->subject)), 50) }}
{{ Str::limit(strip_tags(html_entity_decode($template->template_content)), 80) }}
@elseif($template->template_type == 2) {{ Str::limit(html_entity_decode(strip_tags($template->template_content)), 100) }} @else {{ Str::limit(strip_tags(html_entity_decode($template->template_content)), 100) }} @endif
@if($template->language) {{ $template->language->name }} @if($template->language->native_name && $template->language->native_name !== $template->language->name)
{{ $template->language->native_name }}
@endif @else Not Set @endif
@if($template->tenant_id && $template->tenant_id > 0) {{ $template->tenant->name ?? 'Unknown Tenant' }} @else Global @endif {!! $template->statuses[$template->status]['name'] !!} @if($permission['show'] ?? true) @endif @if($permission['edit'] ?? true) @endif @if($permission['destroy'] ?? true) {!! html()->form('DELETE', route($routePrefix . '.destroy', $template->id))->attributes([ 'style' => 'display:inline', 'id' => 'delete-form-' . $template->id ])->open() !!} {!! html()->form()->close() !!} @endif
@if($data->isEmpty())
No Templates
No templates found
@endif
@include('admin.components.pagination') @push('page_script') @endpush @endsection