You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
984 B
34 lines
984 B
{% extends "cash/base.html" %} |
|
{% load url from future %} |
|
{% load static %} |
|
{% load i18n %} |
|
|
|
|
|
{% block content %} |
|
|
|
<ul class="nav nav-tabs"> |
|
<li {% if not category %}class="active"{% endif %}><a href="{% url 'products' %}">{% trans "All categories" %}</a></li> |
|
{% for c in categories %} |
|
<li {% if c == category %}class="active"{% endif %}><a href="{% url 'products' %}{{c.id}}">{{ c.name }}</a></li> |
|
{% endfor %} |
|
</ul> |
|
|
|
<!-- Ugly workaround --> |
|
<br/> |
|
|
|
<div class="row"> |
|
{% for p in product_list %} |
|
<div class="col-xs-6 col-md-3"> |
|
<div class="thumbnail"> |
|
<img src="{% if p.image_thumbnail %}{{ p.image_thumbnail.url }}{% else %}{% static "images/no-image.png" %}{% endif %}" alt="{% trans "Product image" %}" style="width: 100%" /> |
|
<div class="caption"> |
|
<h3>{{ p.name }}</h3> |
|
<h4>{{ p.price|floatformat:2 }} €</h4> |
|
<a class="btn btn-primary" href="{% url 'buy' p.id %}">{% trans "Buy" %}</a> |
|
</div> |
|
</div> |
|
</div> |
|
{% endfor %} |
|
</div> |
|
|
|
{% endblock %}
|
|
|