templates/template/liste.html.twig line 1

  1. {% extends 'base.html.twig' %}
  2. {% block title %}Hello TemplateController!{% endblock %}
  3. {% block body %}
  4. <div class="container">
  5.     <h1>Templates</h1>
  6.     <a class="btn btn-primary" href="{{ path('app_template_new') }}" >Nouvelle template</a>
  7.     {% if templates|length>0 %}
  8.     <table class="table">
  9.         <thead>
  10.             <tr>
  11.                 <th>Titre</th>
  12.                 <th>Type</th>
  13.                 <th></th>
  14.                 <th></th>
  15.                 <th></th>
  16.             </tr>
  17.         </thead>
  18.         <tbody>
  19.         {% for t in templates %}
  20.             <tr>
  21.                 <td><b>{{ t.titre }}</b></td>
  22.                 <td>{{ t.type }}</td>
  23.                 <td><a href="{{ path('app_template_edit', {id: t.id}) }}" class="btn btn-secondary">Editer</a> </td>
  24.                 <td><a href="{{ path('app_template_view', {id: t.id}) }}" class="btn btn-primary">Visualiser</a> </td>
  25.                 <td><button class="btn btn-danger">Supprimer</button> </td>
  26.             </tr>
  27.         {% endfor %}
  28.         </tbody>
  29.     </table>
  30.     {% else %}
  31.         <h3>Aucune template</h3>
  32.     {% endif %}
  33. </div>
  34. {% endblock %}