add tailiwindi
This commit is contained in:
parent
314063f15c
commit
f38c05d97c
27 changed files with 1139 additions and 494 deletions
|
@ -1,4 +1,24 @@
|
|||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
||||
{{ form_start(form, {'attr': {'class': 'space-y-6'}}) }}
|
||||
{% for field in form %}
|
||||
{% if field.vars.name != '_token' %}
|
||||
<div class="space-y-2">
|
||||
{{ form_label(field, null, {'label_attr': {'class': 'block text-sm font-medium leading-6 text-gray-900'}}) }}
|
||||
<div>
|
||||
{{ form_widget(field, {'attr': {'class': 'block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6'}}) }}
|
||||
</div>
|
||||
{% if field.vars.errors|length > 0 %}
|
||||
<div class="mt-1 text-sm text-red-600">
|
||||
{{ form_errors(field) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if field.vars.help is defined and field.vars.help %}
|
||||
<p class="mt-1 text-sm text-gray-500">{{ field.vars.help }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div class="mt-6 flex items-center justify-end gap-x-6">
|
||||
<a href="{{ app.request.headers.get('referer', '/') }}" class="text-sm font-semibold leading-6 text-gray-900">Cancel</a>
|
||||
<button type="submit" class="rounded-md bg-indigo-600 px-3 py-2 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">{{ button_label|default('Save') }}</button>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
|
|
@ -1,33 +1,54 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}FoodVendor index{% endblock %}
|
||||
{% block title %}Food Vendors{% endblock %}
|
||||
|
||||
{% block header %}Food Vendors{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>FoodVendor index</h1>
|
||||
<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 vendors and create new ones.
|
||||
</p>
|
||||
</div>
|
||||
<div class="mt-4 flex sm:ml-4 sm:mt-0">
|
||||
<a href="{{ path('app_food_vendor_new') }}" 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 vendor
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for food_vendor in food_vendors %}
|
||||
<tr>
|
||||
<td>{{ food_vendor.name }}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_food_vendor_show', {'id': food_vendor.id}) }}">show</a>
|
||||
<a href="{{ path('app_food_vendor_edit', {'id': food_vendor.id}) }}">edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="3">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_food_vendor_new') }}">Create new</a>
|
||||
<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">Name</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_vendor in food_vendors %}
|
||||
<tr class="hover:bg-gray-50">
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">{{ food_vendor.name }}</td>
|
||||
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
||||
<a href="{{ path('app_food_vendor_show', {'id': food_vendor.id}) }}" class="text-indigo-600 hover:text-indigo-900 mr-2">View</a>
|
||||
<a href="{{ path('app_food_vendor_edit', {'id': food_vendor.id}) }}" class="text-indigo-600 hover:text-indigo-900">Edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="2" class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-500 sm:pl-6">No vendors found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue