summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-06-06 18:42:38 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-06-06 18:42:38 +0200
commitc1c5b1b45749569cb9146bd6a0e9f73f5b4c5e5a (patch)
tree4535405211a924ecf05e65cfe9826f4190f7e803 /archaeological_finds
parent838b1b510851177b039647e88079e34b92392944 (diff)
downloadIshtar-c1c5b1b45749569cb9146bd6a0e9f73f5b4c5e5a.tar.bz2
Ishtar-c1c5b1b45749569cb9146bd6a0e9f73f5b4c5e5a.zip
Improvement on find sheet
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find.html62
1 files changed, 26 insertions, 36 deletions
diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html
index 370f4bb37..b37a9957c 100644
--- a/archaeological_finds/templates/ishtar/sheet_find.html
+++ b/archaeological_finds/templates/ishtar/sheet_find.html
@@ -10,7 +10,7 @@
{% if previous or next %}
<div class='tool'>
-{%if previous%}
+{% if previous %}
<a href="#" onclick='load_window("{% url show-historized-find item.pk previous|date:"c"%}");$("#{{window_id}}").hide();return false;'>{%trans "Previous version"%} ({{previous}})</a>
{% endif %}
{% if previous and next %} - {% endif %}
@@ -68,16 +68,18 @@
<th>{% trans "Type" %}</th>
<th>{% trans "Related find" %}</th>
<th>{% trans "Person" %}</th>
+ <th>{% trans "Container" %}</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>
+ <td class='item-list'>{% for item in items %}<span>{{item}} {{ item|link_to_window}}</span>{% endfor %}</td>
+ <td class='string'>{{ treatment.person|default_if_none:"-" }}</td>
+ <td class='string'>{{ treatment.container|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>
@@ -96,7 +98,7 @@
{% 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='item-list'>{% for item in items %}<span>{{item}} {{ item|link_to_window}}</span>{% 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>
@@ -108,44 +110,31 @@
<h3>{% trans "Associated base finds"%}</h3>
{% for base_find in item.base_finds.all %}
-<p><label>{%trans "Complete ID"%}{% trans ":"%}</label>
-<span class='value'>{{base_find.complete_id}}</span></p>
-
-{% field "Short ID" base_find.short_id %}
+<ul class='form-flex'>
+{% field_li "Complete ID" base_find.complete_id %}
+{% field_li "Short ID" base_find.short_id %}
{% if base_find.IS_ISOLATED_DICT %}
-{% field "Batch/object" base_find.batch|from_dict:base_find.IS_ISOLATED_DICT %}
+{% field_li "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 %}
+{% field_li "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>
-<span class='value'>{{base_find.discovery_date}}</span></p>
-{% endif%}
-{% if base_find.description %}
-<p><label>{%trans "Description"%}{% trans ":"%}</label>
-<span class='value'>{{base_find.description}}</span></p>
-{% endif%}
-{% field "Comment" base_find.comment "<pre>" "</pre>" %}
-{% if base_find.special_interest %}
-<p><label>{%trans "Special interest"%}{% trans ":"%}</label>
-<span class='value'>{{base_find.special_interest}}</span></p>
-{% endif%}
+{% field_li "Discovery date" base_find.discovery_date %}
+{% field_li "Special interest" base_find.special_interest %}
+{% field_li_detail "Context record" base_find.context_record %}
+{% if base_find.context_record %}{% field_li "Parcel" base_find.context_record.parcel %}
+{% field_li_detail "Operation" base_find.context_record.operation %}{% endif %}
+</ul>
-<p><label>{%trans "Related context record"%}{% trans ":"%}</label>
-<span class='value'><a href="#" onclick='load_window("{% url show-contextrecord base_find.context_record.pk ''%}");'>{{ base_find.context_record }}</a></span></p>
-<p><label>{%trans "Related parcel"%}{% trans ":"%}</label>
-<span class='value'>{{base_find.context_record.parcel}}</span></p>
-<p><label>{%trans "Related operation"%}{% trans ":"%}</label>
-<span class='value'><a href="#" onclick='load_window("{% url show-operation base_find.context_record.operation.pk ''%}");'>{{ base_find.context_record.operation }}</a></span></p>
+{% field "Description" base_find.description "<pre>" "</pre>" %}
+{% field "Comment" base_find.comment "<pre>" "</pre>" %}
{% if forloop.counter0 %}<hr/>{% endif %}
{% endfor %}
-{% if not item.source.count %}
- <em>{% trans "No document associated to this find" %}</em>
-{% else %}
-<table class='simple' id='{{window_id}}-docs'>
+{% if item.source.count %}
+<h3>{% trans "Documents"%}</h3>
+<table id='{{window_id}}-docs'>
<caption>{%trans "Documents"%}</caption>
<tr>
<th>{% trans "Title" %}</th>
@@ -165,7 +154,8 @@
</table>
<script type='text/javascript'>
-tableToGrid('#{{window_id}}-docs', {});
+tableToGrid('#{{window_id}}-docs', {
+ width: null, shrinkToFit: false});
</script>
{% endif %}