summaryrefslogtreecommitdiff
path: root/archaeological_operations/templates/ishtar/sheet_operation.html
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/templates/ishtar/sheet_operation.html')
-rw-r--r--archaeological_operations/templates/ishtar/sheet_operation.html23
1 files changed, 12 insertions, 11 deletions
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html
index a74c78ab1..86c425979 100644
--- a/archaeological_operations/templates/ishtar/sheet_operation.html
+++ b/archaeological_operations/templates/ishtar/sheet_operation.html
@@ -24,17 +24,18 @@
{% with permission_change_geo=permission_change_own_geovectordata|or_:permission_change_geovectordata %}
{% with display_data=item.data %}
-{% with display_relations=item|safe_or:"right_relations.count|left_relations.count" %}
+{% 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 display_sites=item|safe_or:"archaeological_sites.count|grouped_parcels|administrative_act.count|archaeological_sites_list" %}
{% with perm_documents=permission_view_own_document|or_:permission_view_document %}
-{% with has_documents=item|safe_or:"documents.count|documents_list" %}
+{% with has_documents=item|safe_or:"documents.count|documents_list"|safe_and_not:"documents_not_available" %}
{% with display_documents=perm_documents|and_:has_documents %}
{% with perm_context_records=permission_view_own_contextrecord|or_:permission_view_contextrecord %}
-{% with has_context_records=item|safe_or:"context_record.count" %}
+{% with has_context_records=item|safe_or:"context_record.count"|safe_and_not:"context_record_not_available" %}
{% with display_context_records=perm_context_records|and_:has_context_records %}
{% with perm_find=permission_view_own_find|or_:permission_view_find %}
{% with has_finds=item|safe_or:"has_finds" %}
{% with display_finds=perm_find|and_:has_finds %}
+{% with has_image=item|safe_or:"images.count"|safe_and_not:"images_not_available" %}
{% if output != "ODT" and output != "PDF" %}
<ul class="nav nav-tabs" id="{{window_id}}-tabs" role="tablist">
@@ -194,7 +195,6 @@
{% field_flex_2 "Code DRASSM" item.drassm_code %}
{% field_flex_2 "Old code" item.old_code %}
- {% with has_image=item.images.count %}
{% if not has_image %}
</div>
</div>
@@ -239,7 +239,6 @@
{% if has_image %}
</div> {# <div> #}
{% endif %}
- {% endwith %}
<hr class="clearfix">
{% field_flex_multiple_obj "Remains" item 'remains' %}
{% field_flex_multiple_obj "Chronological period" item 'periods' %}
@@ -368,7 +367,7 @@
<div class="tab-pane fade" id="{{window_id}}-sites"
role="tabpanel" aria-labelledby="{{window_id}}-sites-tab">
{% trans "Archaeological sites" as archaeologicalsites_label %}
- {% if item.archaeological_sites.count %}
+ {% if item.archaeological_sites.count and not item.archaeological_sites_not_available %}
{% dynamic_table_document archaeologicalsites_label 'sites' 'operations' item.pk '' output %}
{% elif item.archaeological_sites_list %}
<h3>{{archaeologicalsites_label}}</h3>
@@ -387,12 +386,12 @@
</table>
{% endif %}
- {% if item.parcels.count %}
+ {% if item.parcels.count and not item.parcels_not_available %}
{% trans "Associated parcels" as parcels_label %}
{% include "ishtar/blocks/window_tables/parcels.html" %}
{% endif %}
- {% if item.administrative_act.count %}
+ {% if item.administrative_act.count and not item.administrative_act_not_available %}
<h3>{% trans "Administrative acts" %}</h3>
{% table_administrativact "" item.administrative_act.all %}
{% endif %}
@@ -403,7 +402,7 @@
<div class="tab-pane fade" id="{{window_id}}-documents"
role="tabpanel" aria-labelledby="{{window_id}}-documents-tab">
{% trans "Document from this operation" as operation_docs %}
- {% if item.documents.count %}
+ {% if item.documents.count and not item.documents_not_available %}
{% dynamic_table_document operation_docs 'documents' 'operations' item.pk '' output %}
{% elif item.documents_list %}
<h3>{{operation_docs}}</h3>
@@ -416,7 +415,7 @@
<div class="tab-pane fade" id="{{window_id}}-relations"
role="tabpanel" aria-labelledby="{{window_id}}-relations-tab">
- {% if item.right_relations.count %}
+ {% 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 %}
@@ -443,8 +442,10 @@
{% if display_context_records %}
<div class="tab-pane fade" id="{{window_id}}-cr"
role="tabpanel" aria-labelledby="{{window_id}}-cr-tab">
+ {% if item.context_record.count %}
{% trans "Context records" as cr_lab %}
{% dynamic_table_document cr_lab 'context_records_for_ope' 'operation_id' item.pk 'TABLE_COLS_FOR_OPE' output %}
+ {% endif %}
{% if item.context_record_relations_q.count %}
{% trans "Context record relations" as cr_rels %}
@@ -653,6 +654,6 @@ $(document).ready( function () {
} );
{% endlocalize %}</script>
-{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %}
+{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %}
{% endblock %}