Item table fixes

This commit is contained in:
2020-04-06 02:00:14 +01:00
parent de210caa36
commit d351d9eb7b
3 changed files with 36 additions and 74 deletions

View File

@@ -2,22 +2,22 @@
<table class="table table-hover" id="item-table" {% if edit %}data-orderurl="{#% url 'item_order' %#}"{% endif %}>
<thead>
<tr>
<td>Item</td>
<th scope="col">Item</th>
{% if perms.RIGS.view_event %}
<td>Price</td>
<th scope="col">Price</th>
{% endif %}
<td>Quantity</td>
<th scope="col">Quantity</th>
{% if perms.RIGS.view_event %}
<td>Sub-total</td>
<th scope="col">Sub-total</th>
{% endif %}
{% if edit %}
<td class="text-right">
<button type="button" class="btn btn-default btn-xs item-add"
<th scope="col" class="text-right align-self-start">
<button type="button" class="btn btn-success btn-xs item-add"
data-toggle="modal"
data-target="#itemModal">
<span class="fas fa-plus"></span>
<i class="fas fa-plus"></i> Add Item
</button>
</td>
</th>
{% endif %}
</tr>
</thead>
@@ -27,7 +27,7 @@
{% endfor %}
</tbody>
{% if perms.RIGS.view_event %}
<tbart>
<tfoot>
<tr>
<td rowspan="3" colspan="2"></td>
<td>Total (ex. VAT)</td>
@@ -47,31 +47,10 @@
<td>Total</td>
<td colspan="2">£ <span id="total">{{object.total|default:0|floatformat:2}}</span></td>
</tr>
</tbart>
</tfoot>
{% endif %}
</table>
</div>
<table class="hidden invisible">
<tr id="new-item-row" class="item_row">
<td>
<span class="name"></span>
<div class="item-description">
<em class="description"></em>
</div>
</td>
<td>£&nbsp;<span class="cost"></span></td>
<td class="quantity"></td>
<td>£&nbsp;<span class="sub-total"></span></td>
{% if edit %}
<td class="vert-align text-right">
<button type="button" class="item-edit btn btn-xs btn-default"
data-toggle="modal" data-target="#itemModal">
<i class="fas fa-edit"></i>
</button>
<button type="button" class="item-delete btn btn-xs btn-danger">
<i class="fas fa-times-circle"></i>
</button>
</td>
{% endif %}
</tr>
{% include 'item_row.html' %}
</table>