#33: limit orders on first page and paginate
This commit is contained in:
parent
7e53705b4b
commit
5d41b6fef5
4 changed files with 57 additions and 19 deletions
|
@ -4,7 +4,14 @@
|
|||
|
||||
{% 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>
|
||||
|
@ -25,11 +32,10 @@
|
|||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div>
|
||||
<button
|
||||
hx-get="{{ path('app_food_order_new') }}"
|
||||
hx-trigger="click"
|
||||
hx-target="closest div"
|
||||
>Create new</button>
|
||||
</div>
|
||||
{% if prev_page > 0 %}
|
||||
<a href="{{ path('app_food_order_index', {'page': prev_page}) }}">previous page</a> |
|
||||
{% endif %}
|
||||
{% if next_page > current_page %}
|
||||
<a href="{{ path('app_food_order_index', {'page': next_page}) }}">next page</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue