{% extends "ishtar/sheet.html" %} {% load i18n window_tables window_header window_ope_tables window_field from_dict %} {% block head_title %}{% trans "Operation" %} - {{item.short_label}}{% if item.common_name %} - {{item.common_name}}{% endif %}{% endblock %} {% block toolbar %} {% window_nav item window_id 'show-operation' 'operation_modify' 'show-historized-operation' 'revert-operation' previous next 1 %} {% endblock %} {% block content %}
{% include "ishtar/blocks/window_image.html" %}
{% if item.year or item.operation_code %} {{item.year|default:''}}-{{item.operation_code|default:''}}{% endif %}
{% if item.code_patriarche %}OA{{item.code_patriarche}}{% endif %}
{% include "ishtar/blocks/sheet_external_id.html" %}

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

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

{% trans "General"%}

{% field_flex "Old code" item.old_code %} {% include "ishtar/blocks/sheet_creation_section.html" %} {% trans "Begining date" as begining_date_label %} {% field_flex begining_date_label item.start_date|date:"DATE_FORMAT" %} {% field_flex "Excavation end date" item.excavation_end_date|date:"DATE_FORMAT"|default:"-" %} {% field_flex_detail "Head scientist" item.scientist %} {% field_flex_detail "In charge" item.in_charge %} {% field_flex_multiple "Collaborators" item.collaborators %} {% field_flex_detail "Operator" item.operator %}
{%trans "State"%}
{% if item.is_active %}{%trans "Active file"%} {% else %}{%trans "Closed operation"%}{% endif %}
{% if item.closing.date %}
{%trans "Closing date"%}
{{ item.closing.date }} {%trans "by" %} {{ item.closing.user }}
{% endif %} {% field_flex "Type" item.operation_type %} {% if item.surface %}
{%trans "Surface"%}
{{ item.surface }} m2 ({{ item.surface_ha }} ha)
{% endif %} {% if item.cost %}
{%trans "Cost" %}
{{ item.cost }} €{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} €/m2){%endif%}
{%endif%} {% if item.duration %}
{%trans "Duration"%}
{{ item.duration }} {% trans "days" %}
{%endif%} {% field_flex_multiple "Remains" item.remains %} {% field_flex_multiple "Periods" item.periods %} {% field_flex "Record quality" item.record_quality_type %} {% field_flex "Report delivery date" item.report_delivery_date %} {% field_flex "Report processing" item.report_processing %} {% field_flex "Deadline for submission of the documentation" item.documentation_deadline %} {% field_flex "Documentation received" item.documentation_received %} {% field_flex "Deadline for submission of the finds" item.finds_deadline %} {% field_flex "Finds received" item.finds_received %} {% field_flex_detail "Associated file" item.associated_file %} {% field_flex "Responsible for planning service" item.associated_file.responsible_town_planning_service.full_address %} {% if item.associated_file.town_planning_service %} {% field_flex "Planning service organization" item.associated_file.town_planning_service.full_address %} {% else %} {% field_flex "Planning service organization" item.associated_file.responsible_town_planning_service.attached_to.full_address %} {% endif %} {% field_flex "Permit type" item.associated_file.permit_type %} {% field_flex "Permit reference" item.associated_file.permit_reference %} {% field_flex "General contractor" item.associated_file.general_contractor.full_address %} {% if item.associated_file.corporation_general_contractor %} {% field_flex "General contractor organization" item.associated_file.corporation_general_contractor.full_address %} {% else%} {% field_flex "General contractor organization" item.associated_file.general_contractor.attached_to.full_address %} {% endif %}
{% field_flex_full "Comment" item.comment "
" "
" %} {% field_flex_full "Abstract" item.abstract "
" "
" %} {% field_flex_full "Comment about scientific documentation" item.scientific_documentation_comment "
" "
" %}
{% include "ishtar/blocks/sheet_json.html" %} {% if item.virtual_operation %} {% endif %} {% if not item.code_patriarche %} {% endif %} {% if item.seizure_name or item.official_report_number or item.name_of_the_protagonist %}

{% trans "Court-ordered seizure"%}

{% field_flex "Seizure name" item.seizure_name %} {% field_flex "Official report number" item.official_report_number %} {% field_flex "Name of the protagonist" item.name_of_the_protagonist %}
{% endif %} {% if not next %} {% if item.towns.count %}

{% trans "Localisation"%}

{% field_flex_full "Towns" item.towns_codes|join:" ; " %} {% field_flex "Main address" item.associated_file.address %} {% field_flex "Complement" item.associated_file.address_complement %} {% field_flex "Postal code" item.associated_file.postal_code %}
{% endif %} {% if item.right_relations.count %}

{% trans "Relations"%}

{% for rel in item.right_relations.all %} {% ifchanged rel.relation_type %}

{{rel.relation_type}}

{% endifchanged %}
{{rel.right_record}}
{% if forloop.last %}
{% endif %} {% endfor %} {% if item.relation_image %}
{% if output != "ODT" %}{% endif %} {% if output != "ODT" %}{% endif %}

{% endif %} {% endif %} {% if item.archaeological_sites.count %} {% trans "Archaeological sites" as archaeologicalsites_label %} {% dynamic_table_document archaeologicalsites_label 'sites' 'operations' item.pk '' output %} {% endif %} {% trans "Associated parcels" as parcels_label %} {% include "ishtar/blocks/window_tables/parcels.html" %} {% if item.administrative_act %}

{% trans "Administrative acts" %}

{% table_administrativact "" item.administrative_act.all %} {% endif %} {% trans "Document from this operation" as operation_docs %} {% if item.documents.count %} {% dynamic_table_document operation_docs 'documents' 'operations' item.pk '' output %} {% endif %} {% if item.context_record.count %} {% trans "Context records" as cr_lab %} {% dynamic_table_document cr_lab 'context_records_for_ope' 'operation' item.pk 'TABLE_COLS_FOR_OPE' output %} {% endif %} {% if item.context_record_relations_q.count %} {% trans "Context record relations" as cr_rels %} {% dynamic_table_document cr_rels 'context_records_relations_detail' 'left_record__operation' item.pk '' output %} {% endif %} {% if item.context_record_docs_q.count %} {% trans "Documents from associated context records" as cr_docs %} {% dynamic_table_document cr_docs 'documents' 'context_records__operation' item.pk '' output %} {% endif %} {% if item.finds %} {% trans "Finds" as finds %} {% dynamic_table_document finds 'finds_for_ope' 'base_finds__context_record__operation' item.pk 'TABLE_COLS_FOR_OPE' output %} {% endif %} {% if item.find_docs_q.count %} {% trans "Documents from associated finds" as finds_docs %} {% dynamic_table_document finds_docs 'documents' 'finds__base_finds__context_record__operation' item.pk '' output %} {% endif %} {% if item.containers_q.count %} {% trans "Associated containers" as containers_lbl %} {% dynamic_table_document containers_lbl 'containers' 'finds__base_finds__context_record__operation' item.pk '' output %} {% endif %}

{% trans "Statistics" %}

{% trans "These numbers are updated hourly" %}

{% trans "Administrative acts" %}

{% field_flex_2 "Number of administrative acts" item.nb_acts %} {% field_flex_2 "Number of indexed administrative acts" item.nb_indexed_acts %}

{% trans "Parcels" %}

{% field_flex_2 "Number of parcels" item.nb_parcels %}

{% trans "Context records" %}

{% field_flex_2 "Number of context records" item.nb_context_records %}
{% if item.nb_context_records_by_type %}
{% for label, nb in item.nb_context_records_by_type %} {% endfor %}
{% trans "Type" %}{% trans "Number" %}
{{label|default:"-"}}{{nb}}
{% endif %} {% if item.nb_context_records_by_periods %}
{% for label, nb in item.nb_context_records_by_periods %} {% endfor %}
{% trans "Period" %}{% trans "Number" %}
{{label|default:"-"}}{{nb}}
{% endif %}

{% trans "Finds" %}

{% field_flex_2 "Number of finds" item.nb_finds %}
{% if item.nb_finds_by_material_type %}
{% for label, nb in item.nb_finds_by_material_type %} {% endfor %}
{% trans "Material type" %}{% trans "Number" %}
{{label|default:"-"}}{{nb}}
{% endif %} {% if item.nb_finds_by_types %}
{% for label, nb in item.nb_finds_by_types %} {% endfor %}
{% trans "Object type" %}{% trans "Number" %}
{{label}}{{nb}}
{% endif %} {% if item.nb_finds_by_periods %}
{% for label, nb in item.nb_finds_by_periods %} {% endfor %}
{% trans "Period" %}{% trans "Number" %}
{{label|default:"-"}}{{nb}}
{% endif %}

{% trans "Sources" %}

{% field_flex "Number of sources" item.nb_documents %}
{% if item.nb_documents_by_types %}
{% for label, nb in item.nb_documents_by_types %} {% endfor %}
{% trans "Type" %}{% trans "Number" %}
{{label}}{{nb}}
{% endif %}
{% if item.nb_stats_finds_by_ue %}

{% trans "Finds by context records" %}

{% field_flex_2 "Mean" item.nb_stats_finds_by_ue.mean %} {% field_flex_2 "Min" item.nb_stats_finds_by_ue.min %} {% field_flex_2 "Max" item.nb_stats_finds_by_ue.max %} {% field_flex_2 "Mode" item.nb_stats_finds_by_ue.mode %}
{% endif %} {% endif %} {% endblock %}