summaryrefslogtreecommitdiff
path: root/archaeological_context_records/templates
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_context_records/templates')
-rw-r--r--archaeological_context_records/templates/ishtar/sheet_contextrecord.html81
1 files changed, 49 insertions, 32 deletions
diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
index 7fc1a03e7..6776c17b8 100644
--- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
+++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
@@ -1,7 +1,7 @@
{% extends "ishtar/sheet.html" %}
{% load i18n ishtar_helpers window_field window_header window_tables window_field %}
-{% block head_title %}<strong>{% trans "Context Record" %}</strong> - {{item.full_label}}{% endblock %}
+{% block head_title %}<strong>{% trans "Context Record" %}</strong> - {{item.cached_label}}{% endblock %}
{% block toolbar %}
{% window_nav item window_id 'show-contextrecord' 'record_modify' 'show-historized-contextrecord' 'revert-contextrecord' previous next 1 %}
@@ -16,16 +16,17 @@
{% with permission_view_own_find=permission_view_own_find %}
{% with permission_change_own_geovectordata=permission_change_own_geovectordata %}
{% with permission_change_geovectordata=permission_change_geovectordata %}
-
{% with permission_change_geo=permission_change_own_geovectordata|or_:permission_change_geovectordata %}
+{% with dating_list=item|m2m_listing:"datings" %}
{% with can_view_documents=permission_view_own_document|or_:permission_view_document %}
{% with has_documents=item|safe_or:"documents.count" %}
{% with display_documents=can_view_documents|and_:has_documents %}
{% with display_relations=item|safe_or:"right_relations.count|left_relations.count" %}
{% with has_image=item|safe_or:"images.count" %}
-{% with display_interpretation=item.activity|or_:item.identification|or_:item.interpretation|or_:item.filling %}
-{% with display_datations=item.taq|or_:item.taq_estimated|or_:item.tpq|or_:item.tpq_estimated %}
+{% with has_cultural_attributions=item|safe_or:"cultural_attributions.count" %}
+{% with display_interpretation=item|safe_or:"identifications.count"|or_:item.interpretation|or_:item.activity %}
+{% with display_datations=dating_list|or_:item.taq|or_:item.taq_estimated|or_:item.tpq|or_:item.tpq_estimated|or_:has_cultural_attributions %}
{% with can_view_finds=permission_view_own_find|or_:permission_view_find %}
{% with has_finds=item|safe_or:"base_finds.count" %}
{% with display_finds=has_finds|and_:can_view_finds %}
@@ -121,30 +122,39 @@
<div class="card float-left col-12 col-md-6 col-lg-4">
{% include "ishtar/blocks/window_image.html" %}
<div class="card-body">
- {% if item.complete_identifier %}<p class="window-refs"
- title="{% trans 'Complete identifier' %}">
- <strong>{{ item.complete_identifier }}</strong></p>{% endif %}
- <p class='window-refs' title="{% trans 'Parcel' %}">{{ item.parcel.short_label }}</p>
- <p class="window-refs">{{ item.label|default:"" }}</p>
+ <p class="window-refs"
+ title="{% trans 'Identifier' %}">
+ <strong>{{ item.cached_label }}</strong></p>
+ <p class='window-refs' title="{% trans 'Parcel' %}">{{ item.parcel.town }} | {{ item.parcel.short_label }}</p>
+ {% if item.label != item.external_id %}
+ <p class="window-refs">{{ item.label|default:"" }}</p>{% endif %}
{% include "ishtar/blocks/sheet_external_id.html" %}
</div>
</div>
<div class='row'>
- {% field_flex_2 "Complete ID" item.full_label %}
+ {% if item.cached_label != item.complete_identifier %}{% field_flex_2 "Complete ID" item.complete_identifier %}{% endif %}
{% field_flex_2 "Type" item.unit %}
+ {% field_flex_detail _("Excavator") item.excavator %}
+ {% field_flex_full "General comment" item.comment "<pre>" "</pre>" has_image %}
</div>
</div>
<hr class="clearfix">
- <h3>{% trans "Description"%}</h3>
+ <h3>{% trans "Description" %}</h3>
+ <div class="row">
+ {% field_flex_multiple_obj "Excavation techniques" item 'excavation_technics' %}
+ {% field_flex_multiple_obj "Documentation" item 'documentations' %}
+ {% field_flex "Opening date" item.opening_date|date:"DATE_FORMAT" %}
+ {% field_flex "Closing date" item.closing_date|date:"DATE_FORMAT" %}
+ {% field_flex_multiple_obj _("Structure") item 'structures' %}
+ {% field_flex_multiple_obj _("Texture") item 'textures' %}
+ {% field_flex_multiple_obj _("Inclusion") item 'inclusions' %}
+ {% field_flex_multiple_obj _("Colors") item 'colors' %}
+ {% field_flex _("Details on color") item.details_on_color %}
+ {% field_flex_full "Filling" item.filling "<pre>" "</pre>" %}
+ {% field_flex_full "Description" item.description "<pre>" "</pre>" %}
+ </div>
+ <h3>{% trans "Dimensions" %}</h3>
<div class="row">
- {% field_flex_multiple_obj "Excavation techniques" item 'excavation_technics' has_image %}
- {% field_flex_multiple_obj "Periods" item 'datings' has_image %}
- {% field_flex_multiple_obj "Documentation" item 'documentations' has_image %}
- {% field_flex "Opening date" item.opening_date '' '' has_image %}
- {% field_flex "Closing date" item.closing_date '' '' has_image %}
- {% field_flex_full "Comment on datings" item.datings_comment "<pre>" "</pre>" has_image %}
- {% field_flex_full "Description" item.description "<pre>" "</pre>" has_image %}
- {% field_flex_full "Comment" item.comment "<pre>" "</pre>" has_image %}
{% if item.surface %}
<dl class="col-12 col-md-6 col-lg-3 flex-wrap">
<dt>{%trans "Surface"%}</dt>
@@ -153,15 +163,17 @@
</dd>
</dl>
{% endif %}
- {% field_flex "Length (m)" item.length '' '' has_image %}
- {% field_flex "Width (m)" item.width '' '' has_image %}
- {% field_flex "Diameter (m)" item.diameter '' '' has_image %}
- {% field_flex "Depth (m)" item.depth '' '' has_image %}
- {% field_flex "Thickness (m)" item.thickness '' '' has_image %}
- {% field_flex "Depth of appearance (m)" item.depth_of_appearance '' '' has_image %}
+ {% field_flex "Length (m)" item.length %}
+ {% field_flex _("Excavated length (m)") item.excavated_length %}
+ {% field_flex "Width (m)" item.width %}
+ {% field_flex _("Excavated width (m)") item.excavated_width %}
+ {% field_flex "Diameter (m)" item.diameter %}
+ {% field_flex "Depth (m)" item.depth %}
+ {% field_flex "Thickness (m)" item.thickness %}
+ {% field_flex "Depth of appearance (m)" item.depth_of_appearance %}
</div>
- {% if item.main_geodata %}
+ {% if item.main_geodata or item.town or item.location %}
<h3>{% trans "Geographic localisation" %}</h3>
<div class='row'>
{% with geo_item=item %}
@@ -169,7 +181,8 @@
{% endwith %}
</div>
<div class='row'>
- {% field_flex_detail "Town" item.town has_image %}
+ {% field_flex_detail_full "Town" item.town has_image %}
+ {% field_flex_full "Location" item.location "<pre>" "</pre>" %}
</div>
{% endif %}
@@ -183,10 +196,8 @@
role="tabpanel" aria-labelledby="{{window_id}}-interpretation-tab">
<h3>{% trans "Interpretation"%}</h3>
<div class='row'>
- {% field_flex_multiple "Documentation" item.documentations %}
{% field_flex "Activity" item.activity %}
- {% field_flex "Identification" item.identification %}
- {% field_flex_full "Filling" item.filling "<pre>" "</pre>" %}
+ {% field_flex_multiple_obj "Identification" item 'identifications' %}
{% field_flex_full "Interpretation" item.interpretation "<pre>" "</pre>" %}
</div>
</div>
@@ -195,12 +206,18 @@
{% if display_datations %}
<div class="tab-pane fade" id="{{window_id}}-datations"
role="tabpanel" aria-labelledby="{{window_id}}-datations-tab">
- <h3>{% trans "Datations"%}</h3>
+ {% if dating_list %}
+ <h3>{% trans "Datations" %}</h3>
+ {% endif %}
+ {% include "ishtar/blocks/sheet_dating_list.html" %}
+ <h3>{% trans "Dating complements" %}</h3>
<div class='row'>
+ {% field_flex_multiple_obj "Cultural attributions" item 'cultural_attributions' %}
{% field_flex "TAQ" item.taq %}
{% field_flex "Estimated TAQ" item.taq_estimated %}
{% field_flex "TPQ" item.tpq %}
{% field_flex "Estimated TPQ" item.tpq_estimated %}
+ {% field_flex_full "Comment on datings" item.datings_comment "<pre>" "</pre>" has_image %}
</div>
</div>
{% endif %}
@@ -345,6 +362,6 @@
{% endif %}
</div>
-{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %}
+{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %}
{% endblock %}