Buying history: Show pictures side-by-side instead of names
This commit is contained in:
parent
bed84eed06
commit
77a8dd73ed
|
@ -26,34 +26,41 @@
|
|||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<table width="800px" class="details">
|
||||
<table class="details">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Buchung</th>
|
||||
<th>Einkauf</th>
|
||||
<th style="text-align:left">Einkauf</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Buchung</th>
|
||||
<th>Einkauf</th>
|
||||
<th style="text-align:left">Einkauf</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
{% for order in history.object_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<td width="150px">
|
||||
{{ order.dateTime|date:"Y-m-d H:i" }}
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
{% for item in order.purchase_set.all %}
|
||||
<li>
|
||||
<strong>{{ item.buyable.name }}{% if item.isDeposit %} Pfand{% endif %}</strong>
|
||||
zu {{ item.price|floatformat:2 }} €
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<td style="text-align:left">
|
||||
<table>
|
||||
<tr>
|
||||
{% for item in order.purchase_set.all %}
|
||||
<td width="80px">
|
||||
{% if not item.isDeposit %}
|
||||
<img src="{{ MEDIA_URL }}{{ item.buyable.image }}" width=64 height=64>
|
||||
{% else %}
|
||||
<b>{{ item.buyable.name }} Pfand</b>
|
||||
{% endif %}
|
||||
<br/>
|
||||
zu {{ item.price|floatformat:2 }} €
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue