From c42d4915a37ff7cc7080baae5d623060b3243604 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 24 Sep 2015 16:47:34 +0200 Subject: [PATCH] simplify price display management --- app/records/static/css/dig2.css | 10 ++++++++-- app/templates/pages/category.html | 4 ---- app/templates/shop/includes/price.html | 4 ++++ app/templates/shop/product.html | 4 +--- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/records/static/css/dig2.css b/app/records/static/css/dig2.css index 6278061..be25ba5 100644 --- a/app/records/static/css/dig2.css +++ b/app/records/static/css/dig2.css @@ -62,6 +62,12 @@ hr { margin-top: 2em; } -.error-msg { - font-size: 85%; +.placeholder { + display:block; + height:148px; + background: white; +} + +.unavailable-msg { + font-weight: bold; } diff --git a/app/templates/pages/category.html b/app/templates/pages/category.html index 683b3d1..d208035 100644 --- a/app/templates/pages/category.html +++ b/app/templates/pages/category.html @@ -70,11 +70,7 @@
{% if product.variations.all %} {% with product.variations.all as variations and True as category %} - {% if product.available %} {% include "shop/includes/price.html" %} - {% else %} - {% trans "This product is currently unavailable." %} - {% endif %} {% endwith %} {% endif %}
diff --git a/app/templates/shop/includes/price.html b/app/templates/shop/includes/price.html index bf8de99..75ebf75 100644 --- a/app/templates/shop/includes/price.html +++ b/app/templates/shop/includes/price.html @@ -3,6 +3,7 @@ diff --git a/app/templates/shop/product.html b/app/templates/shop/product.html index 79a221d..62b0fec 100644 --- a/app/templates/shop/product.html +++ b/app/templates/shop/product.html @@ -130,10 +130,8 @@ $(function () { {{ product.record.vinyl_condition.abbr }} - {% if product.available and has_available_variations %} + {% if has_available_variations %}
  • {% include "shop/includes/price.html" %}
  • - {% else %} -
  • {% trans "This product is currently unavailable." %}
  • {% endif %} -- 2.39.5