53 lines
2.7 KiB
PHP
53 lines
2.7 KiB
PHP
@extends('layouts.app')
|
|
@section('title', 'Templates — Signatures')
|
|
@section('content')
|
|
<header class="page-head">
|
|
<div>
|
|
<h1>Templates</h1>
|
|
<p class="lead">Un template est le modèle HTML d'une signature. Il est servi aux agents une fois publié, selon les affectations par groupe AD.</p>
|
|
</div>
|
|
<div class="page-actions">
|
|
<a class="btn" href="{{ route('admin.templates.create') }}"><x-icon name="plus" />Nouveau template</a>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="card card--flush">
|
|
<div class="table-wrap">
|
|
<table class="list">
|
|
<thead><tr><th>Nom</th><th>État</th><th>Version publiée</th><th>Groupes affectés</th><th>Mis à jour</th></tr></thead>
|
|
<tbody>
|
|
@forelse ($templates as $t)
|
|
<tr>
|
|
<td>
|
|
<a class="cell-title" href="{{ route('admin.templates.edit', $t) }}">{{ $t->name }}</a>
|
|
@if ($t->is_default) <span class="badge plain">par défaut</span> @endif
|
|
@if ($t->description)<div class="muted">{{ $t->description }}</div>@endif
|
|
</td>
|
|
<td>
|
|
@if (! $t->published_version)
|
|
<span class="badge warn">jamais publié</span>
|
|
@elseif ($t->draft_html_full !== $t->html_full || $t->draft_html_short !== $t->html_short)
|
|
<span class="badge warn">brouillon modifié</span>
|
|
@else
|
|
<span class="badge ok">publié</span>
|
|
@endif
|
|
</td>
|
|
<td class="num">{{ $t->published_version ? 'v'.$t->published_version : '—' }}</td>
|
|
<td class="num">{{ $t->assignments_count }}</td>
|
|
<td class="muted nowrap">{{ $t->updated_at?->timezone('Europe/Paris')->format('d/m/Y H:i') }}</td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="5">
|
|
<div class="empty">
|
|
<x-icon name="file-code" :size="32" />
|
|
<p><strong>Aucun template</strong>Créez le premier modèle de signature, puis publiez-le pour qu'il soit servi aux agents.</p>
|
|
<p><a class="btn" href="{{ route('admin.templates.create') }}"><x-icon name="plus" />Nouveau template</a></p>
|
|
</div>
|
|
</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@endsection
|