add tailiwindi
This commit is contained in:
parent
314063f15c
commit
f38c05d97c
27 changed files with 1139 additions and 494 deletions
|
@ -1,45 +1,69 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}FoodOrder index{% endblock %}
|
||||
{% block title %}Food Orders{% endblock %}
|
||||
|
||||
{% block header %}Food Orders{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>FoodOrder index</h1>
|
||||
<div>
|
||||
<button
|
||||
<div class="sm:flex sm:items-center sm:justify-between mb-6">
|
||||
<div class="min-w-0 flex-1">
|
||||
<p class="text-sm text-gray-500">
|
||||
Manage your food orders and create new ones.
|
||||
</p>
|
||||
</div>
|
||||
<div class="mt-4 flex sm:ml-4 sm:mt-0">
|
||||
<button
|
||||
hx-get="{{ path('app_food_order_new') }}"
|
||||
hx-trigger="click"
|
||||
hx-target="closest div"
|
||||
>Create new</button>
|
||||
hx-target="#new-order-form"
|
||||
class="block rounded-md bg-indigo-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
|
||||
>Create new order</button>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
<div id="new-order-form" class="mb-8"></div>
|
||||
|
||||
<div class="mt-8 flow-root">
|
||||
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
||||
<div class="inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8">
|
||||
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg">
|
||||
<table class="min-w-full divide-y divide-gray-300">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Created By</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Vendor</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Created At</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Closed At</th>
|
||||
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
||||
<span class="sr-only">Actions</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
{% for food_order in food_orders %}
|
||||
{{ include('food_order/table_row.html.twig') }}
|
||||
{% endfor %}
|
||||
{% if food_orders|length < 10 %}
|
||||
<tr>
|
||||
<td colspan="5" class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-500 sm:pl-6">
|
||||
Check the <a href="{{ path('app_food_order_archive') }}" class="text-indigo-600 hover:text-indigo-900">archive</a>
|
||||
for older orders
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex items-center justify-center gap-x-6">
|
||||
{% if prev_page > 0 %}
|
||||
<a href="{{ path('app_food_order_archive', {'page': prev_page}) }}" class="rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50">Previous Page</a>
|
||||
{% 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 %}
|
||||
{% if next_page > current_page %}
|
||||
<a href="{{ path('app_food_order_archive', {'page': next_page}) }}" class="rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50">Next Page</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue