diff options
Diffstat (limited to 'archaeological_finds/templates')
-rw-r--r-- | archaeological_finds/templates/ishtar/sheet_basefind.html | 6 | ||||
-rw-r--r-- | archaeological_finds/templates/ishtar/sheet_find.html | 47 |
2 files changed, 41 insertions, 12 deletions
diff --git a/archaeological_finds/templates/ishtar/sheet_basefind.html b/archaeological_finds/templates/ishtar/sheet_basefind.html index c57e0d681..0b56727ca 100644 --- a/archaeological_finds/templates/ishtar/sheet_basefind.html +++ b/archaeological_finds/templates/ishtar/sheet_basefind.html @@ -16,8 +16,8 @@ <div class='row'> {% field_flex_detail "Operation" base_find.context_record.operation first %} {% field_flex_detail "Archaeological site" base_find.context_record.archaeological_site first %} - {% field_flex_detail "Context record" base_find.context_record first %} - {% field_flex "Town" base_find.context_record.town.label_with_areas '' '' first %} + {% field_flex_detail "Context record" base_find.context_record.short_label first %} + {% field_flex "Town" base_find.context_record.town_label_with_areas '' '' first %} {% field_flex "Parcel" base_find.context_record.parcel '' '' first %} {# START discovery dates #} @@ -48,6 +48,7 @@ {% with item=base_find %} {% include "ishtar/blocks/sheet_json.html" %} {% endwith %} + {% if not is_external %} <h3>{% trans "Sheet"%}</h3> <div class='row'> {% with item.history_creation_date|date:"SHORT_DATETIME_FORMAT" as creation_date %} @@ -62,6 +63,7 @@ {% endwith %}{% endwith %} {% endif %} </div> + {% endif %} {% if base_find.point_2d or base_find.x or base_find.y or base_find.topographic_localisation %} {% if base_find.point_2d %} diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index dd9c2e059..5b6c38112 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -11,7 +11,7 @@ {% if item.downstream_treatment %} <div class="alert alert-warning" role="alert"> - {% trans "This sheet has a downstream treatment: it is related to an old version of the find." %}</p> + {% trans "This sheet has a downstream treatment: it is related to an old version of the find." %} </div> {% endif %} @@ -19,14 +19,13 @@ {% with permission_view_document=permission_view_document %} {% 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 associated_treatment_files_count=item.associated_treatment_files_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|or_:item.cultural_attributions.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_:item.m2m_listing_datings|or_:item.dating_comment|or_:item.cultural_attributions.count %} {% with display_warehouse_treatments=item.container|or_:item.container_ref|or_:item.upstream_treatment|or_:item.downstream_treatment|or_:non_modif_treatments_count|or_:associated_treatment_files_count %} {% with can_view_documents=permission_view_own_document|or_:permission_view_document %} -{% with display_documents=can_view_documents|and_:item.documents.count %} +{% with display_documents=can_view_documents|and_:item.documents_count %} {% if output != "ODT" and output != "PDF"%} <ul class="nav nav-tabs" id="{{window_id}}-tabs" role="tablist"> @@ -87,7 +86,7 @@ <div class="tab-pane fade show active" id="{{window_id}}-basefind" role="tabpanel" aria-labelledby="{{window_id}}-basefind-tab"> - {% with has_image=item.images.count %} + {% with has_image=item.images_number %} {% if has_image %} <div class="clearfix"> <div class="card float-left col-12 col-md-6 col-lg-4"> @@ -120,11 +119,19 @@ </ul> <div class="tab-content"> + {% if is_external %} + {% for base_find in item.base_finds_list %} + {% with first=forloop.first|add:has_image %} + {% include "ishtar/sheet_basefind.html" %} + {% endwith %} + {% endfor %} + {% else %} {% for base_find in item.base_finds.all %} {% with first=forloop.first|add:has_image %} {% include "ishtar/sheet_basefind.html" %} {% endwith %} {% endfor %} + {% endif %} </div> {% if has_image %} </div> @@ -206,7 +213,7 @@ {% if display_datings %} <div class="tab-pane fade" id="{{window_id}}-preservation" role="tabpanel" aria-labelledby="{{window_id}}-preservation-tab"> - {% if 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 %} + {% if 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 %} <h3>{% trans "Preservation" %}</h3> <div class='row'> {% field_flex_multiple_obj "Integrity / interest" item 'integrities' %} @@ -223,9 +230,9 @@ </div> {% endif %} - {% if m2m_listing_datings or item.dating_comment or item.cultural_attributions.count %} + {% if item.m2m_listing_datings or item.dating_comment or item.cultural_attributions_count %} <h3>{% trans "Dating" %}</h3> - {% if item.cultural_attributions.count %} + {% if item.cultural_attributions_count %} <div class='row'> {% field_flex_multiple_obj "Cultural attributions" item 'cultural_attributions' %} </div> @@ -239,7 +246,7 @@ <th>{% trans "Quality" %}</th> <th>{% trans "Precise dating" %}</th> </tr> - {% for dating in m2m_listing_datings %} + {% for dating in item.m2m_listing_datings %} <tr> <td> {{dating.period}} @@ -285,6 +292,7 @@ <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}} @@ -293,6 +301,9 @@ <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> @@ -309,6 +320,7 @@ <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}} @@ -317,6 +329,16 @@ <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> @@ -490,7 +512,12 @@ <div class="tab-pane fade" id="{{window_id}}-documents" role="tabpanel" aria-labelledby="{{window_id}}-documents-tab"> {% trans "Associated documents" as finds_docs %} + {% if item.documents.count %} {% dynamic_table_document finds_docs 'documents' 'finds' item.pk '' output %} + {% elif item.documents_list %} + <h3>{{finds_docs}}</h3> + {% include "ishtar/blocks/api_document_list.html" %} + {% endif %} </div> {% endif %} {% if item.data and item.data|length > 0 %} @@ -501,7 +528,7 @@ {% endif %} </div> -{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} +{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} {% endblock %} |