From d1ccd3fe6f240882b2158e046b4e7908a814930f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 29 Jan 2019 12:15:51 +0100 Subject: Treatments: add a view to get all non modif treatments - manage go back in the modi treatment hierarchy --- archaeological_finds/templates/ishtar/sheet_find.html | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'archaeological_finds/templates') diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index ff0ccb2b0..1af09b030 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -20,9 +20,10 @@ {% with permission_view_own_document=permission_view_own_document %} {% with m2m_listing_datings=item|m2m_listing:'datings' %} +{% with non_modif_treatments_count=item.non_modif_treatments_count %} {% with display_datings=item.integrities.count|or_:item.remarkabilities.count|or_:item.conservatory_state|or_:item.conservatory_comment|or_:item.alterations.count|or_:item.alteration_causes.count|or_:item.preservation_to_considers.count|or_:item.appraisal_date|or_:item.treatment_emergency|or_:item.insurance_value|or_:item.estimated_value|or_:m2m_listing_datings|or_:item.dating_comment %} -{% with display_warehouse_treatments=item.container|or_:item.container_ref|or_:item.upstream_treatment|or_:item.downstream_treatment|or_:item.treatments.count %} +{% with display_warehouse_treatments=item.container|or_:item.container_ref|or_:item.upstream_treatment|or_:item.downstream_treatment|or_:non_modif_treatments_count %} {% with can_view_documents=permission_view_own_document|or_:permission_view_document %} {% with display_documents=can_view_documents|and_:item.documents.count %} @@ -263,9 +264,9 @@ {% field_flex "Precise localisation" item.container.cached_division %} {% endif %} - {% if item.upstream_treatment or item.downstream_treatment or item.treatments.count %} - {% if item.treatments.all %} -

{% trans "Treatments"%}

+ {% if item.upstream_treatment or item.downstream_treatment or non_modif_treatments_count %} + {% if non_modif_treatments_count %} +

{% trans "Simple treatments"%}

@@ -279,7 +280,8 @@ - {% for treatment in item.treatments.all %} + {# {% for treatment in item.treatments.all %} #} + {% for items, treatment in item.non_modif_treatments %} - + @@ -395,7 +397,7 @@ {% endif %} -{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} +{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} {% endblock %} -- cgit v1.2.3
 {% trans "Start date" %} {% trans "End date" %}
{{ treatment.label|default_if_none:"-" }} {{ treatment.treatment_types_lbl }} {{ treatment.treatment_state|default_if_none:"-" }}{% for it in treatment.limited_finds %}{{it}} {{it|link_to_window:request}}{% endfor %}{% for it in items %}{{it}} {{it|link_to_window:request}}{% endfor %} {{ treatment.person|default_if_none:"-" }} {{ treatment.container|default_if_none:"-" }} {{ treatment.start_date|default_if_none:"-" }}