summaryrefslogtreecommitdiff
path: root/archaeological_finds/templates/ishtar/sheet_find.html
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds/templates/ishtar/sheet_find.html')
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find.html98
1 files changed, 69 insertions, 29 deletions
diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html
index 429a7da2b..ff3dc55dd 100644
--- a/archaeological_finds/templates/ishtar/sheet_find.html
+++ b/archaeological_finds/templates/ishtar/sheet_find.html
@@ -1,5 +1,5 @@
{% extends "ishtar/sheet.html" %}
-{% load i18n window_field from_dict %}
+{% load i18n window_field from_dict link_to_window %}
{% block head_sheet %}
{{block.super}}
@@ -28,42 +28,82 @@
<a href='{{item.image.url}}' rel="prettyPhoto" title="{{item.label}}"><img src='{{item.thumbnail.url}}'/></a>
{% endif%}
-{% field "Free-ID" item.label %}
-{% field "Previous ID" item.previous_id %}
-{% field "Description" item.description %}
-{% field "Created by" item.history_creator.ishtaruser.full_label %}
-{% field "Administrative index" item.administrative_index %}
-{% field_multiple "Material types" item.material_types %}
-{% field "Dating" item.dating %}
-{% field "Length (cm)" item.length %}
-{% field "Width (cm)" item.width %}
-{% field "Height (cm)" item.height %}
-{% field "Diameter (cm)" item.diameter %}
-{% field "Volume (l)" item.volume %}
+<ul class='form-flex'>
+{% field_li "Free-ID" item.label %}
+{% field_li "Previous ID" item.previous_id %}
+{% field_li "Description" item.description %}
+{% field_li "Created by" item.history_creator.ishtaruser.full_label %}
+{% field_li "Administrative index" item.administrative_index %}
+{% field_li_multiple "Material types" item.material_types %}
+{% field_li "Dating" item.dating %}
+{% field_li "Length (cm)" item.length %}
+{% field_li "Width (cm)" item.width %}
+{% field_li "Height (cm)" item.height %}
+{% field_li "Diameter (cm)" item.diameter %}
+{% field_li "Volume (l)" item.volume %}
{% if item.weight %}{% with item.weight|add:' '|add:item.weight_unit as weight %}
-{% field "Weight" weight %}
+{% field_li "Weight" weight %}
{% endwith %}{% endif %}
-{% field "Weight" item.weight %}
+{% field_li "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 %}
+{% field_li "Find number" item.find_number %}
+{% field_li "Conservatory state" item.conservatory_state %}
+{% field_li_multiple "Type of preservation to consider" item.preservation_to_considers %}
+{% field_li_multiple "Object types" item.object_types %}
+{% field_li_multiple "Integrity" item.integrities %}
{% if item.CHECK_DICT %}
-{% field "Checked" item.checked|from_dict:item.CHECK_DICT %}
+{% field_li "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 %}
+{% field_li "Checked" item.checked|from_dict:item.history_object.CHECK_DICT %}
{% endif%}
+{% field_li "Container" item.container %}
+</ul>
-{% 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%}
-{% if item.downstream_treatment %}<p><label>{%trans "Downstream treatment"%}{% trans ":"%}</label>
-<span class='value'>{{item.downstream_treatment}} ({% for dt in item.downstream_treatment.downstream_treatment.all %}{% if forloop.counter0 %}, {%endif %}{{dt}}{% endfor %})</span></p>{% endif%}
-{% if item.container %}<p><label>{%trans "Container"%}{% trans ":"%}</label>
-<span class='value'>{{item.container}}</span></p>{% endif%}
+{% if item.upstream_treatment %}
+<table class='simple' id='{{window_id}}-upstream'>
+ <caption>{% trans "Upstream treatment" %}</caption>
+ <tr>
+ <th>{% trans "Type" %}</th>
+ <th>{% trans "Related find" %}</th>
+ <th>{% trans "Person" %}</th>
+ <th>{% trans "Start date" %}</th>
+ <th>{% trans "End date" %}</th>
+ </tr>
+ {% for items, treatment in item.upstream_treatments %}
+ <tr>
+ <td class='string'>{{ treatment.treatment_type }}</td>
+ <td class='string'>{% for item in items %}{% if not forloop.first %} ; {% endif %} {{item}} {{ item|link_to_window}}{% endfor %}</td>
+ <td class='string'>{{ treatment.person|default_if_none:"" }}</td>
+ <td class='string'>{{ treatment.start_date|default_if_none:"" }}</td>
+ <td class='string'>{{ treatment.end_date|default_if_none:"" }}</td>
+ </tr>
+ {% endfor %}
+</table>
+{% endif %}
+
+{% if item.downstream_treatment %}
+<table class='simple' id='{{window_id}}-downstream'>
+ <caption>{% trans "Downstream treatment" %}</caption>
+ <tr>
+ <th>{% trans "Type" %}</th>
+ <th>{% trans "Related find" %}</th>
+ <th>{% trans "Person" %}</th>
+ <th>{% trans "Start date" %}</th>
+ <th>{% trans "End date" %}</th>
+ </tr>
+ {% for items, treatment in item.downstream_treatments %}
+ <tr>
+ <td class='string'>{{ treatment.treatment_type }}</td>
+ <td class='string'>{% for item in items %}{% if not forloop.first %} ; {% endif %} {{item}} {{ item|link_to_window}}{% endfor %}</td>
+ <td class='string'>{{ treatment.person|default_if_none:"" }}</td>
+ <td class='string'>{{ treatment.start_date|default_if_none:"" }}</td>
+ <td class='string'>{{ treatment.end_date|default_if_none:"" }}</td>
+ </tr>
+ {% endfor %}
+</table>
+{% endif %}
<h3>{% trans "Associated base finds"%}</h3>
@@ -103,7 +143,7 @@
{% endfor %}
{% if not item.source.count %}
- <p class='alert'>{% trans "No document associated to this find" %}</p>
+ <em>{% trans "No document associated to this find" %}</em>
{% else %}
<table class='simple' id='{{window_id}}-docs'>
<caption>{%trans "Documents"%}</caption>