futtern/templates/food_order/index.html.twig

46 lines
1.3 KiB
Twig
Raw Normal View History

2024-06-14 15:41:00 +00:00
{% 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>
2024-06-14 15:41:00 +00:00
<table class="table">
<thead>
<tr>
2024-06-27 21:33:32 +00:00
<th>CreatedBy</th>
2024-06-14 15:41:00 +00:00
<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') }}
2024-07-10 20:18:56 +00:00
{% endfor %}
{% if food_orders|length < 10 %}
2024-06-14 15:41:00 +00:00
<tr>
2024-07-10 20:18:56 +00:00
<td colspan="5">
check the <a href="{{ path('app_food_order_archive') }}">archive</a>
for older orders
</td>
2024-06-14 15:41:00 +00:00
</tr>
2024-07-10 20:18:56 +00:00
{% endif %}
2024-06-14 15:41:00 +00:00
</tbody>
</table>
{% if prev_page > 0 %}
2024-07-10 20:18:56 +00:00
<a href="{{ path('app_food_order_archive', {'page': prev_page}) }}">previous page</a> |
{% endif %}
{% if next_page > current_page %}
2024-07-10 20:18:56 +00:00
<a href="{{ path('app_food_order_archive', {'page': next_page}) }}">next page</a>
{% endif %}
2024-06-14 15:41:00 +00:00
{% endblock %}