From: Emilie Date: Wed, 26 Oct 2016 13:06:56 +0000 (+0200) Subject: Task #257: display block if content exists X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=0d4ef2d8ba32c0676cfaf1e05aa27f66d637f319;p=mezzo.git Task #257: display block if content exists --- 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 %}