bornhack-website/shop/templates/product_detail.html

61 lines
1.2 KiB
HTML
Raw Normal View History

2016-05-19 09:19:51 +00:00
{% extends 'shop_base.html' %}
2016-05-14 17:20:47 +00:00
{% load bootstrap3 %}
{% load commonmark %}
2016-05-31 18:35:20 +00:00
{% load shop_tags %}
2016-05-06 20:33:59 +00:00
2016-07-05 16:46:32 +00:00
{% block title %}
{{ product.name }} | {{ block.super }}
{% endblock %}
2016-05-19 09:19:51 +00:00
{% block shop_content %}
2016-05-06 20:33:59 +00:00
2016-05-30 18:56:03 +00:00
<div class="row">
2016-05-30 22:58:11 +00:00
<div class="col-sm-12 col-md-8">
<h2>{{ product.name }}</h2>
{{ product.description|commonmark }}
</div>
2016-05-30 18:56:03 +00:00
2016-05-30 22:58:11 +00:00
<div class="col-sm-12 col-md-4">
2016-05-30 18:56:03 +00:00
2016-05-31 18:35:20 +00:00
<h3>
<small>Price</small><br />
{{ product.price|currency }}
</h3>
<hr />
<h3>Add to order</h3>
2016-05-30 18:56:03 +00:00
{% if user.is_authenticated %}
{% if product.is_available %}
2016-05-30 18:56:03 +00:00
<form method="POST">
{% csrf_token %}
{% bootstrap_form form %}
{% bootstrap_button "Add to order" button_type="submit" button_class="btn-primary" %}
</form>
2016-05-30 18:56:03 +00:00
{% else %}
2016-05-30 18:56:03 +00:00
<p>
This product is available from
{{ product.available_in.lower|date:"Y-m-d H:i T" }}
</p>
2016-05-30 18:56:03 +00:00
{% endif %}
2016-05-30 18:56:03 +00:00
{% else %}
<a href="{% url 'account_signup' %}?next={% url 'shop:product_detail' slug=product.slug %}">
Signup</a> or
<a href="{% url 'account_login' %}?next={% url 'shop:product_detail' slug=product.slug %}">
login</a>
to order this product
{% endif %}
2016-05-30 18:56:03 +00:00
</div>
2016-05-30 18:56:03 +00:00
</div>
2016-06-03 19:02:05 +00:00
{% endblock %}