Buying history: Show pictures side-by-side instead of names

master
theresa 13 years ago
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>
{% for item in order.purchase_set.all %} <tr>
<li> {% for item in order.purchase_set.all %}
<strong>{{ item.buyable.name }}{% if item.isDeposit %} Pfand{% endif %}</strong> <td width="80px">
zu {{ item.price|floatformat:2 }} € {% if not item.isDeposit %}
</li> <img src="{{ MEDIA_URL }}{{ item.buyable.image }}" width=64 height=64>
{% endfor %} {% else %}
</ul> <b>{{ item.buyable.name }} Pfand</b>
{% endif %}
<br/>
zu {{ item.price|floatformat:2 }} €
</td>
{% endfor %}
</tr>
</table>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}

Loading…
Cancel
Save