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