45
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', 'Templates — Signatures CABM')
|
||||
@section('content')
|
||||
<div class="row" style="margin-bottom:16px">
|
||||
<h1 style="margin:0">Templates</h1>
|
||||
<span class="spacer"></span>
|
||||
<a class="btn" href="{{ route('admin.templates.create') }}">Nouveau template</a>
|
||||
</div>
|
||||
<div class="card">
|
||||
<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 href="{{ route('admin.templates.edit', $t) }}">{{ $t->name }}</a>
|
||||
@if ($t->is_default) <span class="badge">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>{{ $t->published_version ? 'v'.$t->published_version : '—' }}</td>
|
||||
<td>{{ $t->assignments_count }}</td>
|
||||
<td class="muted">{{ $t->updated_at?->timezone('Europe/Paris')->format('d/m/Y H:i') }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="5" class="muted">Aucun template.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user