From 26ba00071ad1eb8b5bd3479290b6ffe02101298d Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 7 Jun 2024 16:53:06 +0200 Subject: 🐛 Sheet: harmonize creation/modification section (refs #4808) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_files/templates/ishtar/sheet_file.html | 8 +++++++- archaeological_finds/templates/ishtar/sheet_treatment.html | 7 +++++++ archaeological_finds/templates/ishtar/sheet_treatmentfile.html | 7 +++++++ .../templates/ishtar/sheet_administrativeact.html | 8 +++++++- archaeological_operations/templates/ishtar/sheet_site.html | 8 +++++++- archaeological_warehouse/templates/ishtar/sheet_container.html | 8 +++++++- archaeological_warehouse/templates/ishtar/sheet_warehouse.html | 8 +++++++- ishtar_common/templates/ishtar/blocks/sheet_geographic.html | 2 +- ishtar_common/templates/ishtar/sheet_document.html | 8 +++++++- ishtar_common/templates/ishtar/sheet_person.html | 8 +++++++- 10 files changed, 64 insertions(+), 8 deletions(-) diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html index b2a1a71fc..e0f6c9d2d 100644 --- a/archaeological_files/templates/ishtar/sheet_file.html +++ b/archaeological_files/templates/ishtar/sheet_file.html @@ -63,7 +63,6 @@ {% field_flex _("Creation date") item.creation_date|date:"DATE_FORMAT" %} {% field_flex "Reception date" item.reception_date|date:"DATE_FORMAT" %} {% field_flex _("Instruction deadline") item.instruction_deadline|date:"DATE_FORMAT" %} - {% include "ishtar/blocks/sheet_creation_section.html" %} {% field_flex_detail _("File managed by") item.in_charge %}
{%trans "State of the file"%}
@@ -237,6 +236,13 @@ {% endif %} {% endif %} + {% if not is_external %} +

{% trans "Sheet"%}

+
+ {% include "ishtar/blocks/sheet_creation_section.html" %} +
+ {% endif %} + {% if has_costs %}
diff --git a/archaeological_finds/templates/ishtar/sheet_treatment.html b/archaeological_finds/templates/ishtar/sheet_treatment.html index 772cfd903..ea37897b6 100644 --- a/archaeological_finds/templates/ishtar/sheet_treatment.html +++ b/archaeological_finds/templates/ishtar/sheet_treatment.html @@ -97,6 +97,13 @@ {% include "ishtar/blocks/sheet_json.html" %}
+ + {% if not is_external %} +

{% trans "Sheet"%}

+
+ {% include "ishtar/blocks/sheet_creation_section.html" %} +
+ {% endif %} {% if has_image %}{% endif %} diff --git a/archaeological_finds/templates/ishtar/sheet_treatmentfile.html b/archaeological_finds/templates/ishtar/sheet_treatmentfile.html index 676d3b4a6..eacbc894b 100644 --- a/archaeological_finds/templates/ishtar/sheet_treatmentfile.html +++ b/archaeological_finds/templates/ishtar/sheet_treatmentfile.html @@ -88,5 +88,12 @@ {% table_administrativact admact_lbl item.administrative_act.all %} {% endif %} +{% if not is_external %} +

{% trans "Sheet"%}

+
+ {% include "ishtar/blocks/sheet_creation_section.html" %} +
+{% endif %} + {% endwith %}{% endwith %}{% endwith %} {% endblock %} diff --git a/archaeological_operations/templates/ishtar/sheet_administrativeact.html b/archaeological_operations/templates/ishtar/sheet_administrativeact.html index d952f66cb..61cc4a256 100644 --- a/archaeological_operations/templates/ishtar/sheet_administrativeact.html +++ b/archaeological_operations/templates/ishtar/sheet_administrativeact.html @@ -61,7 +61,6 @@ {% endif %} - {% field_flex_detail "Created by" item.history_creator.ishtaruser.person %} {% comment %}{% if item.general_contractor.attached_to %}

@@ -79,4 +78,11 @@ {% endif %} +{% if not is_external %} +

{% trans "Sheet"%}

+
+ {% include "ishtar/blocks/sheet_creation_section.html" %} +
+{% endif %} + {% endblock %} diff --git a/archaeological_operations/templates/ishtar/sheet_site.html b/archaeological_operations/templates/ishtar/sheet_site.html index 11717314b..6cc9a3454 100644 --- a/archaeological_operations/templates/ishtar/sheet_site.html +++ b/archaeological_operations/templates/ishtar/sheet_site.html @@ -46,7 +46,6 @@ {% field_flex_multiple_obj "Cultural attributions" item 'cultural_attributions' %} {% field_flex_multiple "Collaborators" item.collaborators %} {% field_flex_full "Comment" item.comment "
" "
" %} - {% include "ishtar/blocks/sheet_creation_section.html" %} {% if item.affmar_number or item.drassm_number or item.oceanographic_service_localisation or item.shipwreck_code or item.sinking_date or item.discovery_area or item.shipwreck_name %} @@ -105,5 +104,12 @@ {% with geo_item=item %}{% include "ishtar/blocks/sheet_geographic.html" %}{% endwith %} {% endif %} +{% if not is_external %} +

{% trans "Sheet"%}

+
+ {% include "ishtar/blocks/sheet_creation_section.html" %} +
+{% endif %} + {% endwith %} {% endwith %} {% endwith %} {% endblock %} diff --git a/archaeological_warehouse/templates/ishtar/sheet_container.html b/archaeological_warehouse/templates/ishtar/sheet_container.html index ff0cd0de7..a8e2ab13e 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_container.html +++ b/archaeological_warehouse/templates/ishtar/sheet_container.html @@ -145,7 +145,6 @@ {% field_flex calculated_weight_kg_trans item.calculated_weight_kg|floatformat:"-3" %} {% endif %} {% endif %}{% endwith %} - {% include "ishtar/blocks/sheet_creation_section.html" %} {% field_flex_full "Comment" item.comment "
" "
" %} @@ -172,6 +171,13 @@ {% endwith %} {% endif %} + + {% if not is_external %} +

{% trans "Sheet"%}

+
+ {% include "ishtar/blocks/sheet_creation_section.html" %} +
+ {% endif %}
" "" %} - {% include "ishtar/blocks/sheet_creation_section.html" %}
{% include "ishtar/blocks/sheet_json.html" %} @@ -126,6 +125,13 @@ {% field_flex _("Mobile phone") item.mobile_phone %} {% endif %} + + {% if not is_external %} +

{% trans "Sheet"%}

+
+ {% include "ishtar/blocks/sheet_creation_section.html" %} +
+ {% endif %}
{% if not IS_HISTORY and permission_change_geo and output != "ODT" and output != "PDF" %} -
+ {% endif %} diff --git a/ishtar_common/templates/ishtar/sheet_document.html b/ishtar_common/templates/ishtar/sheet_document.html index 2ffcc451b..f3c8be108 100644 --- a/ishtar_common/templates/ishtar/sheet_document.html +++ b/ishtar_common/templates/ishtar/sheet_document.html @@ -40,7 +40,6 @@ title="{% trans 'Reference' %}">{{ item.reference|default:"" }}

{{ item.internal_reference|default:"" }}

- {% include "ishtar/blocks/sheet_external_id.html" %}
{% field_flex "Title" item.title %} {% field_flex "Type" item.source_type_html "" "" 1 %} @@ -144,5 +143,12 @@
{% endif %} +{% if not is_external %} +

{% trans "Sheet"%}

+
+ {% include "ishtar/blocks/sheet_creation_section.html" %} +
+{% endif %} + {% endblock %} {% endblock %} diff --git a/ishtar_common/templates/ishtar/sheet_person.html b/ishtar_common/templates/ishtar/sheet_person.html index 53cd7d84f..54e12496d 100644 --- a/ishtar_common/templates/ishtar/sheet_person.html +++ b/ishtar_common/templates/ishtar/sheet_person.html @@ -14,7 +14,6 @@ {% field_flex "Name" item.name %} {% field_flex "Surname" item.surname %} {% field_flex "Raw name" item.raw_name %} - {% field_flex_detail "Created by" item.history_creator.ishtaruser.person %} {% field_flex "Email" item.email %} {% field_flex "Type(s)" item.person_types_list %} {% field_flex_detail_multiple "Biographical notes" item.biographical_notes %} @@ -163,5 +162,12 @@ {% dynamic_table_document docs 'documents' 'authors__person__pk' item.pk '' output %} {% endif %} +{% if not is_external %} +

{% trans "Sheet"%}

+
+ {% include "ishtar/blocks/sheet_creation_section.html" %} +
+{% endif %} + {% endblock %} -- cgit v1.2.3