You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
2.5 KiB

{% extends "base.html" %}
{% block "content" %}
{% if history %}
<div style="width:800px">
<h1>Fr&uuml;here Eink&auml;ufe von {{ user }}</h1>
</div>
<div class="pagination" style="width:800px; text-align:center; margin-top:25px">
<table width="100%">
<tr>
<td width="33%">
{% if history.has_previous %}
<a href="?page={{ history.previous_page_number }}">Vorherige Seite</a>
{% else %}&nbsp;
{% endif %}
</td>
<td width="34%">
<span class="current">
Seite {{ history.number }} von {{ history.paginator.num_pages }}
</span>
</td>
<td width="34%">
{% if history.has_next %}
<a href="?page={{ history.next_page_number }}">N&auml;chste Seite</a>
{% else %}&nbsp;
{% endif %}
</td>
</tr>
</table>
</div>
<table class="details">
<thead>
<tr>
<th>Buchung</th>
<th style="text-align:left">Einkauf</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Buchung</th>
<th style="text-align:left">Einkauf</th>
</tr>
</tfoot>
<tbody>
{% for order in history.object_list %}
<tr>
<td width="150px">
{{ order.dateTime|date:"Y-m-d H:i" }}
</td>
<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 %}
</table>
<div class="pagination" style="width:800px; text-align:center; margin-top:25px">
<table width="100%">
<tr>
<td width="33%">
{% if history.has_previous %}
<a href="?page={{ history.previous_page_number }}">Vorherige Seite</a>
{% else %}&nbsp;
{% endif %}
</td>
<td width="34%">
<span class="current">
Seite {{ history.number }} von {{ history.paginator.num_pages }}
</span>
</td>
<td width="34%">
{% if history.has_next %}
<a href="?page={{ history.next_page_number }}">N&auml;chste Seite</a>
{% else %}&nbsp;
{% endif %}
</td>
</tr>
</table>
</div>
{% else %}
{{ error }}
Es scheint so, als h&auml;ttest du bisher noch nichts gekauft, {{ user }}.
{% endif %}
{% endblock %}