From fe1bb8dbe6d02d2379f89d410b3533a6d84209b2 Mon Sep 17 00:00:00 2001
From: Étienne Loks
Date: Fri, 27 Nov 2015 13:06:05 +0100
Subject: Sheets: fix dict presentation for historical records
---
archaeological_finds/templates/ishtar/sheet_find.html | 13 ++++++++++++-
.../templates/ishtar/sheet_operation.html | 6 ++++++
2 files changed, 18 insertions(+), 1 deletion(-)
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 %}
{{item.upstream_treatment}} ({% for up in item.upstream_treatment.upstream_treatment.all %}{% if forloop.counter0 %}, {%endif %}{{up}}{% endfor %})
{% endif%}
@@ -66,7 +72,12 @@
{{base_find.complete_id}}
{% 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 %}
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 @@
{{ item.remains.all|join:", " }}
{{ item.periods.all|join:", " }}
+{% 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 %}
{{ item.associated_file }}
--
cgit v1.2.3