Split table of customer orders into separate template from customer orders index page

This commit is contained in:
James Newlands 2018-04-17 23:12:35 +10:00
parent 121315f15e
commit 6434bfc24a
2 changed files with 15 additions and 15 deletions

View File

@ -0,0 +1,14 @@
<table class="table table-striped">
<tr>
<th>Internal Ref</th>
<th>Customer</th>
<th>Customer Ref</th>
</tr>
{% for order in customer_orders %}
<tr>
<td>{{ order.internal_ref }}</td>
<td>{{ order.customer }}</td>
<td>{{ order.customer_ref }}</td>
</tr>
{% endfor %}
</table>

View File

@ -5,21 +5,7 @@
{% if customer_orders.all|length > 0 %}
<h4>Customer Orders</h4>
<table class="table table-striped">
<tr>
<th>Internal Ref</th>
<th>Customer</th>
<th>Customer Ref</th>
</tr>
{% for order in customer_orders %}
<tr>
<td>{{ order.internal_ref }}</td>
<td>{{ order.customer }}</td>
<td>{{ order.customer_ref }}</td>
</tr>
{% endfor %}
</table>
{% include "customer_orders/customer_orders_list.html" with customer_orders=customer_orders %}
{% endif %}
{% endblock %}