43 lines
1.6 KiB
Twig
43 lines
1.6 KiB
Twig
<turbo-frame id="tables">
|
|
{% for table in tables %}
|
|
<tr>
|
|
<td>{{ table.id }}</td>
|
|
|
|
<td>
|
|
{% for client in table.Clients %}
|
|
{{ client.nom }}{% if not loop.last %}, {% endif %}
|
|
{% else %}
|
|
Aucun
|
|
{% endfor %}
|
|
</td>
|
|
|
|
<td>
|
|
{% for utilisateur in table.utilisateurs %}
|
|
{{ utilisateur.nom }}{% if not loop.last %}, {% endif %}
|
|
{% else %}
|
|
Aucun
|
|
{% endfor %}
|
|
</td>
|
|
|
|
<td>
|
|
<form method="POST" action="{{ path('app_tables_update_statut', {'id': table.id}) }}">
|
|
<input type="checkbox" name="libre" value="1" data-turbo-frame="tables" {% if table.libre %}checked{% endif %}>
|
|
<button type="submit">Mettre à jour</button>
|
|
</form>
|
|
</td>
|
|
|
|
<td>
|
|
<a href="{{ path('app_tables_edit', {'id': table.id}) }}">Modifier</a>
|
|
|
|
<form method="post" action="{{ path('app_tables_delete', {'id': table.id}) }}" onsubmit="return confirm('Es-tu sûr de vouloir le supprimer ?');" style="display:inline;">
|
|
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ table.id) }}">
|
|
<button type="submit">Supprimer</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="5">Aucun enregistrement trouvé</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</turbo-frame> |