60 lines
1.3 KiB
HTML
60 lines
1.3 KiB
HTML
{% extends 'shop_base.html' %}
|
|
{% load bootstrap3 %}
|
|
{% load shop_tags %}
|
|
|
|
{% block shop_content %}
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<p>
|
|
Categories:<br />
|
|
{% for category in categories %}
|
|
<a href="{% url 'shop:index' %}?category={{category.slug}}"
|
|
class="label label-{% if category.slug == current_category.slug %}primary{% else %}default{% endif %}">
|
|
{{category}}
|
|
</a>
|
|
{% endfor %}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
|
|
<table class="table table-hover table-condensed table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Product</th>
|
|
<th>Category</th>
|
|
<th>Price</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
{% for product in products %}
|
|
<tr {% if not product.is_available %}class="text-muted"{% endif %}>
|
|
<td>
|
|
<a href="{% url 'shop:product_detail' slug=product.slug %}">
|
|
{{ product.name }}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
{{ product.category }}
|
|
</td>
|
|
<td>
|
|
<div class="pull-right">
|
|
{{ product.price|currency }}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|