Refonte design V1

This commit is contained in:
mrKamoo
2026-10-02 13:06:14 +02:00
parent 429dd9de5e
commit 83e1ce00a9
20 changed files with 1403 additions and 531 deletions
@@ -1,39 +1,52 @@
@extends('layouts.app')
@section('title', 'Templates — Signatures CABM')
@section('title', 'Templates — Signatures')
@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>
<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