summaryrefslogtreecommitdiff
path: root/archaeological_operations/templates
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/templates')
-rw-r--r--archaeological_operations/templates/ishtar/sheet_operation.html25
-rw-r--r--archaeological_operations/templates/ishtar/sheet_site.html26
2 files changed, 26 insertions, 25 deletions
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html
index e290ce319..fced5457a 100644
--- a/archaeological_operations/templates/ishtar/sheet_operation.html
+++ b/archaeological_operations/templates/ishtar/sheet_operation.html
@@ -410,28 +410,9 @@
{% if display_relations %}
<div class="tab-pane fade" id="{{window_id}}-relations"
role="tabpanel" aria-labelledby="{{window_id}}-relations-tab">
-
- {% if item.right_relations.count and not item.right_relations_not_available %}
- <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-operation/{{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> &nbsp;
- {% trans "No relations" %}
- </div>
- {% endif %}
+ {% with relation_url="/show-operation/" %}
+ {% include "ishtar/blocks/sheet_relations.html" %}
+ {% endwith %}
</div>
{% endif %}
diff --git a/archaeological_operations/templates/ishtar/sheet_site.html b/archaeological_operations/templates/ishtar/sheet_site.html
index 7fda4efe0..2ce9e7eaa 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 %}
@@ -8,6 +8,12 @@
{% endblock %}
{% block content %}
+{# 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 %}
{% with permission_change_geovectordata=permission_change_geovectordata %}
@@ -52,6 +58,13 @@
{% endif %}
{% field_flex_full _("Comment") item.comment "<pre>" "</pre>" %}
</div>
+{% if item.cached_periods or dating_list %}
+ <h3>{% trans "Periods / Datings" %}</h3>
+ {% field_flex_multiple_obj _("Periods") item 'periods' %}
+ {% with url_dating="site-dating" %}
+ {% include "ishtar/blocks/sheet_dating_list.html" %}
+ {% endwith %}
+{% endif %}
{% if item.cached_types or item.nature_of_site or item.interpretation_level or item.discovery_status or item.cached_current_states or item.cached_periods or item.cached_remains or item.cultural_attributions.count or item.discoverer %}
<h3>{% trans "Scientific" %}</h3>
<div class="row">
@@ -138,19 +151,26 @@
{% endif %}
{% endif %}
+{% if display_relations %}
+ {% with relation_url="/show-site/" %}
+ {% include "ishtar/blocks/sheet_relations.html" %}
+ {% endwith %}
+{% endif %}
+
{% if not is_external and SHOW_GEO %}
<h3>{% trans "Geographic data" %}</h3>
{% with geo_item=item %}{% include "ishtar/blocks/sheet_geographic.html" %}{% endwith %}
{% endif %}
{% if not is_external %}
-{% if item.history_creator or item.last_edition_date or item.created %}
+{% if item.history_creator or item.last_edition_date or item.created or item.editors.count %}
<h3>{% trans "Sheet"%}</h3>
<div class="row">
+ {% field_flex_multiple _("Editors") item.editors %}
{% include "ishtar/blocks/sheet_creation_section.html" %}
</div>
{% endif %}
{% endif %}
-{% endwith %} {% endwith %} {% endwith %}
+{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}
{% endblock %}