saufen/templates/order/index.html.twig
2025-06-09 19:56:08 +02:00

39 lines
1.1 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}Order index{% endblock %}
{% block body %}
<h1>Order index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>CreatedAt</th>
<th>UpdatedAt</th>
<th>Status</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for order in orders %}
<tr>
<td>{{ order.id }}</td>
<td>{{ order.createdAt ? order.createdAt|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ order.updatedAt ? order.updatedAt|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ order.status }}</td>
<td>
<a href="{{ path('app_order_show', {'id': order.id}) }}">show</a>
<a href="{{ path('app_order_edit', {'id': order.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_order_new') }}">Create new</a>
{% endblock %}