bornhack-website/src/shop/templates/shop_index.html

78 lines
1.7 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
2016-07-05 16:46:32 +00:00
{% block title %}
Shop | {{ block.super }}
{% endblock %}
{% 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>
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 %}
{% ifchanged product.category %}
<tr style="background-color: #cccccc">
<td colspan="2">
<strong>
{{ product.category }}
</strong>
</td>
</td>
</tr>
{% endifchanged %}
<tr>
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>
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>
{% empty %}
<tr>
<td colspan="2">
Sorry no products found.
</td>
</tr>
2016-05-31 16:47:08 +00:00
{% endfor %}
</tbody>
</table>
2016-06-01 17:49:05 +00:00
<p class="lead text-center">All prices mentioned include 25% Danish VAT!</p>
2016-05-31 16:47:08 +00:00
</div>
2016-05-15 22:09:00 +00:00
</div>
2016-05-12 17:08:54 +00:00
{% endblock %}