This commit is contained in:
lubiana 2025-06-09 19:56:08 +02:00
parent 66c4c1fe4f
commit 2c2e34b71e
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
42 changed files with 910 additions and 939 deletions

View file

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_order_delete', {'id': order.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ order.id) }}">
<button class="btn">Delete</button>
</form>

View file

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View file

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit Order{% endblock %}
{% block body %}
<h1>Edit Order</h1>
{{ include('order/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_order_index') }}">back to list</a>
{{ include('order/_delete_form.html.twig') }}
{% endblock %}

View file

@ -0,0 +1,39 @@
{% extends 'base.html.twig' %}
{% block title %}Order index{% endblock %}
{% block body %}
<h1>Order index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>CreatedAt</th>
<th>UpdatedAt</th>
<th>Status</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for order in orders %}
<tr>
<td>{{ order.id }}</td>
<td>{{ order.createdAt ? order.createdAt|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ order.updatedAt ? order.updatedAt|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ order.status }}</td>
<td>
<a href="{{ path('app_order_show', {'id': order.id}) }}">show</a>
<a href="{{ path('app_order_edit', {'id': order.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_order_new') }}">Create new</a>
{% endblock %}

View file

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New Order{% endblock %}
{% block body %}
<h1>Create new Order</h1>
{{ include('order/_form.html.twig') }}
<a href="{{ path('app_order_index') }}">back to list</a>
{% endblock %}

View file

@ -0,0 +1,34 @@
{% extends 'base.html.twig' %}
{% block title %}Order{% endblock %}
{% block body %}
<h1>Order</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ order.id }}</td>
</tr>
<tr>
<th>CreatedAt</th>
<td>{{ order.createdAt ? order.createdAt|date('Y-m-d H:i:s') : '' }}</td>
</tr>
<tr>
<th>UpdatedAt</th>
<td>{{ order.updatedAt ? order.updatedAt|date('Y-m-d H:i:s') : '' }}</td>
</tr>
<tr>
<th>Status</th>
<td>{{ order.status }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_order_index') }}">back to list</a>
<a href="{{ path('app_order_edit', {'id': order.id}) }}">edit</a>
{{ include('order/_delete_form.html.twig') }}
{% endblock %}