From eac249a8db85f2a76ed873bde565b9e8b59f8a4a Mon Sep 17 00:00:00 2001 From: Max Yakovenko Date: Sat, 4 Aug 2018 13:44:49 +0300 Subject: [PATCH] refactor product layout context objects --- templates/common.html | 39 ++-- templates/components/footer.html | 2 +- templates/components/header.html | 2 +- templates/components/navbar.html | 2 +- templates/products/product_category_list.html | 160 ----------------- templates/products/product_list.html | 167 +++++++++++++++--- templates/products/product_search.html | 14 -- 7 files changed, 173 insertions(+), 213 deletions(-) delete mode 100644 templates/products/product_category_list.html diff --git a/templates/common.html b/templates/common.html index 746ecec..73fbe2a 100644 --- a/templates/common.html +++ b/templates/common.html @@ -13,20 +13,20 @@ {% block extra_left_menu_items %} {% endblock extra_left_menu_items %} - {% if product_root_categories %} + {% if product_categories %}
- {% for category in product_root_categories %} + {% for category in product_categories %} + href="{% url "products:product_list" category_slug=category.slug %}"> - {{ category.alt }} + {{ category.name }} {{ category.name }} {% endfor %}
{% endif %} - {% if contact_us_form %} + {% if left_contact_us_form %}
Не нашли нужную программу или разработчика? @@ -37,7 +37,7 @@ {{ contact_us_form_message }}
{% endif %} - {% crispy contact_us_form %} + {% crispy left_contact_us_form %}
{% endif %} @@ -57,12 +57,19 @@ {% endif %} - {% if product_root_categories %} + {% if product_categories %}
@@ -78,7 +84,20 @@ {% include 'components/breadcrumbs.html' %} {% block right_common_content %} {% endblock right_common_content %} - + {% if content_contact_us_form %} +
+
+ Не нашли нужную программу или разработчика? + Заполните форму и с Вами свяжется наш специалист. +
+ {% if contact_us_form_message %} +
+ {{ contact_us_form_message }} +
+ {% endif %} + {% crispy content_contact_us_form %} +
+ {% endif %} {% endblock content %} diff --git a/templates/components/footer.html b/templates/components/footer.html index b2ec929..866d628 100644 --- a/templates/components/footer.html +++ b/templates/components/footer.html @@ -9,7 +9,7 @@