diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-04-02 13:04:45 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-04-02 13:30:50 +0200 |
| commit | 0dac053b72dd4e3ccadbdfd922e98ddceba3adca (patch) | |
| tree | edc4b35ed3ecc98963774bbf30e8fc94d452c792 | |
| parent | f6fe888087f9a11e42460dd7a6025bf2ea9c7119 (diff) | |
| download | Ishtar-0dac053b72dd4e3ccadbdfd922e98ddceba3adca.tar.bz2 Ishtar-0dac053b72dd4e3ccadbdfd922e98ddceba3adca.zip | |
✨ sites - relations between sites: sheet
| -rw-r--r-- | archaeological_operations/templates/ishtar/sheet_site.html | 27 |
1 files 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 %}<strong>{{SITE_LABEL}}</strong> - {{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 %} +<h3>{% trans "Relations"%}</h3> +{% for rel in item.right_relations.all %} +{% ifchanged rel.relation_type %} +{% if forloop.counter0 %}</div>{% endif %} +<h4>{{rel.relation_type}}</h4> +<div class="row">{% endifchanged %} + <div class="col-12"> + <a href="#" onclick="load_window('/show-site/{{rel.right_record.pk|unlocalize}}/');" class="display_details"> + <i class="fa fa-info-circle" aria-hidden="true"></i> + </a> {{rel.right_record}} + </div> +{% if forloop.last %} +</div>{% endif %} +{% endfor %} +{% else %} +<div class="alert alert-info" role="alert"> + <i class="fa fa-info-circle" aria-hidden="true"></i> + {% trans "No relations" %} +</div> +{% endif %} + {% if not is_external and SHOW_GEO %} <h3>{% trans "Geographic data" %}</h3> {% 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 %} |
