From 539b3ee105d17b08efedf90475ca1b425783b10e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Mon, 30 May 2016 22:28:17 +0200 Subject: [PATCH] Fix product detail template a bit for mobile. --- shop/templates/product_detail.html | 84 ++++++++++++++---------------- 1 file changed, 39 insertions(+), 45 deletions(-) diff --git a/shop/templates/product_detail.html b/shop/templates/product_detail.html index 7e546ab9..0888bbba 100644 --- a/shop/templates/product_detail.html +++ b/shop/templates/product_detail.html @@ -1,54 +1,48 @@ {% extends 'shop_base.html' %} {% load bootstrap3 %} +{% load commonmark %} {% block shop_content %} -
-
-

{{ product.name }}

-
-
-

- {{ product.description }} -

-
+
+

{{ product.name }}

+ {{ product.description|commonmark }} +
+ +
+ +

Add to order

+ + {% if user.is_authenticated %} + + {% if product.is_available %} + +
+ {% csrf_token %} + {% bootstrap_form form %} + {% bootstrap_button "Add to order" button_type="submit" button_class="btn-primary" %} +
+ + {% else %} + +

+ This product is available from + {{ product.available_in.lower|date:"Y-m-d H:i" }} +

+ + {% endif %} + + {% else %} + + Signup or + + login + to order this product + {% endif %} + {% endblock %} + +
- -
- -

Add to order

- - {% if user.is_authenticated %} - - {% if product.is_available %} - -
- {% csrf_token %} - {% bootstrap_form form %} - {% bootstrap_button "Add to order" button_type="submit" button_class="btn-primary" %} -
- - {% else %} - -

- This product is available from - {{ product.available_in.lower|date:"Y-m-d H:i" }} -

- - {% endif %} - - {% else %} - - Signup or - - login - to order this product - {% endif %} - {% endblock %} - -
- -