diff options
Diffstat (limited to 'archaeological_context_records/templates')
-rw-r--r-- | archaeological_context_records/templates/ishtar/sheet_contextrecord.html | 157 |
1 files changed, 91 insertions, 66 deletions
diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index 93a9b67d2..4fa98c6a9 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 window_field window_header window_tables window_field %} -{% block head_title %}{% trans "Context Record:" %}{{item.full_label}}{% endblock %} +{% block head_title %}<strong>{% trans "Context Record" %}</strong> - {{item.full_label}}{% endblock %} {% block toolbar %} {% window_nav item window_id 'show-contextrecord' 'record_modify' 'show-historized-contextrecord' 'revert-contextrecord' previous next 1 %} @@ -9,65 +9,73 @@ {% block content %} -{% if item.image %} -<a href='{{item.image.url}}' rel="prettyPhoto" title="{{item.label}}" class='photo'><img src='{{item.thumbnail.url}}'/></a> -{% endif%} - -<p class='window-refs'>{{ item.parcel.short_label }}</p> -<p class="window-refs">{{ item.label|default:"" }}</p> -{% include "ishtar/blocks/sheet_external_id.html" %} - -<ul class='form-flex'> -<li><label>{% if item.operation.code_patriarche %}{%trans "Complete ID"%}{% else %}{%trans "Temporary ID"%}{% endif %}</label><span class='value'>{{item.full_label}}</span></li> - +<div class="row"> + <div class="offset-lg-4 col-lg-4 offset-md-3 col-md-6 offset-sm-1 col-sm-10 col-12"> + <div class="card"> + {% if item.image %} + <img class='card-img-top' src="{{item.thumbnail.url}}"> + {% endif%} + <div class="card-body"> + <p class="card-text"> + <p class='window-refs'>{{ item.parcel.short_label }}</p> + <p class="window-refs">{{ item.label|default:"" }}</p> + {% include "ishtar/blocks/sheet_external_id.html" %} + </p> + </div> + </div> + </div> +</div> + + + +<div class='row'> + {% field_flex "Complete ID" item.full_label %} {% include "ishtar/blocks/sheet_creation_section.html" %} - - {% field_li "Type" item.unit %} - {% field_li "Excavation technic" item.excavation_technic %} - {% field_li_multiple "Chronology" item.datings %} - {% field_li "Town" item.parcel.town %} - {% field_li_multiple "Documentation" item.documentations %} - {% field_li "Opening date" item.opening_date %} - {% field_li "Closing date" item.closing_date %} -</ul> -{% field "Comment on datings" item.datings_comment "<pre>" "</pre>" %} + {% field_flex "Type" item.unit %} + {% field_flex "Excavation technic" item.excavation_technic %} + {% field_flex_multiple "Chronology" item.datings %} + {% field_flex "Town" item.parcel.town %} + {% field_flex_multiple "Documentation" item.documentations %} + {% field_flex "Opening date" item.opening_date %} + {% field_flex "Closing date" item.closing_date %} + {% field_flex_full "Comment on datings" item.datings_comment "<pre>" "</pre>" %} +</div> {% include "ishtar/blocks/sheet_json.html" %} {% if item.diameter or item.depth_of_appearance or item.documentations.count or item.description or item.lenght or item.width or item.depth or item.thickness or item.comment %} <h3>{% trans "Description"%}</h3> -{% field "Description" item.description "<pre>" "</pre>" %} -{% field "Comment" item.comment "<pre>" "</pre>" %} -<ul class='form-flex'> - {% field_li "Length (m)" item.lenght %} - {% field_li "Width (m)" item.width %} - {% field_li "Diameter (m)" item.diameter %} - {% field_li "Depth (m)" item.depth %} - {% field_li "Thickness (m)" item.thickness %} - {% field_li "Depth of appearance (m)" item.depth_of_appearance %} -</ul> +<div class='row'> + {% field_flex_full "Description" item.description "<pre>" "</pre>" %} + {% field_flex_full "Comment" item.comment "<pre>" "</pre>" %} + {% field_flex "Length (m)" item.lenght %} + {% field_flex "Width (m)" item.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> {% endif %} {% if item.activity or item.identification or item.interpretation %} <h3>{% trans "Interpretation"%}</h3> - -<ul class='form-flex'> - {% field_li_multiple "Documentation" item.documentations %} - {% field_li "Activity" item.activity %} - {% field_li "Identification" item.identification %} -</ul> -{% field "Filling" item.filling "<pre>" "</pre>" %} -{% field "Interpretation" item.interpretation "<pre>" "</pre>" %} +<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_full "Interpretation" item.interpretation "<pre>" "</pre>" %} +</div> {% endif %} {% if item.taq or item.taq_estimated or item.tpq or item.tpq_estimated %} <h3>{% trans "Datations"%}</h3> -<ul class='form-flex'> -{% field_li "TAQ" item.taq %} -{% field_li "Estimated TAQ" item.taq_estimated %} -{% field_li "TPQ" item.tpq %} -{% field_li "Estimated TPQ" item.tpq_estimated %} -</ul> +<div class='row'> + {% field_flex "TAQ" item.taq %} + {% field_flex "Estimated TAQ" item.taq_estimated %} + {% field_flex "TPQ" item.tpq %} + {% field_flex "Estimated TPQ" item.tpq_estimated %} +</div> {% endif %} {% trans "Context record relations" as cr_rels %} @@ -79,31 +87,48 @@ {% if item.operation %} <h3>{% trans "Operation summary"%}</h3> {% if not item.operation.code_patriarche %} -<p class='alert'><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <label>{%trans "Patriarche OA code not yet recorded!"%}</label></p> +<div class="alert alert-warning" role="alert"> + {%trans "Patriarche OA code not yet recorded!"%} +</div> {% endif %} -<ul class='form-flex'> -{% field_li "Year" item.operation.year %} +<div class='row'> + {% field_flex "Year" item.operation.year %} {% trans "Numerical reference" as num_ref_label %} - {% field_li num_ref_label item.operation.operation_code %} -{% field_li "Patriarche OA code" item.operation.code_patriarche %} -{% field_li_detail "Head scientist" item.operation.scientist %} -<li><label>{%trans "State"%}</label><span class='value'>{% if item.operation.is_active %}{% trans "Active file" %}{% else %}{%trans "Closed operation" %}{% endif %}</span></li> -{% if not item.operation.is_active %} -<li><label>{%trans "Closing date"%}</label> <span class='value'>{{ item.operation.closing.date }} <strong>{%trans "by" %}</strong> {{ item.operation.closing.user }}</span></li> -{% endif %} -{% field_li "Type" item.operation.operation_type %} -{% field_li_multiple "Remains" item.operation.remains %} -{% field_li_multiple "Periods" item.operation.periods %} -</ul> -{% field "Comment" item.operation.comment "<pre>" "</pre>" %} + {% field_flex num_ref_label item.operation.operation_code %} + {% field_flex "Patriarche OA code" item.operation.code_patriarche %} + {% field_flex_detail "Head scientist" item.operation.scientist %} + + <dl class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row"> + <dt class="col-5">{% trans "State" %}</dt> + <dd class="col-7">{% if item.operation.is_active %}{% trans "Active file" %}{% else %}{%trans "Closed operation" %}{% endif %}</dd> + </dl> + + {% if not item.operation.is_active %} + <dl class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row"> + <dt class="col-5">{%trans "Closing date"%}</dt> + <dd class="col-7"> + {{ item.operation.closing.date }} <strong>{%trans "by" %}</strong> {{ item.operation.closing.user }} + </dd> + </dl> + {% endif %} + {% field_flex "Type" item.operation.operation_type %} + {% field_flex_multiple "Remains" item.operation.remains %} + {% field_flex_multiple "Periods" item.operation.periods %} + {% field_flex_full "Comment" item.operation.comment "<pre>" "</pre>" %} +</div> <h3>{% trans "Localisation"%}</h3> -<p><label>{%trans "Towns"%}</label> <span class='value'>{{ item.operation.towns.all|join:", " }}</span></p> -<p><label>{%trans "Related operation"%}</label> -<span class='value'><a href="#" onclick='load_window("{% url "show-operation" item.operation.pk ''%}");'>{{ item.operation }}</a></span></p> -{% else %}<p class='alert'><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <label>{%trans "No operation linked to this context unit!"%}</label></p> -{% endif %} +<div class='row'> + {% field_flex_multiple "Towns" item.operation.towns %} + {% field_flex_detail "Operation" item.operation %} +</div> + +{% else %} +<div class="alert alert-warning" role="alert"> + {% trans "No operation linked to this context record!" %} +</div> +{% endif %} {% trans "Document from this context record" as cr_docs %} {% if item.source.count %} {% dynamic_table_document cr_docs 'context_records_docs' 'context_record' item.pk '' output %} |