summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-11-27 13:06:05 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-11-27 13:06:53 +0100
commitfe1bb8dbe6d02d2379f89d410b3533a6d84209b2 (patch)
tree2f220df0a9cbb856893f96e29dcfb3e09871c790
parent0fc27869f44cdb5af8f34e097e970218cefdf49a (diff)
downloadIshtar-fe1bb8dbe6d02d2379f89d410b3533a6d84209b2.tar.bz2
Ishtar-fe1bb8dbe6d02d2379f89d410b3533a6d84209b2.zip
Sheets: fix dict presentation for historical records
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find.html13
-rw-r--r--archaeological_operations/templates/ishtar/sheet_operation.html6
2 files changed, 18 insertions, 1 deletions
diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html
index 126cbefba..c5d3eb638 100644
--- a/archaeological_finds/templates/ishtar/sheet_find.html
+++ b/archaeological_finds/templates/ishtar/sheet_find.html
@@ -44,13 +44,19 @@
{% if item.weight %}{% with item.weight|add:' '|add:item.weight_unit as weight %}
{% field "Weight" weight %}
{% endwith %}{% endif %}
+{% field "Weight" item.weight %}
{% field "Find number" item.find_number %}
{% field "Conservatory state" item.conservatory_state %}
{% field_multiple "Type of preservation to consider" item.preservation_to_considers %}
{% field_multiple "Object types" item.object_types %}
{% field_multiple "Integrity" item.integrities %}
+{% if item.CHECK_DICT %}
{% field "Checked" item.checked|from_dict:item.CHECK_DICT %}
+{% endif%}
+{% if item.history_object and item.history_object.CHECK_DICT %}
+{% field "Checked" item.checked|from_dict:item.history_object.CHECK_DICT %}
+{% endif%}
{% if item.upstream_treatment %}<p><label>{%trans "Upstream treatment"%}{% trans ":"%}</label>
<span class='value'>{{item.upstream_treatment}} ({% for up in item.upstream_treatment.upstream_treatment.all %}{% if forloop.counter0 %}, {%endif %}{{up}}{% endfor %})</span></p>{% endif%}
@@ -66,7 +72,12 @@
<span class='value'>{{base_find.complete_id}}</span></p>
{% field "Short ID" base_find.short_id %}
-{% field "Batch/object" base_find|from_dict:base_find.IS_ISOLATED_DICT %}
+{% if base_find.IS_ISOLATED_DICT %}
+{% field "Batch/object" base_find.batch|from_dict:base_find.IS_ISOLATED_DICT %}
+{% endif %}
+{% if base_find.history_object and base_find.history_object.IS_ISOLATED_DICT %}
+{% field "Batch/object" base_find.batch|from_dict:base_find.history_object.IS_ISOLATED_DICT %}
+{% endif %}
{% if base_find.discovery_date %}
<p><label>{%trans "Discovery date"%}{% trans ":"%}</label>
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html
index 9784b29df..545b1c143 100644
--- a/archaeological_operations/templates/ishtar/sheet_operation.html
+++ b/archaeological_operations/templates/ishtar/sheet_operation.html
@@ -58,7 +58,13 @@
<p><label>{%trans "Remains:"%}</label> <span class='value'>{{ item.remains.all|join:", " }}</span></p>
<p><label>{%trans "Periods:"%}</label> <span class='value'>{{ item.periods.all|join:", " }}</span></p>
+{% if item.QUALITY_DICT %}
{% field "Record quality" item.record_quality|from_dict:item.QUALITY_DICT %}
+{% endif %}
+{% if item.history_object and item.history_object.QUALITY_DICT %}
+{% field "Record quality" item.record_quality|from_dict:item.history_object.QUALITY_DICT %}
+{% endif %}
+
{% if item.associated_file %}
<p><label>{%trans "Associated file:"%}</label> <span class='value'><a href='#' onclick='load_window("{% url show-file item.associated_file.pk ''%}")'>{{ item.associated_file }}</a></span></p><!-- Displayed as Year/index/Commune/Common_name This should be a link to the file sheet of the related file -->