From 0dac053b72dd4e3ccadbdfd922e98ddceba3adca Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 2 Apr 2026 13:04:45 +0200 Subject: ✨ sites - relations between sites: sheet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/ishtar/sheet_site.html | 27 ++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/archaeological_operations/templates/ishtar/sheet_site.html b/archaeological_operations/templates/ishtar/sheet_site.html index b648a709f..4116ee890 100644 --- a/archaeological_operations/templates/ishtar/sheet_site.html +++ b/archaeological_operations/templates/ishtar/sheet_site.html @@ -1,5 +1,5 @@ {% extends "ishtar/sheet.html" %} -{% load i18n ishtar_helpers window_tables window_header window_ope_tables window_field from_dict %} +{% load i18n l10n ishtar_helpers window_tables window_header window_ope_tables window_field from_dict %} {% block head_title %}{{SITE_LABEL}} - {{item.cached_label}}{% endblock %} @@ -11,6 +11,7 @@ {# trick to set to null non existing variable #} {% with permission_view_own_archaeologicalsite=permission_view_own_archaeologicalsite %} +{% with display_relations=item|safe_or:"right_relations.count|left_relations.count"|safe_and_not:"right_relations_not_available"|safe_and_not:"left_relations_not_available" %} {% with can_change=permission_change_own_archaeologicalsite|or_:permission_change_archaeologicalsite %} {% with dating_list=item|m2m_listing:"datings" %} {% with permission_change_own_geovectordata=permission_change_own_geovectordata %} @@ -150,6 +151,28 @@ {% endif %} {% endif %} +{% if display_relations %} +

{% trans "Relations"%}

+{% for rel in item.right_relations.all %} +{% ifchanged rel.relation_type %} +{% if forloop.counter0 %}{% endif %} +

{{rel.relation_type}}

+
{% endifchanged %} +
+ + + {{rel.right_record}} +
+{% if forloop.last %} +
{% endif %} +{% endfor %} +{% else %} + +{% endif %} + {% if not is_external and SHOW_GEO %}

{% trans "Geographic data" %}

{% with geo_item=item %}{% include "ishtar/blocks/sheet_geographic.html" %}{% endwith %} @@ -165,5 +188,5 @@ {% endif %} {% endif %} -{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} +{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} {% endblock %} -- cgit v1.2.3