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.
 
 
 
 

56 lines
2.3 KiB

{% extends 'base.html' %}
{% block content %}
<div class="col-12 ">
<div class="cabinet__history">
<div class="history__btn_bx">
<a href="{% url 'cabinet:index' %}" class="cabinet__link_fill">Вернуться</a>
</div>
<div class="cabinet__title text-center">
<h3>История покупок</h3>
</div>
<table class="table">
<tr>
<th>Дата</th>
<th>№ счета</th>
<th>Наименование</th>
<th>Кол-во</th>
<th>Сумма</th>
</tr>
{% for bought_item in bought_item_list %}
<tr>
<td>{{ bought_item.bought_at }}</td>
<td>{{ bought_item.id }}</td>
<td>{{ bought_item.product.name }}</td>
<td>{{ bought_item.amount }}</td>
<td>{{ bought_item.total_price }}7570₽</td>
</tr>
{% empty %}
<tr>
<td>12.06.17</td>
<td>142251366</td>
<td>Windows 7 BOX...</td>
<td>1</td>
<td>7570₽</td>
</tr>
{% endfor %}
</table>
<div class="pagination">
<span class="step-links">
{% if bought_item_list.has_previous %}
<a href="?page=1">&laquo; 1</a>
<a href="?page={{ bought_item_list.previous_page_number }}">previous</a>
{% endif %}
<span class="current">
Страница {{ bought_item_list.number }} of {{ bought_item_list.paginator.num_pages }}.
</span>
{% if contacts.has_next %}
<a href="?page={{ bought_item_list.next_page_number }}">next</a>
<a href="?page={{ bought_item_list.paginator.num_pages }}">last &raquo;</a>
{% endif %}
</span>
</div>
</div>
</div>
{% endblock content %}