summaryrefslogtreecommitdiff
path: root/archaeological_context_records/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-09-07 12:46:34 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-09-07 12:46:34 +0200
commitebe47cf4d963caf5f765509eec7b6e80a42a084b (patch)
treee739aa2aa9e518ff453cfb40d64a6a8126b131bf /archaeological_context_records/templates
parent23d974f2165926db14f69307948daac5e80cc1a1 (diff)
downloadIshtar-ebe47cf4d963caf5f765509eec7b6e80a42a084b.tar.bz2
Ishtar-ebe47cf4d963caf5f765509eec7b6e80a42a084b.zip
Display a message to warn about related items and history - many improvment on sheet layout
Diffstat (limited to 'archaeological_context_records/templates')
-rw-r--r--archaeological_context_records/templates/ishtar/sheet_contextrecord.html96
1 files changed, 46 insertions, 50 deletions
diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
index 493a00f1b..2c2bf98fe 100644
--- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
+++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
@@ -10,49 +10,50 @@
<a href='{{item.image.url}}' rel="prettyPhoto" title="{{item.label}}" class='photo'><img src='{{item.thumbnail.url}}'/></a>
{% endif%}
-{% if item.operation.code_patriarche %}
-<p><label>{%trans "Complete ID:"%}</label>
-{% else %}
-<p class='alert'><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <label>{%trans "Patriarche OA code not yet recorded!"%}</label></p>
-<p><label>{%trans "Temporary ID:"%}</label>
-{%endif%}
-<span class='value'>{{item.full_label}}</span></p>
-<p><label>{%trans "Creation date:"%}</label> <span class='value'>{{ item.creation_date }}</span></p>
-<p><label>{%trans "Created by:"%}</label> <span class='value'>{{ item.history_creator.ishtaruser.full_label }}</span></p>
-{%if item.unit %}
-<p><label>{% trans "Type:" %}</label> <span class='value'>{{ item.unit }}</span></p>
-{%endif%}
-<p><label>{% trans "Chronology:" %}</label> <span class='value'>{{ item.datings.all|join:", " }}</span></p>
+<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>
+{% field_li "Creation date" item.creation_date %}
+{% field_li "Created by" item.history_creator.ishtaruser.full_label %}
+{% field_li "Type" item.unit %}
+{% field_li_multiple "Chronology" item.datings %}
+{% field_li "Town" item.parcel.town %}
+{% field_li "Parcel" item.parcel.short_label %}
+</ul>
{% field "Comment on datings" item.datings_comment "<pre>" "</pre>" %}
-<p><label>{% trans "Place:" %}</label> <span class='value'>{{ item.parcel.town }}</span></p>
-<p><label>{% trans "Parcel:" %}</label> <span class='value'>{{ item.parcel.short_label }}</span></p>
{% if item.description or item.lenght or item.width or item.depth or item.thickness or item.comment %}
<h3>{% trans "Description"%}</h3>
-
-<p><label>{% trans "Description:" %}</label> <span class='value'>{{ item.description }}</span></p>
-{% if item.comment %}<p><label>{% trans "Comment:" %}</label> <span class='value'>{{ item.comment }}</span></p>{% endif %}
-{% if item.lenght %}<p><label>{% trans "Length (m):" %}</label> <span class='value'>{{ item.length }}</span></p>{%endif%}
-{% if item.width %}<p><label>{% trans "Width (m):" %}</label> <span class='value'>{{ item.width }}</span></p>{%endif%}
-{% if item.depth %}<p><label>{% trans "Depth (m):" %}</label> <span class='value'>{{ item.depth }}</span></p>{%endif%}
-{% if item.width %}<p><label>{% trans "Thickness (m):" %}</label> <span class='value'>{{ item.thickness }}</span></p>{%endif%}
+{% 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 "Depth (m)" item.depth %}
+{% field_li "Thickness (m)" item.thickness %}
+</ul>
{% endif %}
{% if item.activity or item.identification or item.interpretation %}
<h3>{% trans "Interpretation"%}</h3>
-{% if item.activity %}<p><label>{% trans "Activity:" %}</label> <span class='value'>{{ item.activity }}</span></p>{%endif%}
-{% if item.identification %}<p><label>{% trans "Identification:" %}</label> <span class='value'>{{ item.identification }}</span></p>{%endif%}
-{% if item.interpretation %}<p><label>{% trans "Interpretation:" %}</label> <span class='value'>{{ item.interpretation }}</span></p>{%endif%}
+<ul class='form-flex'>
+{% field_li "Activity" item.activity %}
+{% field_li "Identification" item.identification %}
+{% field_li "Has furniture?" item.has_furniture %}
+</ul>
+{% field "Filling" item.filling "<pre>" "</pre>" %}
+{% field "Interpretation" item.interpretation "<pre>" "</pre>" %}
{% endif %}
{% if item.taq or item.taq_estimated or item.tpq or item.tpq_estimated %}
<h3>{% trans "Datations"%}</h3>
-{% if item.taq %}<p><label>{% trans "TAQ:" %}</label> <span class='value'>{{ item.taq }}</span></p>{%endif%}
-{% if item.taq_estimated %}<p><label>{% trans "Estimated TAQ:" %}</label> <span class='value'>{{ item.taq_estimated }}</span></p>{%endif%}
-{% if item.tpq %}<p><label>{% trans "TPQ:" %}</label> <span class='value'>{{ item.tpq }}</span></p>{%endif%}
-{% if item.tpq_estimated %}<p><label>{% trans "Estimated TPQ:" %}</label> <span class='value'>{{ item.tpq_estimated }}</span></p>{%endif%}
-{%endif%}
+<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>
+{% endif %}
{% if item.right_relations.count %}
<h3>{% trans "In relation with"%}</h3>
@@ -86,33 +87,28 @@
{% if item.operation %}
<h3>{% trans "Operation summary"%}</h3>
-<p><label>{%trans "Year:"%}</label> <span class='value'>{{ item.operation.year }}</span></p>
-{% field "Numerical reference" item.operation.operation_code %}
-{% if item.operation.code_patriarche %}
-<p><label>{%trans "Patriarche OA code:"%}</label>
-<span class='value'>{{ item.operation.code_patriarche }}</span></p>
-{% else %}<p class='alert'><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <label>{%trans "Patriarche OA code not yet recorded!"%}</label></p>
-{%endif%}
-{#<p><label>{%trans "Operation's name:"%}</label><span class='value'>{{ item.operation.internal_reference }}</span></p>#}
-{% if item.operation.scientist %}<p><label>{%trans "Head scientist:"%}</label> <span class='value'>{{ item.operation.scientist.full_label }} <a href='#' onclick='load_window("{% url show-person item.operation.scientist.pk ''%}");'><i class="fa fa-info-circle" aria-hidden="true"></i></a></span></p>{%endif%}
-<p><label>{%trans "State:"%}</label>
-{% if item.operation.is_active %}
-<span class='value'>{%trans "Active file"%}</span></p>
-{% else %}
-<span class='value'>{%trans "Closed operation"%}</span></p>
-<p><label>{%trans "Closing date:"%}</label> <span class='value'>{{ item.operation.closing.date }}
-<strong>{%trans "by" %}</strong> {{ item.operation.closing.user }}</span></p>
+{% 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>
+{% endif %}
+<ul class='form-flex'>
+{% field_li "Year" item.operation.year %}
+{% field_li "Numerical reference" 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 %}
-<p><label>{%trans "Type:"%}</label> <span class='value'>{{ item.operation.operation_type }}</span></p>
-<p><label>{%trans "Remains:"%}</label> <span class='value'>{{ item.operation.remains.all|join:", " }}</span></p>
-<p><label>{%trans "Periods:"%}</label> <span class='value'>{{ item.operation.periods.all|join:", " }}</span></p>
+{% 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>" %}
<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>
-{# TODO: Displayed as Year/index/Commune/Common_name This should be a link to the file sheet of the related operation #}
{% 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 %}