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_left_top %}
2016-05-29 12:49:47 +00:00
<p>
2016-05-15 22:09:00 +00:00
Categories:
{% for category in categories %}
<a href="{% url 'shop:index' %}?category={{category.slug}}"
class="label label-{% if category.slug == current_category %}primary{% else %}default{% endif %}">
{{category}}
2016-05-15 22:09:00 +00:00
</a>&nbsp;
{% endfor %}
</p>
{% endblock %}
2016-05-15 22:09:00 +00:00
{% block shop_content %}
2016-05-15 22:09:00 +00:00
<hr />
<div class="row">
{% for product in products %}
<a href="{% url 'shop:product_detail' slug=product.slug %}">
<div class="col-sm-4 col-lg-4 col-md-4">
<div class="thumbnail">
<img src="http://placehold.it/320x200" alt="">
<div class="caption">
<h5>{{ product.category.name }}</h5>
<h4>
{{ product.name }}
</h4>
<h4>
Price: {{ product.price|currency }}
2016-05-15 22:09:00 +00:00
</h4>
<p>
2016-05-30 15:59:53 +00:00
{{ product.description|truncatechars:30 }}
2016-05-15 22:09:00 +00:00
</p>
<small>
<strong>Availability:</strong><br/>
{{ 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 %}
</small>
</div>
</div>
</div>
</a>
{% endfor %}
</div>
2016-05-12 17:08:54 +00:00
{% endblock %}