blob: bc628883ef159c88abac31302a8739fb9313af17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
|
{% extends "ishtar/sheet.html" %}
{% load i18n window_field from_dict link_to_window window_tables window_header humanize %}
{% block head_title %}<strong>{% trans "Find" %}</strong> - {{item.label|default:""}}{% endblock %}
{% block toolbar %}
{% window_nav item window_id 'show-find' 'find_modify' 'show-historized-find' 'revert-find' previous next 1 %}
{% endblock %}
{% block content %}
<div class="row">
<div class="offset-lg-4 col-lg-4 offset-md-3 col-md-6 offset-sm-1 col-sm-10 col-12">
<div class="card">
{% include "ishtar/blocks/window_image.html" %}
<div class="card-body">
<p class="card-text">
<p class="window-refs" title="{% trans 'Label' %}">{{ item.label|default:"" }}</p>
<p class='window-refs' title="{% trans 'Base find - Complete ID' %}">{% for base_find in item.base_finds.all %}{% if forloop.counter0 %} – {% endif %}{{base_find.complete_id}}{% endfor %}</p>
<p class='window-refs' title="{% trans 'Base find - Short ID' %}">{% for base_find in item.base_finds.all %}{% if forloop.counter0 %} – {% endif %}{{base_find.short_id}}{% endfor %}</p>
<p class="window-refs" title="{% trans 'Find - Administrative ID' %}">{{ item.administrative_index|default:"" }}</p>
{% include "ishtar/blocks/sheet_external_id.html" %}
</p>
</div>
</div>
</div>
</div>
{% if item.downstream_treatment %}
<div class="alert alert-warning" role="alert">
{% trans "This sheet has a downstream treatment: it is related to an old version of the find." %}</p>
</div>
{% endif %}
<div class='row'>
{% field_flex "Previous ID" item.previous_id %}
{% include "ishtar/blocks/sheet_creation_section.html" %}
{% trans "Administrative index" as admin_index_label %}
{% field_flex admin_index_label item.administrative_index %}
{% field_flex_multiple "Material types" item.material_types %}
{% field_flex_full "Description" item.description "<pre>" "</pre>" %}
{% field_flex_full "Mark" item.mark "<pre>" "</pre>" %}
{% field_flex "Find number" item.find_number %}
{% field_flex "Minimum number of individuals (MNI)" item.min_number_of_individuals %}
{% field_flex_multiple "Object types" item.object_types %}
{% field_flex_multiple "Integrity / interest" item.integrities %}
{% field_flex_multiple "Remarkability" item.remarkabilities %}
{% field_flex_multiple "Communicability" item.communicabilities %}
{% field_flex "Estimated value" item.estimated_value|default_if_none:''|intcomma '' ' '|add:CURRENCY %}
{% field_flex_full "Comment" item.comment "<pre>" "</pre>" %}
{% trans "Checked" as checked_label %}
{% if item.CHECK_DICT %}
{% field_flex checked_label item.checked|from_dict:item.CHECK_DICT %}
{% endif%}
{% if item.history_object and item.history_object.CHECK_DICT %}
{% field_flex checked_label item.checked|from_dict:item.history_object.CHECK_DICT %}
{% endif%}
{% field_flex "Check date" item.check_date %}
</div>
{% include "ishtar/blocks/sheet_json.html" %}
{% if item.dating or item.dating_comment %}
<h3>{% trans "Dating" %}</h3>
{% field_flex "Dating" item.dating %}
{% field_flex_full "Comment on dating" item.dating_comment "<pre>" "</pre>" %}
{% endif %}
{% if item.length or item.width or item.height or item.diameter or item.thickness or item.volume or item.weight_string or item.dimensions_comment %}
<h3>{% trans "Dimensions" %}</h3>
<div class='row'>
{% field_flex "Length (cm)" item.length %}
{% field_flex "Width (cm)" item.width %}
{% field_flex "Height (cm)" item.height %}
{% field_flex "Diameter (cm)" item.diameter %}
{% field_flex "Thickness (cm)" item.thickness %}
{% field_flex "Volume (l)" item.volume %}
{% trans "Weight (g)" as weight_label %}
{% field_flex weight_label item.weight_string %}
{% field_flex_full "Dimensions comment" item.dimensions_comment "<pre>" "</pre>" %}
</div>
{% endif %}
{% if item.conservatory_state or item.conservatory_comment or item.alterations.count or item.alteration_causes.count or item.preservation_to_considers.count or item.treatment_emergency or item.insurance_value %}
<h3>{% trans "Preservation" %}</h3>
<div class='row'>
{% field_flex "Conservatory state" item.conservatory_state %}
{% field_flex_multiple "Alteration" item.alterations %}
{% field_flex_multiple "Alteration cause" item.alteration_causes %}
{% field_flex_multiple "Recommended treatments" item.preservation_to_considers %}
{% field_flex "Treatment emergency" item.treatment_emergency %}
{% field_flex "Insurance value" item.insurance_value|default_if_none:''|intcomma '' ' '|add:CURRENCY %}
{% field_flex "Appraisal date" item.appraisal_date %}
{% field_flex_full "Conservatory comment" item.conservatory_comment "<pre>" "</pre>" %}
</div>
{% endif %}
{% if item.container %}
<h3>{% trans "Warehouse"%}</h3>
<div class='row'>
{% field_flex_detail "Container" item.container %}
{% field_flex "Container ID" item.container.cached_location %}
{% field_flex_detail "Responsible warehouse" item.container.responsible %}
{% field_flex_detail "Location (warehouse)" item.container.location %}
{% field_flex "Precise localisation" item.container.divisions_lbl %}
</div>
{% endif %}
{% if item.upstream_treatment or item.downstream_treatment %}
<h3>{% trans "Treatments"%}</h3>
{% if item.upstream_treatment %}
<h3>{% trans "Upstream treatment" %}</h3>
<table id='{{window_id}}-upstream' class="table table-striped">
<tr>
<th> </th>
<th>{% trans "Year - index" %}</th>
<th>{% trans "Label" %}</th>
<th>{% trans "Type" %}</th>
<th>{% trans "State" %}</th>
<th>{% trans "Related finds (max. 15 displayed)" %}</th>
<th>{% trans "Doer" %}</th>
<th>{% trans "Container" %}</th>
<th>{% trans "Start date" %}</th>
<th>{% trans "End date" %}</th>
</tr>
{% for items, treatment in item.limited_upstream_treatments %}
<tr>
<td>
<a class="display_details" href="#"
onclick="load_window('{% url 'show-treatment' treatment.id %}/');">
<i class="fa fa-info-circle" aria-hidden="true"></i>
</a>
</td>
<td class='string'>{{ treatment.year }} - {{treatment.index}}</td>
<td class='string'>{{ treatment.label|default_if_none:"-" }}</td>
<td class='string'>{{ treatment.treatment_types_lbl }}</td>
<td class='string'>{{ treatment.treatment_state|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>
<p class='tool'><a class='badge' href="{% url 'get-upstreamtreatment' 'csv' %}?submited=1&find_id={{item.pk}}" target="_blank" title='{% trans "Export as CSV"%}'>{% trans "CSV" %}</a> ({{ENCODING}})</p>
{% endif %}
{% if item.downstream_treatment %}
<h3>{% trans "Downstream treatment" %}</h3>
<table id='{{window_id}}-downstream' class="table table-striped">
<tr>
<th> </th>
<th>{% trans "Year - index" %}</th>
<th>{% trans "Label" %}</th>
<th>{% trans "Type" %}</th>
<th>{% trans "State" %}</th>
<th>{% trans "Related finds (max. 15 displayed)" %}</th>
<th>{% trans "Doer" %}</th>
<th>{% trans "Container" %}</th>
<th>{% trans "Start date" %}</th>
<th>{% trans "End date" %}</th>
</tr>
{% for items, treatment in item.limited_downstream_treatments %}
<tr>
<td>
<a class="display_details" href="#"
onclick="load_window('{% url 'show-treatment' treatment.id %}/');">
<i class="fa fa-info-circle" aria-hidden="true"></i>
</a>
</td>
<td class='string'>{{ treatment.year }} - {{treatment.index}}</td>
<td class='string'>{{ treatment.label|default_if_none:"-" }}</td>
<td class='string'>{{ treatment.treatment_types_lbl }}</td>
<td class='string'>{{ treatment.treatment_state|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>
<p class='tool'><a class='badge' href="{% url 'get-downstreamtreatment' 'csv' %}?submited=1&find_id={{item.pk}}" target="_blank">{% trans "CSV" %}</a> ({{ENCODING}})</p>
{% endif %}
{% endif %}
<h3>{% trans "Associated base finds"%}</h3>
{% for base_find in item.base_finds.all %}
<p class='window-refs text-center'>{{base_find.complete_id }}</p>
<p class='window-refs text-center'>{{base_find.short_id }}</p>
{% if base_find.external_id %}
<p class='window-refs text-center external-id'>
<small title="{% trans 'Internal ID' %}">
<i class="fa fa-key" aria-hidden="true"></i>
{{base_find.external_id|default:''}}
</small>
</p>{% endif %}
<div class='row'>
{% with item.history_creation_date|date:"SHORT_DATETIME_FORMAT" as creation_date %}
{% with item.history_creator.ishtaruser.full_label|add:"<br/><i>"|add:creation_date|add:"</i>" as creator %}
{% field_flex "Created by" creator|safe %}
{% endwith %}{% endwith %}
{% if item.history_creation_date != item.last_edition_date %}
{% with item.last_edition_date|date:"SHORT_DATETIME_FORMAT" as edition_date %}
{% with item.history_modifier.ishtaruser.full_label|add:"<br/><i>"|add:edition_date|add:"</i>" as modifier %}
{% trans "Last modified by" as lastmodifiedby_label %}
{% field_flex lastmodifiedby_label modifier|safe %}
{% endwith %}{% endwith %}
{% endif %}
{% field_flex "Batch/object" base_find.batch %}
{% if base_find.history_object and base_find.history_object.IS_ISOLATED_DICT %}
{% field_flex "Batch/object" base_find.batch|from_dict:base_find.history_object.IS_ISOLATED_DICT %}
{% endif %}
{% field_flex "Discovery date" base_find.discovery_date %}
{% field_flex "Special interest" base_find.special_interest %}
{% field_flex_detail "Context record" base_find.context_record %}
{% field_flex "Town" base_find.context_record.parcel.town %}
{% field_flex "Parcel" base_find.context_record.parcel %}
{% field_flex_detail "Operation" base_find.context_record.operation %}
{% field_flex_detail "Archaeological site" base_find.context_record.archaeological_site %}
{% field_flex "Point of topographic reference" base_find.topographic_localisation %}
{% if base_find.x or base_find.y %}
<dl class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
<dt class="col-5">{% trans "Coordinates" %}</dt>
<dd class="col-7">
{% trans "X"%} {{base_find.x|default_if_none:"-"}},
{% trans "Y"%} {{base_find.y|default_if_none:"-"}},
{% trans "Z"%} {{base_find.z|default_if_none:"-"}}
{% if base_find.spatial_reference_system %}
({{base_find.spatial_reference_system.label}}{% if base_find.spatial_reference_system.srid %} -
{% trans "SRID"%} {{base_find.spatial_reference_system.srid}}{% endif %})
{% endif %}
</dd>
</dl>
{% endif %}
{% field_flex_full "Description" base_find.description "<pre>" "</pre>" %}
{% field_flex_full "Comment" base_find.comment "<pre>" "</pre>" %}
</div>
{% if forloop.counter0 %}<hr/>{% endif %}
{% endfor %}
{% if item.source.count %}
<h3>{% trans "Documents"%}</h3>
<table id='{{window_id}}-docs' class="table table-striped">
<caption>{%trans "Documents"%}</caption>
<tr>
<th> </th>
<th>{% trans "Title" %}</th>
<th>{% trans "Type" %}</th>
<th>{% trans "Authors" %}</th>
<th>{% trans "Link" %}</th>
</tr>
{% for doc in item.source.all %}
<tr>
<td><a class="display_details" href="#"
onclick="load_window('{% url 'show-findsource' doc.id %}/');"><i class="fa fa-info-circle" aria-hidden="true"></i>
</a></td>
<td class='string'>{{ doc.title }}</td>
<td class='string'>{{ doc.source_type }}</td>
<td class='string'>{{ doc.authors.all|join:", " }}</td>
<td class='string'>{% if doc.associated_url %}<a href='{{doc.associated_url}}' target="_blank">{{doc.associated_url}}</a>{% endif %}</td>
</tr>
{% empty %}
{% endfor %}
</table>
{% endif %}
{% endblock %}
|