From 9a26d8ef988d1b648fe5c6fb0d001d5a468a7584 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 2 Oct 2018 20:53:47 +0200 Subject: Sheet find: fix layout when no image is present --- archaeological_finds/templates/ishtar/sheet_find.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index 55c02d8c7..43136e357 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -15,24 +15,27 @@ {% endif %} + +{% with nb_image=item.images.count %} +{% if nb_image %}
{% include "ishtar/blocks/window_image.html" %}
-

-

+{% endif %}

{% trans "Associated base finds"%}

{% for base_find in item.base_finds.all %} - {% with first=forloop.first|add:item.images.count %} + {% with first=forloop.first|add:nb_image %} {% include "ishtar/sheet_basefind.html" %} {% endwith %} {% endfor %}
+{% endwith %}

{% trans "Identification" %}

-- cgit v1.2.3