futtern/templates/food_order/index.html.twig
lubiana 9afa7fe431
All checks were successful
/ ls (pull_request) Successful in 37s
/ ls (push) Successful in 32s
#29: add more tests
2024-07-10 22:18:56 +02:00

45 lines
1.3 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}FoodOrder index{% endblock %}
{% block body %}
<h1>FoodOrder index</h1>
<div>
<button
hx-get="{{ path('app_food_order_new') }}"
hx-trigger="click"
hx-target="closest div"
>Create new</button>
</div>
<hr>
<table class="table">
<thead>
<tr>
<th>CreatedBy</th>
<th>Vendor</th>
<th>CreatedAt</th>
<th>ClosedAt</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for food_order in food_orders %}
{{ include('food_order/table_row.html.twig') }}
{% endfor %}
{% if food_orders|length < 10 %}
<tr>
<td colspan="5">
check the <a href="{{ path('app_food_order_archive') }}">archive</a>
for older orders
</td>
</tr>
{% endif %}
</tbody>
</table>
{% if prev_page > 0 %}
<a href="{{ path('app_food_order_archive', {'page': prev_page}) }}">previous page</a> |
{% endif %}
{% if next_page > current_page %}
<a href="{{ path('app_food_order_archive', {'page': next_page}) }}">next page</a>
{% endif %}
{% endblock %}