From ed3ecce023e8214f987af9bbd3db89faef2643ac Mon Sep 17 00:00:00 2001 From: Thomas Fillon Date: Tue, 8 Sep 2015 10:55:28 +0200 Subject: [PATCH] Add Record information on product page --- diggersdigest/templates/index.html | 10 ++++--- diggersdigest/templates/shop/product.html | 34 ++++++++++++++++++++++- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/diggersdigest/templates/index.html b/diggersdigest/templates/index.html index 461baf1..bfad59d 100644 --- a/diggersdigest/templates/index.html +++ b/diggersdigest/templates/index.html @@ -26,15 +26,16 @@ {% endblocktrans %} {% load blog_tags records_tags keyword_tags i18n mezzanine_tags %} -
+

{% trans "Showcase" %}

-
+
{% shop_recent_products 9 as recent_products %} {% if recent_products %}

{% trans "Latest Releases" %}

-{% for product in recent_products %} -
+
+ {% for product in recent_products %} + {% endfor %} +
{% endif %}
diff --git a/diggersdigest/templates/shop/product.html b/diggersdigest/templates/shop/product.html index 4ef715d..4f2e883 100644 --- a/diggersdigest/templates/shop/product.html +++ b/diggersdigest/templates/shop/product.html @@ -1,5 +1,5 @@ {% extends "shop/base.html" %} -{% load staticfiles mezzanine_tags shop_tags rating_tags i18n %} +{% load staticfiles mezzanine_tags shop_tags records_tags rating_tags i18n %} {% block meta_title %}{{ product.meta_title }}{% endblock %} {% block body_id %}category{% endblock %} @@ -80,6 +80,38 @@ $(document).ready(function() { {% endspaceless %} {% endif %} + +
    +
  • {{ product.records.first.artist }}
  • +
  • {{ product.records.first.title }}
  • +
  • + {% trans "Label:" %} + {{ product.records.first.label }} +
  • +
  • + {% trans "Country:" %} + {{ product.records.first.country }} +
  • + {% if product.records.first.release_year %} +
  • + {% trans "Release year:" %} + {{ product.records.first.release_year }} +
  • + {% else %} +
  • + {% trans "Release decade:" %} + {{ product.records.first.release_decade }}
  • + {% endif %} +
  • + {% trans "Cover:" %} + {{ product.records.first.cover_condition }}
  • +
  • + {% trans " Vinyl:" %} + {{ product.records.first.vinyl_condition }}
  • + +
+ + {% editable product.content %} {{ product.content|richtext_filters|safe }} {% endeditable %} -- 2.39.5