blob: 6b2030f5e28c7fbe985b85c181c92638dc973c6e (
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
|
{% extends "ishtar/sheet.html" %}
{% load i18n window_tables window_header window_ope_tables window_field from_dict %}
{% block head_title %}{% trans "Operation" %}{% endblock %}
{% block content %}
{% window_nav item window_id 'show-operation' 'operation_modify' 'show-historized-operation' 'revert-operation' previous next 1 %}
{% if item.image %}
<a href='{{item.image.url}}' rel="prettyPhoto" title="{{item.label}}" class='photo'><img src='{{item.thumbnail.url}}'/></a>
{% endif%}
{% if item.virtual_operation %}
<p class='alert'><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {% trans "This operation is virtual." %}</p>
{% endif %}
{% if not item.code_patriarche %}
<p class='alert'><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {%trans "Patriarche OA code not yet recorded!"%}</p>
{% endif %}
<h3>{% trans "General"%}</h3>
<ul class='form-flex'>
{% field_li "Name" item.common_name %}
{% field_li "Year" item.year %}
{% field_li "Numeric reference" item.operation_code %}
{% field_li "Code patriarche" item.code_patriarche 'OA' %}
{% field_li "Old code" item.old_code %}
<li><label>{%trans "Last modification date:"%}</label> <span class='value'>{% if item.history_date %}{{ item.history_date }}{% else %}{{ item.history.all.0.history_date }}{% endif %}</span></li> <!-- date = now -->
{% field_li "Created by" item.history_creator.ishtaruser.full_label %}
{% field_li "Begining date" item.start_date %}
{% field_li "Excavation end date" item.excavation_end_date|default:"-" %}
{% field_li_detail "Head scientist" item.scientist %}
{% field_li_detail "In charge" item.in_charge %}
{% field_li_detail "Operator" item.operator %}
<li><label>{%trans "State:"%}</label> <span class='value'>{% if item.is_active %}{%trans "Active file"%}</span></p>
{% else %}{%trans "Closed operation"%}</span></li> {% endif %}
{% if item.closing.date %}<li><label>{%trans "Closing date:"%}</label> <span class='value'>{{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user }}</span></li>{% endif %}
{% field_li "Type" item.operation_type %}
{% if item.surface %}<li><label>{%trans "Surface:"%}</label> <span class='value'>{{ item.surface }} m<sup>2</sup> ({{ item.surface_ha }} ha)</span></li>{% endif %}
{% if item.cost %}<li><label>{%trans "Cost:"%}</label> <span class='value'>{{ item.cost }} €{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} €/m<sup>2</sup>){%endif%}</span></li>{%endif%}
{% if item.duration %}<li><label>{%trans "Duration:"%}</label> <span class='value'>{{ item.duration }} {%trans "Day"%}s</span></li>{%endif%}
{% field_li_multiple "Remains" item.remains %}
{% field_li_multiple "Periods" item.periods %}
{% if item.QUALITY_DICT %}{% field_li "Record quality" item.record_quality|from_dict:item.QUALITY_DICT %}{% endif %}
{% if item.history_object and item.history_object.QUALITY_DICT %}{% field_li "Record quality" item.record_quality|from_dict:item.history_object.QUALITY_DICT %}{% endif %}
{% field_li "Report delivery date" item.report_delivery_date %}
{% field_li "Report processing" item.report_processing %}
{% field_li "Deadline for submission of the documentation" item.documentation_deadline %}
{% field_li "Documentation received" item.documentation_received %}
{% field_li "Deadline for submission of the finds" item.finds_deadline %}
{% field_li "Finds received" item.finds_received %}
{% field_li_detail "Associated file" item.associated_file %}
{% field_li "Responsible for town planning service" item.associated_file.responsible_town_planning_service.full_address %}
{% if item.associated_file.town_planning_service %}
{% field_li "Town planning service organization" item.associated_file.town_planning_service.full_address %}
{% else %}
{% field_li "Town planning service organization" item.associated_file.responsible_town_planning_service.attached_to.full_address %}
{% endif %}
{% field_li "Permit type" item.associated_file.permit_type %}
{% field_li "Permit reference" item.associated_file.permit_reference %}
{% field_li "General contractor" item.associated_file.general_contractor.full_address %}
{% if item.associated_file.corporation_general_contractor %}
{% field_li "General contractor organization" item.associated_file.corporation_general_contractor.full_address %}
{% else%}
{% field_li "General contractor organization" item.associated_file.general_contractor.attached_to.full_address %}
{% endif %}
</ul>
{% field "Abstract" item.abstract "<pre>" "</pre>" %}
{% field "Comment" item.comment "<pre>" "</pre>" %}
{% if not next %}
{% if item.towns.count %}
<h3>{% trans "Localisation"%}</h3>
<ul class='form-flex'>
{% field_li_multiple "Towns" item.towns %}
{% field_li "Main address" item.associated_file.address %}
{% field_li "Complement" item.associated_file.address_complement %}
{% field_li "Postal code" item.associated_file.postal_code %}
</ul>
{% endif %}
{% if item.right_relations.count %}
<h3>{% trans "Relations"%}</h3>
{% for rel in item.right_relations.all %}
{% ifchanged rel.relation_type %}
{% if forloop.counter0 %}</ul>{% endif %}
<h4>{{rel.relation_type}}</h4><ul>{% endifchanged %}
<li><a href="#" onclick="load_window('/show-operation/{{rel.right_record.pk}}/');" class="display_details"><i class="fa fa-info-circle" aria-hidden="true"></i></a> {{rel.right_record}}</li>
{% if forloop.last %}</ul>{% endif %}
{% endfor %}
{% endif %}
{% if item.archaeological_sites.count %}
{% trans "Archaeological sites" as archaeologicalsites_label %}
{% table_archaeologicalsites archaeologicalsites_label item.archaeological_sites.all %}
{% endif %}
{% trans "Associated parcels" as parcels_label %}
{% include "ishtar/blocks/window_tables/parcels.html" %}
{% if item.administrative_act %}
<h3>{% trans "Administrative acts" %}</h3>
{% table_administrativact "" item.administrative_act.all %}
{% endif %}
{% trans "Document from this operation" as operation_docs %}
{% if item.source.count %}
{% dynamic_table_document operation_docs 'operation_docs' 'operation' item.pk '' output %}
{% endif %}
{% if item.context_record.count %}
<h3>{% trans "Context records" %}</h3>
{% dynamic_table_document '' 'context_records_for_ope' 'operation' item.pk 'TABLE_COLS_FOR_OPE' output %}
{% endif %}
{% trans "Documents from associated context records" as cr_docs %}
{% if item.context_record_docs_q.count %}
{% dynamic_table_document cr_docs 'context_records_docs' 'context_record__operation' item.pk '' output %}
{% endif %}
{% trans "Finds" as finds %}
{% if item.finds %}
{% dynamic_table_document finds 'finds_for_ope' 'base_finds__context_record__operation' item.pk 'TABLE_COLS_FOR_OPE' output %}
{% endif %}
{% trans "Documents from associated finds" as finds_docs %}
{% if item.find_docs_q.count %}
{% dynamic_table_document finds_docs 'finds_docs' 'find__base_finds__context_record__operation' item.pk '' output %}
{% endif %}
<h3>{% trans "Statistics" %}</h3>
<h4>{% trans "Administrative acts" %}</h4>
<ul class='form-flex'>
{% field_li "Number of administrative acts" item.nb_acts %}
{% field_li "Number of indexed administrative acts" item.nb_indexed_acts %}
</ul>
<h4>{% trans "Parcels" %}</h4>
<ul class='form-flex'>
{% field_li "Number of parcels" item.nb_parcels %}
</ul>
<h4>{% trans "Context records" %}</h4>
<ul class='form-flex'>
{% field_li "Number of context records" item.nb_context_records %}
</ul>
<ul class='form-flex'>
{% if item.nb_context_records_by_type %}
<li><table class='clean-table small'>
<tr><th>{% trans "Type" %}</th><th>{% trans "Number" %}</th></tr>
{% for label, nb in item.nb_context_records_by_type %}
<tr><td>{{label}}</td><td>{{nb}}</td></tr>
{% endfor %}
</table></li>
{% endif %}
{% if item.nb_context_records_by_periods %}
<li><table class='clean-table small'>
<tr><th>{% trans "Period" %}</th><th>{% trans "Number" %}</th></tr>
{% for label, nb in item.nb_context_records_by_periods %}
<tr><td>{{label}}</td><td>{{nb}}</td></tr>
{% endfor %}
</table></li>
{% endif %}
</ul>
<h4>{% trans "Finds" %}</h4>
<ul class='form-flex'>
{% field_li "Number of finds" item.nb_finds %}
</ul>
<ul class='form-flex'>
{% if item.nb_finds_by_material_type %}
<li><table class='clean-table small'>
<tr><th>{% trans "Material type" %}</th><th>{% trans "Number" %}</th></tr>
{% for label, nb in item.nb_finds_by_material_type %}
<tr><td>{{label}}</td><td>{{nb}}</td></tr>
{% endfor %}
</table></li>
{% endif %}
{% if item.nb_finds_by_types %}
<li><table class='clean-table small'>
<tr><th>{% trans "Object type" %}</th><th>{% trans "Number" %}</th></tr>
{% for label, nb in item.nb_finds_by_types %}
<tr><td>{{label}}</td><td>{{nb}}</td></tr>
{% endfor %}
</table></li>
{% endif %}
{% if item.nb_finds_by_periods %}
<li><table class='clean-table small'>
<tr><th>{% trans "Period" %}</th><th>{% trans "Number" %}</th></tr>
{% for label, nb in item.nb_finds_by_periods %}
<tr><td>{{label}}</td><td>{{nb}}</td></tr>
{% endfor %}
</table></li>
{% endif %}
</ul>
<h4>{% trans "Sources" %}</h4>
<ul class='form-flex'>
{% field_li "Number of sources" item.nb_documents %}
</ul>
<ul class='form-flex'>
{% if item.nb_documents_by_types %}
<li><table class='clean-table small'>
<tr><th>{% trans "Type" %}</th><th>{% trans "Number" %}</th></tr>
{% for label, nb in item.nb_documents_by_types %}
<tr><td>{{label}}</td><td>{{nb}}</td></tr>
{% endfor %}
</table></li>
{% endif %}
</ul>
{% if item.nb_stats_finds_by_ue %}
<h4>{% trans "Finds by context records" %}</h4>
<ul class='form-flex'>
{% field_li "Mean" item.nb_stats_finds_by_ue.mean %}
{% field_li "Min" item.nb_stats_finds_by_ue.min %}
{% field_li "Max" item.nb_stats_finds_by_ue.max %}
{% field_li "Mode" item.nb_stats_finds_by_ue.mode %}
</ul>
{% endif %}
{% endif %}
{% endblock %}
|