summaryrefslogtreecommitdiff
path: root/archaeological_finds/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-10-02 20:53:47 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-10-02 20:53:47 +0200
commit23e3adab20a39db10284aba0d6face5d0019c3fb (patch)
treee0b3f2cd45476612a7c030ec4ea241ca3f4aa506 /archaeological_finds/templates
parentbb90818070ef577dd8b70af2c84669df82613813 (diff)
downloadIshtar-23e3adab20a39db10284aba0d6face5d0019c3fb.tar.bz2
Ishtar-23e3adab20a39db10284aba0d6face5d0019c3fb.zip
Sheet find: fix layout when no image is present
Diffstat (limited to 'archaeological_finds/templates')
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find.html9
1 files 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 @@
</div>
{% endif %}
+
+{% with nb_image=item.images.count %}
+{% if nb_image %}
<div class="clearfix">
<div class="card float-left col-12 col-md-6 col-lg-4">
{% include "ishtar/blocks/window_image.html" %}
<div class="card-body">
- <p class="card-text">
- </p>
</div>
</div>
+{% endif %}
<h2>{% trans "Associated base finds"%}</h2>
<div class="subsection">
{% 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 %}
</div>
+{% endwith %}
<h3>{% trans "Identification" %}</h3>