{% load i18n l10n window_field link_to_window humanize %}
{% comment %} {% if item.collection %}
{% field_flex_detail "Collection" item.collection "large" %}
{% endif %} {% endcomment %} {% if item.integrities_count or item.remarkabilities_count or item.conservatory_states_count 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 %}

{% trans "Preservation" %}

{% field_flex_multiple_obj "Integrity" item 'integrities' %} {% field_flex_multiple_obj "Remarkability" item 'remarkabilities' %} {% field_flex_multiple_obj _("Conservatory states") item 'conservatory_states' %} {% field_flex_multiple_obj "Alteration" item 'alterations' %} {% field_flex_multiple_obj "Alteration cause" item 'alteration_causes' %} {% field_flex_multiple_obj "Recommended treatments" item 'preservation_to_considers' %} {% field_flex "Treatment emergency" item.treatment_emergency %} {% field_flex "Estimated value" item.estimated_value|default_if_none:''|intcomma '' ' '|add:CURRENCY %} {% field_flex "Insurance value" item.insurance_value|default_if_none:''|intcomma '' ' '|add:CURRENCY %} {% field_flex "Appraisal date" item.appraisal_date %} {% field_flex_full "Conservatory comment" item.conservatory_comment "
" "
" %}
{% endif %} {% if item.container or item.container_ref %} {% if can_view_container %}

{% trans "Warehouse - container" %}

{% if item.container_ref != item.container and item.container_ref %}
{% trans "Reference container" %}
{% endif %} {% if item.container %}
{% if item.container_ref != item.container %} {% trans "Current container" %}{% else %} {% trans "Reference container / current container" %} {% endif %}
{% if item.container.index %}
{% trans "Index" %}
{{ item.container.location }} - {{ item.container.index|unlocalize }}
{% endif %} {% endif %}
{% else %} {% endif %} {% endif %} {% if item.upstream_treatment or item.downstream_treatment or non_modif_treatments_count %} {% if item.upstream_treatment %}

{% trans "Upstream treatment" %}

{% if can_view_container %}{% endif %} {% for items, treatment in item.limited_upstream_treatments %} {% if can_view_container %}{% endif %} {% endfor %}
  {% trans "Year - index" %} {% trans "Label" %} {% trans "Type" %} {% trans "State" %} {% trans "Related finds (max. 15 displayed)" %} {% trans "Doer" %}{% trans "Container" %}{% trans "Start date" %} {% trans "End date" %}
{{ treatment.year }} - {{treatment.index}} {{ treatment.label|default_if_none:"-" }} {{ treatment.treatment_types_lbl }} {{ treatment.treatment_status|default_if_none:"-" }} {% 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:"-" }} {{ treatment.end_date|default_if_none:"-" }}

{% trans "CSV" %} ({{ENCODING}})

{% endif %} {% if item.downstream_treatment %}

{% trans "Downstream treatment" %}

{% if can_view_container %}{% endif %} {% for items, treatment in item.limited_downstream_treatments %} {% if can_view_container %}{% endif %} {% endfor %}
  {% trans "Year - index" %} {% trans "Label" %} {% trans "Type" %} {% trans "State" %} {% trans "Related finds (max. 15 displayed)" %} {% trans "Doer" %}{% trans "Container" %}{% trans "Start date" %} {% trans "End date" %}
{{ treatment.year }} - {{treatment.index}} {{ treatment.label|default_if_none:"-" }} {{ treatment.treatment_types_lbl }} {{ treatment.treatment_status|default_if_none:"-" }} {% 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:"" }} {{ treatment.end_date|default_if_none:"" }}

{% trans "CSV" %} ({{ENCODING}})

{% endif %} {% endif %} {% if non_modif_treatments_count %}

{% trans "Simple treatments"%}

{% if can_view_container %}{% endif %} {# {% for treatment in item.treatments.all %} #} {% for items, treatment in item.non_modif_treatments %} {% if can_view_container %}{% endif %} {% endfor %} {% if can_view_container and item.container_fisrt_full_location %} {% endif %} {% if can_view_container and item.container_ref_fisrt_full_location and item.container_ref_fisrt_full_location != item.container_fisrt_full_location %} {% endif %}
  {% trans "Year - index" %} {% trans "Label/type" %} {% trans "State" %} {% trans "Related finds (max. 15 displayed)" %} {% trans "Organization/responsible" %}{% trans "Container" %}{% trans "Date start/end" %}
{{ treatment.year|unlocalize }}-{{treatment.index|unlocalize}} {% if treatment.label %}{{ treatment.label}} ({{treatment.treatment_types_lbl}}){% else %}{{treatment.treatment_types_lbl}}{% endif %} {{ treatment.treatment_status|default_if_none:"-" }} {% for it in items %}{{it}} {{it|link_to_window:request}}{% endfor %} {{ treatment.organization|default_if_none:"-" }}/{{ treatment.person|default_if_none:"-" }}{% for find_treatment in treatment.get_find_treatment_list %}{% if find_treatment.find.pk == item.pk %}{{ find_treatment.full_location|default_if_none:"-" }}{% if find_treatment.location_type_label %} {{find_treatment.location_type_label}}{% endif %}{% endif %}{% endfor %}{{ treatment.start_date|default_if_none:"-" }}{% if treatment.end_date %}/{{ treatment.end_date|default_if_none:"-" }}{% endif %}
{% trans "First packaging" %} {{ item.container_fisrt_full_location }} {% if item.container_fisrt_full_location == item.container_ref_fisrt_full_location %}{% trans "Reference/current" %}{% else %}{% trans "Current" %}{% endif %}
{% trans "First packaging" %} {{ item.container_ref_fisrt_full_location }} {% trans "Reference" %}
{% endif %} {% if item.associated_treatment_files_count %}

{% trans "Treatment requests" %}

{% for treatment_file in item.associated_treatment_files %} {% endfor %}
  {% trans "Year - index" %} {% trans "Type" %} {% trans "Name" %} {% trans "Person in charge" %} {% trans "Applicant" %} {% trans "Applicant organisation" %} {% trans "Reception date" %} {% trans "End date" %}
{{ treatment_file.year }} - {{treatment_file.index}} {{ treatment_file.type }} {{ treatment_file.name|default_if_none:"-" }} {{ treatment_file.in_charge|default_if_none:"" }} {{ treatment_file.applicant|default_if_none:"" }} {{ treatment_file.applicant_organisation|default_if_none:"" }} {{ treatment_file.reception_date|default_if_none:"" }} {{ treatment_file.end_date|default_if_none:"" }}
{% endif %}