2026-05-05 08:57:14 +00:00
|
|
|
{% extends 'admin/base.html.twig' %}
|
2026-05-05 07:56:49 +00:00
|
|
|
|
|
|
|
|
{% block title %}Admin{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block body %}
|
2026-05-05 08:57:14 +00:00
|
|
|
<main class="admin-shell">
|
|
|
|
|
<header class="admin-toolbar">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="eyebrow">Administration</p>
|
|
|
|
|
<h1>Mappings</h1>
|
|
|
|
|
</div>
|
|
|
|
|
<nav class="toolbar-actions" aria-label="Actions admin">
|
|
|
|
|
<a class="button button-primary" href="{{ path('admin_mapping_new') }}">Nouveau mapping</a>
|
|
|
|
|
<a class="button button-secondary" href="{{ path('admin_settings') }}">Configuration</a>
|
|
|
|
|
</nav>
|
|
|
|
|
</header>
|
2026-05-05 08:00:56 +00:00
|
|
|
|
|
|
|
|
{% for message in app.flashes('success') %}
|
2026-05-05 08:57:14 +00:00
|
|
|
<p class="alert alert-success">{{ message }}</p>
|
2026-05-05 08:00:56 +00:00
|
|
|
{% endfor %}
|
2026-05-05 08:05:48 +00:00
|
|
|
{% for message in app.flashes('error') %}
|
2026-05-05 08:57:14 +00:00
|
|
|
<p class="alert alert-error">{{ message }}</p>
|
2026-05-05 08:05:48 +00:00
|
|
|
{% endfor %}
|
2026-05-05 08:00:56 +00:00
|
|
|
|
2026-05-05 08:57:14 +00:00
|
|
|
<section class="table-panel" aria-label="Mappings">
|
|
|
|
|
<table class="admin-table">
|
|
|
|
|
<thead>
|
2026-05-05 08:00:56 +00:00
|
|
|
<tr>
|
2026-05-05 08:57:14 +00:00
|
|
|
<th>Chemin public</th>
|
|
|
|
|
<th>Dépôt</th>
|
|
|
|
|
<th>Réf.</th>
|
|
|
|
|
<th>Fichier</th>
|
|
|
|
|
<th>Actif</th>
|
|
|
|
|
<th>Dernière synchro</th>
|
|
|
|
|
<th>Dernier succès</th>
|
|
|
|
|
<th>Erreur</th>
|
|
|
|
|
<th>Actions</th>
|
2026-05-05 08:00:56 +00:00
|
|
|
</tr>
|
2026-05-05 08:57:14 +00:00
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{% for mapping in mappings %}
|
|
|
|
|
<tr>
|
|
|
|
|
<td><code>{{ mapping.publicPath }}</code></td>
|
|
|
|
|
<td class="text-muted">{{ mapping.repositoryUrl }}</td>
|
|
|
|
|
<td><code>{{ mapping.gitRef }}</code></td>
|
|
|
|
|
<td><code>{{ mapping.repositoryFilePath }}</code></td>
|
|
|
|
|
<td>
|
|
|
|
|
<span class="status-badge {{ mapping.active ? 'status-success' : 'status-muted' }}">
|
|
|
|
|
{{ mapping.active ? 'oui' : 'non' }}
|
|
|
|
|
</span>
|
|
|
|
|
</td>
|
|
|
|
|
<td>{{ mapping.lastSyncStatus ?: 'jamais' }}</td>
|
|
|
|
|
<td>{{ mapping.lastSuccessfulSyncAt ? mapping.lastSuccessfulSyncAt|date('Y-m-d H:i:s') : '' }}</td>
|
|
|
|
|
<td class="error-cell">{{ mapping.lastSyncError }}</td>
|
|
|
|
|
<td>
|
|
|
|
|
<div class="row-actions">
|
|
|
|
|
<a class="button button-ghost" href="{{ path('admin_mapping_edit', {id: mapping.id}) }}">Modifier</a>
|
|
|
|
|
<form method="post" action="{{ path('admin_mapping_sync', {id: mapping.id}) }}">
|
|
|
|
|
<input type="hidden" name="_token" value="{{ csrf_token('sync_mapping_' ~ mapping.id) }}">
|
|
|
|
|
<button class="button button-secondary" type="submit">Synchroniser</button>
|
|
|
|
|
</form>
|
|
|
|
|
<form method="post" action="{{ path('admin_mapping_delete', {id: mapping.id}) }}">
|
|
|
|
|
<input type="hidden" name="_token" value="{{ csrf_token('delete_mapping_' ~ mapping.id) }}">
|
|
|
|
|
<button class="button button-danger" type="submit">Supprimer</button>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{% else %}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="empty-state" colspan="9">Aucun mapping.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</section>
|
2026-05-05 07:56:49 +00:00
|
|
|
</main>
|
|
|
|
|
{% endblock %}
|