Make shop into a table.
This commit is contained in:
parent
a7535753a8
commit
30b86536a2
|
@ -21,42 +21,45 @@
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<div class="row">
|
<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>Availability</th>
|
||||||
|
<th>Price</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
{% for product in products %}
|
{% for product in products %}
|
||||||
|
<tr {% if not product.is_available %}class="mute"{% endif %}>
|
||||||
|
<td>
|
||||||
<a href="{% url 'shop:product_detail' slug=product.slug %}">
|
<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 }}
|
{{ product.name }}
|
||||||
</h4>
|
</a>
|
||||||
|
</td>
|
||||||
<h4>
|
<td>
|
||||||
Price: {{ product.price|currency }}
|
{{ product.category }}
|
||||||
</h4>
|
</td>
|
||||||
|
<td>
|
||||||
<p>
|
|
||||||
{{ product.description|truncatechars:30 }}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<small>
|
|
||||||
<strong>Availability:</strong><br/>
|
|
||||||
{{ product.available_in.lower|date:"Y-m-d H:i" }}
|
{{ product.available_in.lower|date:"Y-m-d H:i" }}
|
||||||
{% if product.available_in.upper %}
|
{% if product.available_in.upper %}
|
||||||
- {{ product.available_in.upper|date:"Y-m-d H:i" }}
|
- {{ product.available_in.upper|date:"Y-m-d H:i" }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</small>
|
</td>
|
||||||
</div>
|
<td>
|
||||||
</div>
|
{{ product.price|currency }}
|
||||||
</div>
|
</td>
|
||||||
</a>
|
</tr>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue