62 lines
2.6 KiB
Twig
62 lines
2.6 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Admin{% endblock %}
|
|
|
|
{% block body %}
|
|
<main>
|
|
<h1>Mappings</h1>
|
|
<p><a href="{{ path('admin_mapping_new') }}">Nouveau mapping</a></p>
|
|
|
|
{% for message in app.flashes('success') %}
|
|
<p>{{ message }}</p>
|
|
{% endfor %}
|
|
{% for message in app.flashes('error') %}
|
|
<p>{{ message }}</p>
|
|
{% endfor %}
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<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>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for mapping in mappings %}
|
|
<tr>
|
|
<td>{{ mapping.publicPath }}</td>
|
|
<td>{{ mapping.repositoryUrl }}</td>
|
|
<td>{{ mapping.gitRef }}</td>
|
|
<td>{{ mapping.repositoryFilePath }}</td>
|
|
<td>{{ mapping.active ? 'oui' : 'non' }}</td>
|
|
<td>{{ mapping.lastSyncStatus }}</td>
|
|
<td>{{ mapping.lastSuccessfulSyncAt ? mapping.lastSuccessfulSyncAt|date('Y-m-d H:i:s') : '' }}</td>
|
|
<td>{{ mapping.lastSyncError }}</td>
|
|
<td>
|
|
<a 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 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 type="submit">Supprimer</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="9">Aucun mapping.</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</main>
|
|
{% endblock %}
|