add order item stuff
This commit is contained in:
parent
68b4096bb0
commit
814dc4a41b
11 changed files with 175 additions and 113 deletions
|
@ -21,11 +21,39 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a class="button" href="{{ path('app_food_order_index') }}">back to list</a>
|
||||
{% if(food_order.isClosed) %}
|
||||
<a class="button" href="{{ path('app_food_order_open', {'id': food_order.id}) }}">reopen</a>
|
||||
{% else %}
|
||||
<a class="button" href="{{ path('app_food_order_close', {'id': food_order.id}) }}">close</a>
|
||||
{% endif %}
|
||||
|
||||
<h2>Items</h2>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>name</th>
|
||||
<th>extras</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in food_order.orderItems %}
|
||||
<tr>
|
||||
<td>{{ item.name }}</td>
|
||||
<td>{{ item.extras }}</td>
|
||||
<td>
|
||||
{% if(food_order.isClosed) %}
|
||||
{% else %}
|
||||
<a href="{{ path('app_order_item_edit', {'id': item.id}) }}">edit</a>
|
||||
<a href="{{ path('app_order_item_copy', {'id': item.id}) }}">copy</a>
|
||||
<a href="{{ path('app_order_item_delete', {'id': item.id}) }}">remove</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<a class="button" href="{{ path('app_order_item_new', {'foodOrder': food_order.id}) }}">New Item</a>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<form method="post" action="{{ path('app_order_item_delete', {'id': order_item.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ order_item.id) }}">
|
||||
<button class="btn">Delete</button>
|
||||
</form>
|
|
@ -7,7 +7,5 @@
|
|||
|
||||
{{ include('order_item/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
|
||||
<a href="{{ path('app_order_item_index') }}">back to list</a>
|
||||
|
||||
{{ include('order_item/_delete_form.html.twig') }}
|
||||
<a href="{{ path('app_food_order_show', {'id': order_item.foodOrder.id}) }}">back to list</a>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}OrderItem index{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>OrderItem index</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Name</th>
|
||||
<th>Extras</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for order_item in order_items %}
|
||||
<tr>
|
||||
<td>{{ order_item.id }}</td>
|
||||
<td>{{ order_item.name }}</td>
|
||||
<td>{{ order_item.extras }}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_order_item_show', {'id': order_item.id}) }}">show</a>
|
||||
<a href="{{ path('app_order_item_edit', {'id': order_item.id}) }}">edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="4">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_order_item_new') }}">Create new</a>
|
||||
{% endblock %}
|
|
@ -7,5 +7,5 @@
|
|||
|
||||
{{ include('order_item/_form.html.twig') }}
|
||||
|
||||
<a href="{{ path('app_order_item_index') }}">back to list</a>
|
||||
<a class="button" href="{{ path('app_food_order_show', { 'id': food_order.id}) }}">back to list</a>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}OrderItem{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>OrderItem</h1>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<td>{{ order_item.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td>{{ order_item.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Extras</th>
|
||||
<td>{{ order_item.extras }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_order_item_index') }}">back to list</a>
|
||||
|
||||
<a href="{{ path('app_order_item_edit', {'id': order_item.id}) }}">edit</a>
|
||||
|
||||
{{ include('order_item/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue