2016-05-19 09:19:51 +00:00
|
|
|
{% extends 'shop_base.html' %}
|
2016-05-13 06:52:07 +00:00
|
|
|
{% load bootstrap3 %}
|
2016-05-16 18:56:52 +00:00
|
|
|
{% load shop_tags %}
|
2016-05-15 22:09:00 +00:00
|
|
|
|
2016-05-30 16:54:40 +00:00
|
|
|
{% block shop_content %}
|
2016-05-30 18:56:03 +00:00
|
|
|
|
2016-05-30 17:58:58 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<p>
|
|
|
|
Categories:<br />
|
|
|
|
{% for category in categories %}
|
|
|
|
<a href="{% url 'shop:index' %}?category={{category.slug}}"
|
2016-05-30 18:56:03 +00:00
|
|
|
class="label label-{% if category.slug == current_category.slug %}primary{% else %}default{% endif %}">
|
2016-05-30 17:58:58 +00:00
|
|
|
{{category}}
|
|
|
|
</a>
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2016-05-15 22:09:00 +00:00
|
|
|
<hr />
|
|
|
|
|
|
|
|
<div class="row">
|
2016-05-31 16:47:08 +00:00
|
|
|
<div class="col-md-12">
|
2016-05-15 22:09:00 +00:00
|
|
|
|
2016-05-31 16:47:08 +00:00
|
|
|
<table class="table table-hover table-condensed table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Product</th>
|
|
|
|
<th>Category</th>
|
|
|
|
<th>Availability</th>
|
|
|
|
<th>Price</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2016-05-15 22:09:00 +00:00
|
|
|
|
2016-05-31 16:47:08 +00:00
|
|
|
{% for product in products %}
|
|
|
|
<tr {% if not product.is_available %}class="mute"{% endif %}>
|
|
|
|
<td>
|
|
|
|
<a href="{% url 'shop:product_detail' slug=product.slug %}">
|
2016-05-15 22:09:00 +00:00
|
|
|
{{ product.name }}
|
2016-05-31 16:47:08 +00:00
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ product.category }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ product.available_in.lower|date:"Y-m-d H:i" }}
|
|
|
|
{% if product.available_in.upper %}
|
|
|
|
- {{ product.available_in.upper|date:"Y-m-d H:i" }}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ product.price|currency }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
2016-05-15 22:09:00 +00:00
|
|
|
|
2016-05-31 16:47:08 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
2016-05-15 22:09:00 +00:00
|
|
|
</div>
|
2016-05-12 17:08:54 +00:00
|
|
|
|
|
|
|
{% endblock %}
|