From 0d4ef2d8ba32c0676cfaf1e05aa27f66d637f319 Mon Sep 17 00:00:00 2001 From: Emilie Date: Wed, 26 Oct 2016 15:06:56 +0200 Subject: [PATCH] Task #257: display block if content exists --- app/templates/core/inc/block.html | 38 +++++++++++++++++-------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/app/templates/core/inc/block.html b/app/templates/core/inc/block.html index a969e76b..fc60592f 100644 --- a/app/templates/core/inc/block.html +++ b/app/templates/core/inc/block.html @@ -1,28 +1,32 @@ {% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} {% if blocks %}
+ {% if blocks.first.content %}
+ {% endif %} {% for block in blocks %} - {% if not forloop.first and block.with_separator %} -
- {% endif %} -
-
-
-
-

{{ block.title }}

- {% if block.description %} -
- {{ block.description }} -
- {% endif %} - {% if block.content %} - {{ block.content|richtext_filters|safe }} - {% endif %} + {% if block.content %} + {% if not forloop.first and block.with_separator %} +
+ {% endif %} +
+
+
+
+

{{ block.title }}

+ {% if block.description %} +
+ {{ block.description }} +
+ {% endif %} + {% if block.content %} + {{ block.content|richtext_filters|safe }} + {% endif %} +
-
+ {% endif %} {% endfor %}
{% endif %} -- 2.39.5