+
+
-
{{ banner.text }}
- {% if not banner.future_date %}
+
{{ banner.text|safe }}
+ {% if banner.url %}
{{ banner.button_text }}
{% endif %}
- {% if banner.future_date %}
-
-
+
+

+
+ {% if banner.future_date %}
+
-
-
- {% endif %}
-
-
- {% else %}
-
-
-
-
{{ banner.text }}
-
{{ banner.button_text }}
-
- {% if banner.future_date %}
-
-
До конца акции осталось
-
+ {% endif %}
- {% endif %}
-
- {% endif %}
-
Скрыть{% if not request.user_agent.is_mobile %} баннер{% endif %}
-{% endif %}
diff --git a/project/templates/blocks/banners.html b/project/templates/blocks/banners.html
index 4c3df84d..ed3f0e55 100644
--- a/project/templates/blocks/banners.html
+++ b/project/templates/blocks/banners.html
@@ -1,3 +1,4 @@
+{% if banners|length > 1 %}
{% for banner in banners %}
-
-
-
-
{{ banner.text }}
- {% if banner.url %}
-
{{ banner.button_text }}
- {% endif %}
-
-
-

-
- {% if banner.future_date %}
-
-
До конца акции осталось
-
-
- {% endif %}
-
-
-
+ {% include 'templates/blocks/banner.html' %}
{% endfor %}
+{% else %}
+ {% include 'templates/blocks/banner.html' with banner=banners.0 %}
+{% endif %}