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

This commit is contained in:
theresa 2011-10-12 01:43:30 +02:00
parent bed84eed06
commit 77a8dd73ed
1 changed files with 20 additions and 13 deletions

View File

@ -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>
<td style="text-align:left">
<table>
<tr>
{% for item in order.purchase_set.all %}
<li>
<strong>{{ item.buyable.name }}{% if item.isDeposit %} Pfand{% endif %}</strong>
<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 }} €
</li>
</td>
{% endfor %}
</ul>
</tr>
</table>
</td>
</tr>
{% endfor %}