From e3ce9c77d36db4510076b677ec7ce1e0021a51f8 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 15 Nov 2021 16:37:42 +0100 Subject: Syndication - serialization - display sheet operation --- .../templates/ishtar/sheet_operation.html | 83 +++++++++++++++++++--- 1 file changed, 73 insertions(+), 10 deletions(-) (limited to 'archaeological_operations/templates') diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index babcc9ce0..811997515 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -21,9 +21,10 @@ {% with display_data=item.data %} {% with display_relations=item|safe_or:"right_relations.count|left_relations.count" %} -{% with display_sites=item|safe_or:"archaeological_sites.count|grouped_parcels|administrative_act.count" %} +{% 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 display_documents=perm_documents|and_:item.documents.count %} +{% with has_documents=item|safe_or:"documents.count|documents_list" %} +{% 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 display_context_records=perm_context_records|and_:has_context_records %} @@ -31,7 +32,7 @@ {% with has_finds=item|safe_or:"has_finds" %} {% with display_finds=perm_find|and_:has_finds %} -{% if output != "ODT" and output != "PDF"%} +{% if output != "ODT" and output != "PDF" %} {% endif %} @@ -131,7 +134,7 @@ {% if next %} {{ item|m2m_listing:'towns'|join:" ; "|default:'' }} {% else %} - {{ item.towns_codes|join:" ; "|default:'' }} + {{ item.cached_towns_label }} {% endif %}

{{item.common_name|default:''}}

@@ -141,13 +144,19 @@
{% trans "Excavation dates (start/end)" as date_label %} + {% if not is_external %} {% with start_date=item.start_date|date:"DATE_FORMAT"|default:"-" %} {% with end_date=item.excavation_end_date|date:"DATE_FORMAT"|default:"-" %} {% with dates=start_date|add:" / "|add:end_date %} {% field_flex_2 date_label dates %} - {% endwith %} - {% endwith %} - {% endwith %} + {% endwith %}{% endwith %}{% endwith %} + {% else %} + {% with start_date=item.start_date|default:"-" %} + {% with end_date=item.excavation_end_date|default:"-" %} + {% with dates=start_date|add:" / "|add:end_date %} + {% field_flex_2 date_label dates %} + {% endwith %}{% endwith %}{% endwith %} + {% endif %}
{% trans "State" %} @@ -243,10 +252,12 @@ {% field_flex_full "Comment about scientific documentation" item.scientific_documentation_comment "
" "
" %}
+ {% if not is_external %}

{% trans "Sheet"%}

{% include "ishtar/blocks/sheet_creation_section.html" %}
+ {% endif %} {% if item.virtual_operation %} + {% endif %} -{% 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 %} \ No newline at end of file -- cgit v1.2.3