bornhack-website/shop/templates/shop_index.html

60 lines
1.3 KiB
HTML
Raw Normal View History

2016-05-19 09:19:51 +00:00
{% extends 'shop_base.html' %}
2016-05-13 06:52:07 +00:00
{% load bootstrap3 %}
{% load shop_tags %}
2016-05-15 22:09:00 +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>&nbsp;
{% 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>
2016-06-01 16:44:45 +00:00
<th class="pull-right">Price</th>
2016-05-31 16:47:08 +00:00
</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="text-muted"{% endif %}>
2016-05-31 16:47:08 +00:00
<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>
2016-05-31 17:36:19 +00:00
<div class="pull-right">
{{ product.price|currency }}
</div>
2016-05-31 16:47:08 +00:00
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
2016-05-15 22:09:00 +00:00
</div>
2016-05-12 17:08:54 +00:00
{% endblock %}