From c6b94c38f8afe9a73ccb40b6af8ea9f8fa3f4ce8 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 30 Apr 2018 16:05:03 +0200 Subject: Display relation images on the sheet. --- .../templates/ishtar/sheet_contextrecord.html | 9 +++++++++ archaeological_operations/templates/ishtar/sheet_operation.html | 9 +++++++++ ishtar_common/templates/ishtar/sheet.html | 3 +++ 3 files changed, 21 insertions(+) diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index 2dd58d49c..dd0579271 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -79,6 +79,15 @@ {% trans "Context record relations" as cr_rels %} {% if item.right_relations.count %} {% dynamic_table_document cr_rels 'context_records_relations' 'left_record_id' item.pk '' output %} + +{% if item.relation_image %} +
+ {% if output != "ODT" %}{% endif %} + + {% if output != "ODT" %}{% endif %} +
+
+{% endif %} {% endif %} diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index 8530d0579..7999dc21d 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -165,6 +165,15 @@ {% if forloop.last %} {% endif %} {% endfor %} + +{% if item.relation_image %} +
+ {% if output != "ODT" %}{% endif %} + + {% if output != "ODT" %}{% endif %} +
+
+{% endif %} {% endif %} {% if item.archaeological_sites.count %} diff --git a/ishtar_common/templates/ishtar/sheet.html b/ishtar_common/templates/ishtar/sheet.html index c5511b859..e12429443 100644 --- a/ishtar_common/templates/ishtar/sheet.html +++ b/ishtar_common/templates/ishtar/sheet.html @@ -84,6 +84,9 @@ {% if item.image %} lightGallery(document.getElementById('lightgallery-{{window_id}}')); {% endif%} + {% if item.relation_image %} + lightGallery(document.getElementById('lightgallery-{{window_id}}-relation-image')); + {% endif%} }); {% endblock %} -- cgit v1.2.3