diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-18 15:22:57 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-19 14:45:57 +0100 |
commit | d828cce778cfe6e826bf09745ef207d022c89d53 (patch) | |
tree | 136a37de0c090e10b8ff349694df5d83ff92740f /archaeological_finds | |
parent | 051ad17e717fd935db69b7057e9a3862b276cf23 (diff) | |
download | Ishtar-d828cce778cfe6e826bf09745ef207d022c89d53.tar.bz2 Ishtar-d828cce778cfe6e826bf09745ef207d022c89d53.zip |
🐛 fix museum find templates - refaction sheet find
Diffstat (limited to 'archaeological_finds')
3 files changed, 271 insertions, 519 deletions
diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index d7d2b423f..768bd0ea1 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -274,271 +274,9 @@ {% endif %} {% endif %} </div> - <div class="tab-pane fade" id="{{window_id}}-warehouse" - role="tabpanel" aria-labelledby="{{window_id}}-warehouse-tab"> - {% comment %} - {% if item.collection %} - <div class='row'> - {% field_flex_detail "Collection" item.collection "large" %} - </div> - {% 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 %} - <h3>{% trans "Preservation" %}</h3> - <div class='row'> - {% 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 "<pre>" "</pre>" %} - </div> - {% endif %} - {% if item.container or item.container_ref %} - {% if can_view_container %} - <h3>{% trans "Warehouse - container" %}</h3> - <div class='row'> - {% if item.container_ref != item.container and item.container_ref %} - <dl class="col-12 flex-wrap"> - <dt>{% trans "Reference container" %}</dt> - <dd> - <nav aria-label="breadcrumb"> - <ol class="breadcrumb"> - {% if not is_external %} - {% for loca in item.container_ref.get_localisations %} - <li class="breadcrumb-item"> - {{loca.short_label}} {{loca|simple_link_to_window}} - </li> - {% endfor %} - <li class="breadcrumb-item"> - {{item.container_ref.short_label}} {{item.container_ref|simple_link_to_window}} - </li> - {% else %} - {{item.container_ref}} - {% endif %} - </ol> - </nav> - </dd> - </dl> - {% endif %} - {% if item.container %} - <dl class="col-12 flex-wrap"> - <dt> - {% if item.container_ref != item.container %} - {% trans "Current container" %}{% else %} - {% trans "Reference container / current container" %} - {% endif %} - </dt> - <dd> - <nav aria-label="breadcrumb"> - <ol class="breadcrumb"> - {% if not is_external %} - {% for loca in item.container.get_localisations %} - <li class="breadcrumb-item"> - {{loca.short_label}} {{loca|simple_link_to_window}} - </li> - {% endfor %} - <li class="breadcrumb-item"> - {{item.container.short_label}} {{item.container|simple_link_to_window}} - </li> - {% else %} - {% for loca in item.container.localisation_list %} - <li class="breadcrumb-item"> - {{loca}} - </li> - {% endfor %} - <li class="breadcrumb-item"> - {{item.container.short_label}} - </li> - {% endif %} - </ol> - </nav> - </dd> - </dl> - {% if item.container.index %} - <div class='row'> - <dl class="col-12 flex-wrap"> - <dt>{% trans "Index" %}</dt> - <dd> - {{ item.container.location }} - {{ item.container.index|unlocalize }} - </dd> - </dl> - </div> - {% endif %} - {% endif %} - </div> - {% else %} - <div class="alert alert-info" role="alert"> - <i class="fa fa-info-circle" aria-hidden="true"></i> - {% trans "Container information not available." %} - </div> - {% endif %} - {% endif %} - {% if item.upstream_treatment or item.downstream_treatment or non_modif_treatments_count %} - {% if non_modif_treatments_count %} - <h3>{% trans "Simple treatments"%}</h3> - <table id='{{window_id}}-treatments' class="table table-striped"> - <tr> - <th> </th> - <th>{% trans "Year - index" %}</th> - <th>{% trans "Label/type" %}</th> - <th>{% trans "State" %}</th> - <th>{% trans "Related finds (max. 15 displayed)" %}</th> - <th>{% trans "Doer" %}</th> - {% if can_view_container %}<th>{% trans "Container" %}</th>{% endif %} - <th>{% trans "Date start/end" %}</th> - </tr> - {# {% for treatment in item.treatments.all %} #} - {% for items, treatment in item.non_modif_treatments %} - <tr> - <td> - <a class="display_details" href="#" - onclick="load_window('{% url 'show-treatment' treatment.id %}/');"> - <i class="fa fa-info-circle" aria-hidden="true"></i> - </a> - </td> - <td class='string'>{{ treatment.year|unlocalize }}-{{treatment.index|unlocalize}}</td> - <td class='string'>{% if treatment.label %}{{ treatment.label}} ({{treatment.treatment_types_lbl}}){% else %}{{treatment.treatment_types_lbl}}{% endif %}</td> - <td class='string'>{{ treatment.treatment_state|default_if_none:"-" }}</td> - <td class='item-list'>{% for it in items %}<span>{{it}} {{it|link_to_window:request}}</span>{% endfor %}</td> - <td class='string'>{{ treatment.person|default_if_none:"-" }}</td> - {% if can_view_container %}<td class='string'>{% 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 %} <span class="badge badge-secondary">{{find_treatment.location_type_label}}</span>{% endif %}{% endif %}{% endfor %}</td>{% endif %} - <td class='string'>{{ treatment.start_date|default_if_none:"-" }}{% if treatment.end_date %}/{{ treatment.end_date|default_if_none:"-" }}{% endif %}</td> - </tr> - {% endfor %} - {% if can_view_container and item.container_fisrt_full_location %} - <tr> - <td class="string" colspan="6">{% trans "First packaging" %}</td> - <td class="string" colspan="2">{{ item.container_fisrt_full_location }} <span class="badge badge-secondary">{% if item.container_fisrt_full_location == item.container_ref_fisrt_full_location %}{% trans "Reference/current" %}{% else %}{% trans "Current" %}{% endif %}</span></td> - </tr> - {% endif %} - {% if can_view_container and item.container_ref_fisrt_full_location and item.container_ref_fisrt_full_location != item.container_fisrt_full_location %} - <tr> - <td class="string" colspan="6">{% trans "First packaging" %}</td> - <td class="string" colspan="2">{{ item.container_ref_fisrt_full_location }} <span class="badge badge-secondary">{% trans "Reference" %}</span></td> - </tr> - {% endif %} - </table> - {% endif %} - - {% if item.upstream_treatment %} - <h3>{% trans "Upstream treatment" %}</h3> - <table id='{{window_id}}-upstream' class="table table-striped"> - <tr> - <th> </th> - <th>{% trans "Year - index" %}</th> - <th>{% trans "Label" %}</th> - <th>{% trans "Type" %}</th> - <th>{% trans "State" %}</th> - <th>{% trans "Related finds (max. 15 displayed)" %}</th> - <th>{% trans "Doer" %}</th> - {% if can_view_container %}<th>{% trans "Container" %}</th>{% endif %} - <th>{% trans "Start date" %}</th> - <th>{% trans "End date" %}</th> - </tr> - {% for items, treatment in item.limited_upstream_treatments %} - <tr> - <td> - <a class="display_details" href="#" - onclick="load_window('{% url 'show-treatment' treatment.id %}/');"> - <i class="fa fa-info-circle" aria-hidden="true"></i> - </a> - </td> - <td class='string'>{{ treatment.year }} - {{treatment.index}}</td> - <td class='string'>{{ treatment.label|default_if_none:"-" }}</td> - <td class='string'>{{ treatment.treatment_types_lbl }}</td> - <td class='string'>{{ treatment.treatment_state|default_if_none:"-" }}</td> - <td class='item-list'>{% for it in items %}<span>{{it}} {{it|link_to_window:request}}</span>{% endfor %}</td> - <td class='string'>{{ treatment.person|default_if_none:"-" }}</td> - {% if can_view_container %}<td class='string'>{{ treatment.container|default_if_none:"-" }}</td>{% endif %} - <td class='string'>{{ treatment.start_date|default_if_none:"-" }}</td> - <td class='string'>{{ treatment.end_date|default_if_none:"-" }}</td> - </tr> - {% endfor %} - </table> - <p class='tool'><a class='badge' href="{% url 'get-upstreamtreatment' 'csv' %}?submited=1&find_id={{item.pk|unlocalize}}" target="_blank" title='{% trans "Export as CSV"%}'>{% trans "CSV" %}</a> ({{ENCODING}})</p> - {% endif %} + {% include "ishtar/sheet_find_treatments.html" %} - {% if item.downstream_treatment %} - <h3>{% trans "Downstream treatment" %}</h3> - <table id='{{window_id}}-downstream' class="table table-striped"> - <tr> - <th> </th> - <th>{% trans "Year - index" %}</th> - <th>{% trans "Label" %}</th> - <th>{% trans "Type" %}</th> - <th>{% trans "State" %}</th> - <th>{% trans "Related finds (max. 15 displayed)" %}</th> - <th>{% trans "Doer" %}</th> - {% if can_view_container %}<th>{% trans "Container" %}</th>{% endif %} - <th>{% trans "Start date" %}</th> - <th>{% trans "End date" %}</th> - </tr> - {% for items, treatment in item.limited_downstream_treatments %} - <tr> - <td> - <a class="display_details" href="#" - onclick="load_window('{% url 'show-treatment' treatment.id %}/');"> - <i class="fa fa-info-circle" aria-hidden="true"></i> - </a> - </td> - <td class='string'>{{ treatment.year }} - {{treatment.index}}</td> - <td class='string'>{{ treatment.label|default_if_none:"-" }}</td> - <td class='string'>{{ treatment.treatment_types_lbl }}</td> - <td class='string'>{{ treatment.treatment_state|default_if_none:"-" }}</td> - <td class='item-list'>{% for it in items %}<span>{{it}} {{ it|link_to_window:request}}</span>{% endfor %}</td> - <td class='string'>{{ treatment.person|default_if_none:"" }}</td> - {% if can_view_container %}<td class='string'>{{ treatment.container|default_if_none:"-" }}</td>{% endif %} - <td class='string'>{{ treatment.start_date|default_if_none:"" }}</td> - <td class='string'>{{ treatment.end_date|default_if_none:"" }}</td> - </tr> - {% endfor %} - </table> - - <p class='tool'><a class='badge' href="{% url 'get-downstreamtreatment' 'csv' %}?submited=1&find_id={{item.pk|unlocalize}}" target="_blank">{% trans "CSV" %}</a> ({{ENCODING}})</p> - {% endif %} - {% endif %} - {% if item.associated_treatment_files_count %} - <h3>{% trans "Treatment requests" %}</h3> - <table id='{{window_id}}-treatment-files' class="table table-striped"> - <tr> - <th> </th> - <th>{% trans "Year - index" %}</th> - <th>{% trans "Type" %}</th> - <th>{% trans "Name" %}</th> - <th>{% trans "Person in charge" %}</th> - <th>{% trans "Applicant" %}</th> - <th>{% trans "Applicant organisation" %}</th> - <th>{% trans "Reception date" %}</th> - <th>{% trans "End date" %}</th> - </tr> - {% for treatment_file in item.associated_treatment_files %} - <tr> - <td> - <a class="display_details" href="#" - onclick="load_window('{% url 'show-treatmentfile' treatment_file.id %}/');"> - <i class="fa fa-info-circle" aria-hidden="true"></i> - </a> - </td> - <td class='string'>{{ treatment_file.year }} - {{treatment_file.index}}</td> - <td class='string'>{{ treatment_file.type }}</td> - <td class='string'>{{ treatment_file.name|default_if_none:"-" }}</td> - <td class='string'>{{ treatment_file.in_charge|default_if_none:"" }}</td> - <td class='string'>{{ treatment_file.applicant|default_if_none:"" }}</td> - <td class='string'>{{ treatment_file.applicant_organisation|default_if_none:"" }}</td> - <td class='string'>{{ treatment_file.reception_date|default_if_none:"" }}</td> - <td class='string'>{{ treatment_file.end_date|default_if_none:"" }}</td> - </tr> - {% endfor %} - </table> - {% endif %} - </div> {% if display_documents %} <div class="tab-pane fade" id="{{window_id}}-documents" role="tabpanel" aria-labelledby="{{window_id}}-documents-tab"> diff --git a/archaeological_finds/templates/ishtar/sheet_find_treatments.html b/archaeological_finds/templates/ishtar/sheet_find_treatments.html new file mode 100644 index 000000000..a02a79c73 --- /dev/null +++ b/archaeological_finds/templates/ishtar/sheet_find_treatments.html @@ -0,0 +1,269 @@ +{% load i18n l10n window_field link_to_window humanize %} + <div class="tab-pane fade" id="{{window_id}}-warehouse" + role="tabpanel" aria-labelledby="{{window_id}}-warehouse-tab"> + + {% comment %} + {% if item.collection %} + <div class='row'> + {% field_flex_detail "Collection" item.collection "large" %} + </div> + {% 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 %} + <h3>{% trans "Preservation" %}</h3> + <div class='row'> + {% 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 "<pre>" "</pre>" %} + </div> + {% endif %} + {% if item.container or item.container_ref %} + {% if can_view_container %} + <h3>{% trans "Warehouse - container" %}</h3> + <div class='row'> + {% if item.container_ref != item.container and item.container_ref %} + <dl class="col-12 flex-wrap"> + <dt>{% trans "Reference container" %}</dt> + <dd> + <nav aria-label="breadcrumb"> + <ol class="breadcrumb"> + {% if not is_external %} + {% for loca in item.container_ref.get_localisations %} + <li class="breadcrumb-item"> + {{loca.short_label}} {{loca|simple_link_to_window}} + </li> + {% endfor %} + <li class="breadcrumb-item"> + {{item.container_ref.short_label}} {{item.container_ref|simple_link_to_window}} + </li> + {% else %} + {{item.container_ref}} + {% endif %} + </ol> + </nav> + </dd> + </dl> + {% endif %} + {% if item.container %} + <dl class="col-12 flex-wrap"> + <dt> + {% if item.container_ref != item.container %} + {% trans "Current container" %}{% else %} + {% trans "Reference container / current container" %} + {% endif %} + </dt> + <dd> + <nav aria-label="breadcrumb"> + <ol class="breadcrumb"> + {% if not is_external %} + {% for loca in item.container.get_localisations %} + <li class="breadcrumb-item"> + {{loca.short_label}} {{loca|simple_link_to_window}} + </li> + {% endfor %} + <li class="breadcrumb-item"> + {{item.container.short_label}} {{item.container|simple_link_to_window}} + </li> + {% else %} + {% for loca in item.container.localisation_list %} + <li class="breadcrumb-item"> + {{loca}} + </li> + {% endfor %} + <li class="breadcrumb-item"> + {{item.container.short_label}} + </li> + {% endif %} + </ol> + </nav> + </dd> + </dl> + {% if item.container.index %} + <div class='row'> + <dl class="col-12 flex-wrap"> + <dt>{% trans "Index" %}</dt> + <dd> + {{ item.container.location }} - {{ item.container.index|unlocalize }} + </dd> + </dl> + </div> + {% endif %} + {% endif %} + </div> + {% else %} + <div class="alert alert-info" role="alert"> + <i class="fa fa-info-circle" aria-hidden="true"></i> + {% trans "Container information not available." %} + </div> + {% endif %} + + {% endif %} + {% if item.upstream_treatment or item.downstream_treatment or non_modif_treatments_count %} + + {% if item.upstream_treatment %} + <h3>{% trans "Upstream treatment" %}</h3> + <table id='{{window_id}}-upstream' class="table table-striped"> + <tr> + <th> </th> + <th>{% trans "Year - index" %}</th> + <th>{% trans "Label" %}</th> + <th>{% trans "Type" %}</th> + <th>{% trans "State" %}</th> + <th>{% trans "Related finds (max. 15 displayed)" %}</th> + <th>{% trans "Doer" %}</th> + {% if can_view_container %}<th>{% trans "Container" %}</th>{% endif %} + <th>{% trans "Start date" %}</th> + <th>{% trans "End date" %}</th> + </tr> + {% for items, treatment in item.limited_upstream_treatments %} + <tr> + <td> + <a class="display_details" href="#" + onclick="load_window('{% url 'show-treatment' treatment.id %}/');"> + <i class="fa fa-info-circle" aria-hidden="true"></i> + </a> + </td> + <td class='string'>{{ treatment.year }} - {{treatment.index}}</td> + <td class='string'>{{ treatment.label|default_if_none:"-" }}</td> + <td class='string'>{{ treatment.treatment_types_lbl }}</td> + <td class='string'>{{ treatment.treatment_state|default_if_none:"-" }}</td> + <td class='item-list'>{% for it in items %}<span>{{it}} {{it|link_to_window:request}}</span>{% endfor %}</td> + <td class='string'>{{ treatment.person|default_if_none:"-" }}</td> + {% if can_view_container %}<td class='string'>{{ treatment.container|default_if_none:"-" }}</td>{% endif %} + <td class='string'>{{ treatment.start_date|default_if_none:"-" }}</td> + <td class='string'>{{ treatment.end_date|default_if_none:"-" }}</td> + </tr> + {% endfor %} + </table> + <p class='tool'><a class='badge' href="{% url 'get-upstreamtreatment' 'csv' %}?submited=1&find_id={{item.pk|unlocalize}}" target="_blank" title='{% trans "Export as CSV"%}'>{% trans "CSV" %}</a> ({{ENCODING}})</p> + {% endif %} + + {% if item.downstream_treatment %} + <h3>{% trans "Downstream treatment" %}</h3> + <table id='{{window_id}}-downstream' class="table table-striped"> + <tr> + <th> </th> + <th>{% trans "Year - index" %}</th> + <th>{% trans "Label" %}</th> + <th>{% trans "Type" %}</th> + <th>{% trans "State" %}</th> + <th>{% trans "Related finds (max. 15 displayed)" %}</th> + <th>{% trans "Doer" %}</th> + {% if can_view_container %}<th>{% trans "Container" %}</th>{% endif %} + <th>{% trans "Start date" %}</th> + <th>{% trans "End date" %}</th> + </tr> + {% for items, treatment in item.limited_downstream_treatments %} + <tr> + <td> + <a class="display_details" href="#" + onclick="load_window('{% url 'show-treatment' treatment.id %}/');"> + <i class="fa fa-info-circle" aria-hidden="true"></i> + </a> + </td> + <td class='string'>{{ treatment.year }} - {{treatment.index}}</td> + <td class='string'>{{ treatment.label|default_if_none:"-" }}</td> + <td class='string'>{{ treatment.treatment_types_lbl }}</td> + <td class='string'>{{ treatment.treatment_state|default_if_none:"-" }}</td> + <td class='item-list'>{% for it in items %}<span>{{it}} {{ it|link_to_window:request}}</span>{% endfor %}</td> + <td class='string'>{{ treatment.person|default_if_none:"" }}</td> + {% if can_view_container %}<td class='string'>{{ treatment.container|default_if_none:"-" }}</td>{% endif %} + <td class='string'>{{ treatment.start_date|default_if_none:"" }}</td> + <td class='string'>{{ treatment.end_date|default_if_none:"" }}</td> + </tr> + {% endfor %} + </table> + + <p class='tool'><a class='badge' href="{% url 'get-downstreamtreatment' 'csv' %}?submited=1&find_id={{item.pk|unlocalize}}" target="_blank">{% trans "CSV" %}</a> ({{ENCODING}})</p> + {% endif %} + {% endif %} + + {% if non_modif_treatments_count %} + <h3>{% trans "Simple treatments"%}</h3> + <table id='{{window_id}}-treatments' class="table table-striped"> + <tr> + <th> </th> + <th>{% trans "Year - index" %}</th> + <th>{% trans "Label/type" %}</th> + <th>{% trans "State" %}</th> + <th>{% trans "Related finds (max. 15 displayed)" %}</th> + <th>{% trans "Organization/responsible" %}</th> + {% if can_view_container %}<th>{% trans "Container" %}</th>{% endif %} + <th>{% trans "Date start/end" %}</th> + </tr> + {# {% for treatment in item.treatments.all %} #} + {% for items, treatment in item.non_modif_treatments %} + <tr> + <td> + <a class="display_details" href="#" + onclick="load_window('{% url 'show-treatment' treatment.id %}/');"> + <i class="fa fa-info-circle" aria-hidden="true"></i> + </a> + </td> + <td class='string'>{{ treatment.year|unlocalize }}-{{treatment.index|unlocalize}}</td> + <td class='string'>{% if treatment.label %}{{ treatment.label}} ({{treatment.treatment_types_lbl}}){% else %}{{treatment.treatment_types_lbl}}{% endif %}</td> + <td class='string'>{{ treatment.treatment_state|default_if_none:"-" }}</td> + <td class='item-list'>{% for it in items %}<span>{{it}} {{it|link_to_window:request}}</span>{% endfor %}</td> + <td class='string'>{{ treatment.organization|default_if_none:"-" }}/{{ treatment.person|default_if_none:"-" }}</td> + {% if can_view_container %}<td class='string'>{% 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 %} <span class="badge badge-secondary">{{find_treatment.location_type_label}}</span>{% endif %}{% endif %}{% endfor %}</td>{% endif %} + <td class='string'>{{ treatment.start_date|default_if_none:"-" }}{% if treatment.end_date %}/{{ treatment.end_date|default_if_none:"-" }}{% endif %}</td> + </tr> + {% endfor %} + {% if can_view_container and item.container_fisrt_full_location %} + <tr> + <td class="string" colspan="6">{% trans "First packaging" %}</td> + <td class="string" colspan="2">{{ item.container_fisrt_full_location }} <span class="badge badge-secondary">{% if item.container_fisrt_full_location == item.container_ref_fisrt_full_location %}{% trans "Reference/current" %}{% else %}{% trans "Current" %}{% endif %}</span></td> + </tr> + {% endif %} + {% if can_view_container and item.container_ref_fisrt_full_location and item.container_ref_fisrt_full_location != item.container_fisrt_full_location %} + <tr> + <td class="string" colspan="6">{% trans "First packaging" %}</td> + <td class="string" colspan="2">{{ item.container_ref_fisrt_full_location }} <span class="badge badge-secondary">{% trans "Reference" %}</span></td> + </tr> + {% endif %} + </table> + {% endif %} + + {% if item.associated_treatment_files_count %} + <h3>{% trans "Treatment requests" %}</h3> + <table id='{{window_id}}-treatment-files' class="table table-striped"> + <tr> + <th> </th> + <th>{% trans "Year - index" %}</th> + <th>{% trans "Type" %}</th> + <th>{% trans "Name" %}</th> + <th>{% trans "Person in charge" %}</th> + <th>{% trans "Applicant" %}</th> + <th>{% trans "Applicant organisation" %}</th> + <th>{% trans "Reception date" %}</th> + <th>{% trans "End date" %}</th> + </tr> + {% for treatment_file in item.associated_treatment_files %} + <tr> + <td> + <a class="display_details" href="#" + onclick="load_window('{% url 'show-treatmentfile' treatment_file.id %}/');"> + <i class="fa fa-info-circle" aria-hidden="true"></i> + </a> + </td> + <td class='string'>{{ treatment_file.year }} - {{treatment_file.index}}</td> + <td class='string'>{{ treatment_file.type }}</td> + <td class='string'>{{ treatment_file.name|default_if_none:"-" }}</td> + <td class='string'>{{ treatment_file.in_charge|default_if_none:"" }}</td> + <td class='string'>{{ treatment_file.applicant|default_if_none:"" }}</td> + <td class='string'>{{ treatment_file.applicant_organisation|default_if_none:"" }}</td> + <td class='string'>{{ treatment_file.reception_date|default_if_none:"" }}</td> + <td class='string'>{{ treatment_file.end_date|default_if_none:"" }}</td> + </tr> + {% endfor %} + </table> + {% endif %} + </div> diff --git a/archaeological_finds/templates/ishtar/sheet_museum_find.html b/archaeological_finds/templates/ishtar/sheet_museum_find.html index 3c00a5d38..2f313f0a1 100644 --- a/archaeological_finds/templates/ishtar/sheet_museum_find.html +++ b/archaeological_finds/templates/ishtar/sheet_museum_find.html @@ -299,263 +299,8 @@ </div> </div> - <div class="tab-pane fade" id="{{window_id}}-warehouse" - role="tabpanel" aria-labelledby="{{window_id}}-warehouse-tab"> - {% comment %} - {% if item.collection %} - <div class='row'> - {% field_flex_detail "Collection" item.collection "large" %} - </div> - {% 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 %} - <h3>{% trans "Preservation" %}</h3> - <div class='row'> - {% 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 "<pre>" "</pre>" %} - </div> - {% endif %} - {% if item.container or item.container_ref %} - {% if can_view_container %} - <h3>{% trans "Warehouse - container" %}</h3> - <div class='row'> - {% if item.container_ref != item.container and item.container_ref %} - <dl class="col-12 flex-wrap"> - <dt>{% trans "Reference container" %}</dt> - <dd> - <nav aria-label="breadcrumb"> - <ol class="breadcrumb"> - {% if not is_external %} - {% for loca in item.container_ref.get_localisations %} - <li class="breadcrumb-item"> - {{loca.short_label}} {{loca|simple_link_to_window}} - </li> - {% endfor %} - <li class="breadcrumb-item"> - {{item.container_ref.short_label}} {{item.container_ref|simple_link_to_window}} - </li> - {% else %} - {{item.container_ref}} - {% endif %} - </ol> - </nav> - </dd> - </dl> - {% endif %} - {% if item.container %} - <dl class="col-12 flex-wrap"> - <dt> - {% if item.container_ref != item.container %} - {% trans "Current container" %}{% else %} - {% trans "Reference container / current container" %} - {% endif %} - </dt> - <dd> - <nav aria-label="breadcrumb"> - <ol class="breadcrumb"> - {% if not is_external %} - {% for loca in item.container.get_localisations %} - <li class="breadcrumb-item"> - {{loca.short_label}} {{loca|simple_link_to_window}} - </li> - {% endfor %} - <li class="breadcrumb-item"> - {{item.container.short_label}} {{item.container|simple_link_to_window}} - </li> - {% else %} - {% for loca in item.container.localisation_list %} - <li class="breadcrumb-item"> - {{loca}} - </li> - {% endfor %} - <li class="breadcrumb-item"> - {{item.container.short_label}} - </li> - {% endif %} - </ol> - </nav> - </dd> - </dl> - {% if item.container.index %} - <div class='row'> - <dl class="col-12 flex-wrap"> - <dt>{% trans "Index" %}</dt> - <dd> - {{ item.container.location }} - {{ item.container.index }} - </dd> - </dl> - </div> - {% endif %} - {% endif %} - </div> - {% else %} - <div class="alert alert-info" role="alert"> - <i class="fa fa-info-circle" aria-hidden="true"></i> - {% trans "Container information not available." %} - </div> - {% endif %} - - {% endif %} - {% if item.upstream_treatment or item.downstream_treatment or non_modif_treatments_count %} - {% if non_modif_treatments_count %} - <h3>{% trans "Simple treatments"%}</h3> - <table id='{{window_id}}-treatments' class="table table-striped"> - <tr> - <th> </th> - <th>{% trans "Year - index" %}</th> - <th>{% trans "Label" %}</th> - <th>{% trans "Type" %}</th> - <th>{% trans "State" %}</th> - <th>{% trans "Related finds (max. 15 displayed)" %}</th> - <th>{% trans "Doer" %}</th> - <th>{% trans "Container" %}</th> - <th>{% trans "Start date" %}</th> - <th>{% trans "End date" %}</th> - </tr> - {# {% for treatment in item.treatments.all %} #} - {% for items, treatment in item.non_modif_treatments %} - <tr> - <td> - <a class="display_details" href="#" - onclick="load_window('{% url 'show-treatment' treatment.id %}/');"> - <i class="fa fa-info-circle" aria-hidden="true"></i> - </a> - </td> - <td class='string'>{{ treatment.year }} - {{treatment.index}}</td> - <td class='string'>{{ treatment.label|default_if_none:"-" }}</td> - <td class='string'>{{ treatment.treatment_types_lbl }}</td> - <td class='string'>{{ treatment.treatment_state|default_if_none:"-" }}</td> - <td class='item-list'>{% for it in items %}<span>{{it}} {{it|link_to_window:request}}</span>{% endfor %}</td> - <td class='string'>{{ treatment.person|default_if_none:"-" }}</td> - <td class='string'>{{ treatment.container|default_if_none:"-" }}</td> - <td class='string'>{{ treatment.start_date|default_if_none:"-" }}</td> - <td class='string'>{{ treatment.end_date|default_if_none:"-" }}</td> - </tr> - {% endfor %} - </table> - {% endif %} - - {% if item.upstream_treatment %} - <h3>{% trans "Upstream treatment" %}</h3> - <table id='{{window_id}}-upstream' class="table table-striped"> - <tr> - <th> </th> - <th>{% trans "Year - index" %}</th> - <th>{% trans "Label" %}</th> - <th>{% trans "Type" %}</th> - <th>{% trans "State" %}</th> - <th>{% trans "Related finds (max. 15 displayed)" %}</th> - <th>{% trans "Doer" %}</th> - <th>{% trans "Container" %}</th> - <th>{% trans "Start date" %}</th> - <th>{% trans "End date" %}</th> - </tr> - {% for items, treatment in item.limited_upstream_treatments %} - <tr> - <td> - <a class="display_details" href="#" - onclick="load_window('{% url 'show-treatment' treatment.id %}/');"> - <i class="fa fa-info-circle" aria-hidden="true"></i> - </a> - </td> - <td class='string'>{{ treatment.year }} - {{treatment.index}}</td> - <td class='string'>{{ treatment.label|default_if_none:"-" }}</td> - <td class='string'>{{ treatment.treatment_types_lbl }}</td> - <td class='string'>{{ treatment.treatment_state|default_if_none:"-" }}</td> - <td class='item-list'>{% for it in items %}<span>{{it}} {{it|link_to_window:request}}</span>{% endfor %}</td> - <td class='string'>{{ treatment.person|default_if_none:"-" }}</td> - <td class='string'>{{ treatment.container|default_if_none:"-" }}</td> - <td class='string'>{{ treatment.start_date|default_if_none:"-" }}</td> - <td class='string'>{{ treatment.end_date|default_if_none:"-" }}</td> - </tr> - {% endfor %} - </table> - <p class='tool'><a class='badge' href="{% url 'get-upstreamtreatment' 'csv' %}?submited=1&find_id={{item.pk|unlocalize}}" target="_blank" title='{% trans "Export as CSV"%}'>{% trans "CSV" %}</a> ({{ENCODING}})</p> - {% endif %} - - {% if item.downstream_treatment %} - <h3>{% trans "Downstream treatment" %}</h3> - <table id='{{window_id}}-downstream' class="table table-striped"> - <tr> - <th> </th> - <th>{% trans "Year - index" %}</th> - <th>{% trans "Label" %}</th> - <th>{% trans "Type" %}</th> - <th>{% trans "State" %}</th> - <th>{% trans "Related finds (max. 15 displayed)" %}</th> - <th>{% trans "Doer" %}</th> - <th>{% trans "Container" %}</th> - <th>{% trans "Start date" %}</th> - <th>{% trans "End date" %}</th> - </tr> - {% for items, treatment in item.limited_downstream_treatments %} - <tr> - <td> - <a class="display_details" href="#" - onclick="load_window('{% url 'show-treatment' treatment.id %}/');"> - <i class="fa fa-info-circle" aria-hidden="true"></i> - </a> - </td> - <td class='string'>{{ treatment.year }} - {{treatment.index}}</td> - <td class='string'>{{ treatment.label|default_if_none:"-" }}</td> - <td class='string'>{{ treatment.treatment_types_lbl }}</td> - <td class='string'>{{ treatment.treatment_state|default_if_none:"-" }}</td> - <td class='item-list'>{% for it in items %}<span>{{it}} {{ it|link_to_window:request}}</span>{% endfor %}</td> - <td class='string'>{{ treatment.person|default_if_none:"" }}</td> - <td class='string'>{{ treatment.container|default_if_none:"-" }}</td> - <td class='string'>{{ treatment.start_date|default_if_none:"" }}</td> - <td class='string'>{{ treatment.end_date|default_if_none:"" }}</td> - </tr> - {% endfor %} - </table> + {% include "ishtar/sheet_find_treatments.html" %} - <p class='tool'><a class='badge' href="{% url 'get-downstreamtreatment' 'csv' %}?submited=1&find_id={{item.pk|unlocalize}}" target="_blank">{% trans "CSV" %}</a> ({{ENCODING}})</p> - {% endif %} - {% endif %} - {% if item.associated_treatment_files_count %} - <h3>{% trans "Treatment requests" %}</h3> - <table id='{{window_id}}-treatment-files' class="table table-striped"> - <tr> - <th> </th> - <th>{% trans "Year - index" %}</th> - <th>{% trans "Type" %}</th> - <th>{% trans "Name" %}</th> - <th>{% trans "Person in charge" %}</th> - <th>{% trans "Applicant" %}</th> - <th>{% trans "Applicant organisation" %}</th> - <th>{% trans "Reception date" %}</th> - <th>{% trans "End date" %}</th> - </tr> - {% for treatment_file in item.associated_treatment_files %} - <tr> - <td> - <a class="display_details" href="#" - onclick="load_window('{% url 'show-treatmentfile' treatment_file.id %}/');"> - <i class="fa fa-info-circle" aria-hidden="true"></i> - </a> - </td> - <td class='string'>{{ treatment_file.year }} - {{treatment_file.index}}</td> - <td class='string'>{{ treatment_file.type }}</td> - <td class='string'>{{ treatment_file.name|default_if_none:"-" }}</td> - <td class='string'>{{ treatment_file.in_charge|default_if_none:"" }}</td> - <td class='string'>{{ treatment_file.applicant|default_if_none:"" }}</td> - <td class='string'>{{ treatment_file.applicant_organisation|default_if_none:"" }}</td> - <td class='string'>{{ treatment_file.reception_date|default_if_none:"" }}</td> - <td class='string'>{{ treatment_file.end_date|default_if_none:"" }}</td> - </tr> - {% endfor %} - </table> - {% endif %} - </div> {% if display_documents %} <div class="tab-pane fade" id="{{window_id}}-documents" role="tabpanel" aria-labelledby="{{window_id}}-documents-tab"> |