You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.6 KiB
HTML
58 lines
1.6 KiB
HTML
5 years ago
|
{% extends 'base.html' %}
|
||
|
|
||
|
{% block content %}
|
||
|
|
||
|
<section id="main" class="wrapper">
|
||
|
<div class="container">
|
||
|
<header class="major">
|
||
|
<h2>Browse Items</h2>
|
||
|
</header>
|
||
|
<table class="table">
|
||
|
<tr>
|
||
|
<th>ID</th>
|
||
|
<th>Seller</th>
|
||
|
<th>Name</th>
|
||
|
<th>List Date</th>
|
||
|
<th>Asking Price (XMR)</th>
|
||
|
<th>Available</th>
|
||
|
<th>Location</th>
|
||
|
</tr>
|
||
|
{% for item in items %}
|
||
|
<tr>
|
||
|
<td>#{{ item.id }}</td>
|
||
|
<td><a href="{% url 'list_items' %}?user={{ item.owner.id }}">{{ item.owner }}</a></td>
|
||
|
<td><a href="{% url 'get_item' item.id %}">{{ item.name }}</a></td>
|
||
|
<td>{{ item.list_date | date:"d M, Y H:i:s" }}</td>
|
||
|
<td>{{ item.ask_price_xmr }}</td>
|
||
|
<td>{{ item.available }}</td>
|
||
|
<td>{{ item.owner.profile.first.city }}, {{ item.owner.profile.first.state }}, {{ item.owner.profile.first.country }}</td>
|
||
|
</tr>
|
||
|
{% endfor %}
|
||
|
</table>
|
||
|
</div>
|
||
|
</section>
|
||
|
|
||
|
{% if items.has_other_pages %}
|
||
|
<ul class="pagination">
|
||
|
{% if items.has_previous %}
|
||
|
<li><a href="?page={{ items.previous_page_number }}">«</a></li>
|
||
|
{% else %}
|
||
|
<li class="disabled"><span>«</span></li>
|
||
|
{% endif %}
|
||
|
{% for i in items.paginator.page_range %}
|
||
|
{% if items.number == i %}
|
||
|
<li class="active"><span>{{ i }} <span class="sr-only"></span></span></li>
|
||
|
{% else %}
|
||
|
<li><a href="?page={{ i }}">{{ i }}</a></li>
|
||
|
{% endif %}
|
||
|
{% endfor %}
|
||
|
{% if items.has_next %}
|
||
|
<li><a href="?page={{ items.next_page_number }}">»</a></li>
|
||
|
{% else %}
|
||
|
<li class="disabled"><span>»</span></li>
|
||
|
{% endif %}
|
||
|
</ul>
|
||
|
{% endif %}
|
||
|
|
||
|
{% endblock %}
|