ajout des cotroleur avec template pour les entitys
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Menu index{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Menu index</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Nom</th>
|
||||
<th>DateDeCreation</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for menu in menus %}
|
||||
<tr>
|
||||
<td>{{ menu.id }}</td>
|
||||
<td>{{ menu.nom }}</td>
|
||||
<td>{{ menu.dateDeCreation ? menu.dateDeCreation|date('Y-m-d H:i:s') : '' }}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_menu_show', {'id': menu.id}) }}">show</a>
|
||||
<a href="{{ path('app_menu_edit', {'id': menu.id}) }}">edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="4">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_menu_new') }}">Create new</a>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user