This commit is contained in:
parent
15f8db46a0
commit
64f5341371
18 changed files with 484 additions and 157 deletions
|
@ -39,6 +39,38 @@
|
|||
</div>
|
||||
|
||||
<h2 class="mt-5">Items</h2>
|
||||
{% if (food_order.isClosed and form) %}
|
||||
{{ form_start(form) }}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>By</th>
|
||||
<th>item</th>
|
||||
<th>extras</th>
|
||||
<th>price</th>
|
||||
<th>is paid</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for itemForm in form.orderItems %}
|
||||
<tr>
|
||||
<td>{{ field_value(itemForm.createdBy) }}</td>
|
||||
<td>{{ field_value(itemForm.name) }}</td>
|
||||
<td>{{ field_value(itemForm.extras) }}</td>
|
||||
<td>{{ form_widget(itemForm.priceCents) }}</td>
|
||||
<td>{{ form_widget(itemForm.isPaid) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td colspan="4"></td>
|
||||
<td>{{ form_row(form.save) }} {{ form_row(form._token) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ form_end(form, {render_rest: false}) }}
|
||||
{% else %}
|
||||
<table class="table table-hover">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
|
@ -68,6 +100,7 @@
|
|||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
<a class="btn btn-primary mt-2" href="{{ path('app_order_item_new', {'foodOrder': food_order.id}) }}">New Item</a>
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue