bornhack-website/shop/templates/product_detail.html

49 lines
1 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-06 20:33:59 +00:00
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">
<div class="col-xs-12 col-md-8">
<h2>{{ product.name }}</h2>
{{ product.description|commonmark }}
</div>
2016-05-30 18:56:03 +00:00
<div class="col-xs-12 col-md-4">
2016-05-30 18:56:03 +00:00
<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" }}
</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 %}
{% endblock %}
2016-05-30 18:56:03 +00:00
</div>
2016-05-30 18:56:03 +00:00
</div>