templates/template/liste.html.twig line 1
{% extends 'base.html.twig' %}
{% block title %}Hello TemplateController!{% endblock %}
{% block body %}
<div class="container">
<h1>Templates</h1>
<a class="btn btn-primary" href="{{ path('app_template_new') }}" >Nouvelle template</a>
{% if templates|length>0 %}
<table class="table">
<thead>
<tr>
<th>Titre</th>
<th>Type</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
{% for t in templates %}
<tr>
<td><b>{{ t.titre }}</b></td>
<td>{{ t.type }}</td>
<td><a href="{{ path('app_template_edit', {id: t.id}) }}" class="btn btn-secondary">Editer</a> </td>
<td><a href="{{ path('app_template_view', {id: t.id}) }}" class="btn btn-primary">Visualiser</a> </td>
<td><button class="btn btn-danger">Supprimer</button> </td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<h3>Aucune template</h3>
{% endif %}
</div>
{% endblock %}