blob: d54d29e7e3f6f5ab6287c92f1afbd4bc0930f833 (
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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
|
{% extends "ishtar/sheet.html" %}
{% load i18n ishtar_helpers window_ope_tables window_field window_header window_tables %}
{% block head_title %}<strong>{% trans "Archaeological file" %}</strong> - {{item.full_internal_ref|default:''}}{% endblock %}
{% block toolbar %}
{% window_nav item window_id 'show-file' 'file_modify' 'show-historized-file' 'revert-file' previous next 1 %}
{% endblock %}
{% block content %}
{% with can_view_documents=permission_view_own_document|or_:permission_view_document %}
{% with has_documents=item.documents.count %}
{% with display_documents=can_view_documents|and_:has_documents %}
{% with has_costs=item.equipment_costs.count|or_:item.ground_jobs.count|or_:item.jobs.count %}
{% if output != "ODT" and output != "PDF"%}
<ul class="nav nav-tabs" id="{{window_id}}-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="{{window_id}}-general-tab"
data-toggle="tab" href="#{{window_id}}-general" role="tab"
aria-controls="{{window_id}}-general" aria-selected="false">
{% trans "General" %}
</a>
</li>
{% if has_costs %}<li class="nav-item">
<a class="nav-link" id="{{window_id}}-costs-tab"
data-toggle="tab" href="#{{window_id}}-costs" role="tab"
aria-controls="{{window_id}}-costs" aria-selected="false">
{% trans "Preventive" %}
</a>
</li>{% endif %}
</ul>
{% endif %}
<div class="tab-content" id="{{window_id}}-tab-content">
<div class="tab-pane fade show active" id="{{window_id}}-general"
role="tabpanel" aria-labelledby="{{window_id}}-general-tab">
<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">
<div class="card-text">
{% if item.complete_identifier %}<p class="window-refs"
title="{% trans 'Complete identifier' %}">
<strong>{{ item.complete_identifier }}</strong></p>{% endif %}
<p class='window-refs'>{{item.full_internal_ref|default:''}}</p>
<p class='window-refs'>{{item.internal_reference|default:''}}</p>
<p class='window-refs'>{{item.name|default:''}}</p>
{% include "ishtar/blocks/sheet_external_id.html" %}
</div>
</div>
</div>
</div>
</div>
<h3>{% trans "General"%}</h3>
<div class="row">
{% field_flex "Reception date" item.reception_date|date:"DATE_FORMAT" %}
{% include "ishtar/blocks/sheet_creation_section.html" %}
{% comment %}
{% if item.deadline_date and not item.acts %}
<p><label>{%trans "Deadline"%}</label> <span class='value'>{% item.deadline_date %}</span></p> <!-- calculated deadline for some preventive files , see saisine_type, not displayed if an act as been send -->
{% endif %}
{% endcomment %}
{% field_flex_detail "In charge" item.in_charge %}
<div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
<dt class="col-5">{%trans "State"%}</dt>
<dd class='col-7'>
{% if item.is_active %}{%trans "Active file"%}{% else %}{%trans "Closed file"%}{% endif %}
</dd>
</div>
{% if item.closing %}
<div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
<dt class="col-5">{%trans "Closing date"%}</dt>
<dd class='col-7'>
{{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user.full_label }}
</dd>
</div>
{% endif %}
{% field_flex "Type" item.file_type %}
{% field_flex_detail "Related file" item.related_file %}
{% field_flex_full "Comment" item.comment "<pre>" "</pre>" %}
</div>
{% include "ishtar/blocks/sheet_json.html" %}
<h3>{% trans "Localisation"%}</h3>
<div class="row">
{% field_flex_multiple_obj "Towns" item 'towns' %}
{% field_flex_multiple_obj "Departments" item 'departments' %}
{% field_flex "Main address" item.address %}
{% field_flex "Complement" item.address_complement %}
{% field_flex "Postal code" item.postal_code %}
{% if item.total_surface %}
<div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
<dt class="col-5">{%trans "Surface"%}</dt>
<dd class='col-7'>
{{ item.total_surface }} m<sup>2</sup> ({{ item.total_surface_ha }} ha)
</dd>
</div>
{% endif %}
</div>
{% if item.is_preventive %}
<h3>{% trans "Preventive archaeological file"%}</h3>
<div class="row">
{% if item.total_developed_surface %}
<div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
<dt class="col-5">{%trans "Developed surface"%}</dt>
<dd class='col-7'>
{{ item.total_developed_surface }} m<sup>2</sup> ({{ item.total_developed_surface_ha }} ha)</span></li>
</dd>
</div>
{% endif %}
{% field_flex "Saisine type" item.saisine_type %}
{% field_flex_detail "Responsible for planning service" item.responsible_town_planning_service %}
{% field_flex "Responsible for planning service address" item.responsible_town_planning_service.full_address %}
{% if item.town_planning_service %}
{% field_flex "Planning service organization" item.town_planning_service.full_address %}
{% else %}
{% field_flex "Planning service organization" item.responsible_town_planning_service.attached_to.full_address %}
{% endif %}
{% field_flex "Permit type" item.permit_type %}
{% field_flex "Permit reference" item.permit_reference %}
{% field_flex "Date of planning service file" item.planning_service_date|date:"DATE_FORMAT" %}
{% field_flex "General contractor" item.general_contractor.full_address %}
{% if item.corporation_general_contractor %}
{% field_flex "General contractor organization" item.corporation_general_contractor.full_address %}
{% else%}
{% field_flex "General contractor organization" item.general_contractor.attached_to.full_address %}
{% endif %}
</div>
{% else %}
<h3>{% trans "Research archaeology"%}</h3>
<div class="row">
{% field_flex_detail "Head scientist" item.scientist %}
{% field_flex "Requested operation type" item.requested_operation_type %}
{% field_flex_detail "Organization" item.organization %}
{% if item.cira_advised != None %}
{% field_flex "Passage en CIRA" item.cira_advised|yesno %}
{% endif %}
{% if item.mh_register != None %}
{% field_flex "Sur Monument Historique classé" item.mh_register|yesno %}
{% endif %}
{% if item.mh_listing != None %}
{% field_flex "Sur Monument Historique inscrit" item.mh_listing|yesno %}
{% endif %}
{% if item.classified_area != None %}
{% field_flex "Classified area" item.classified_area|yesno %}
{% endif %}
{% if item.protected_area != None %}
{% field_flex "Protected area" item.protected_area|yesno %}
{% endif %}
{% field_flex_full "Comment" item.research_comment "<pre>" "</pre>" %}
</div>
{% endif %}
{% if not next %}
{% trans "Associated parcels" as parcels_label %}
{% include "ishtar/blocks/window_tables/parcels.html" %}
{% trans "Administrative acts" as administrativeacts_label %}
{% table_administrativact administrativeacts_label item.administrative_act.all %}
<h3>{%trans "Associated operations"%}</h3>
<table class="table table-striped">
<tr>
<th>{% trans "Ref." %}</th>
<th>Code Patriarche</th>
<th>{% trans "Type" %}</th>
<th>{% trans "In charge" %}</th>
<th>{% trans "Start date" %}</th>
<th>{% trans "Excavation end date" %}</th>
<th class='link'> </th>
</tr>
{% for operation in item.operations.all %}
<tr>
<td>{{operation.year_index}}</td>
<td>{{operation.full_code_patriarche|default:""}}</td>
<td class='string'>{{operation.operation_type}}</td>
<td class='string'>{{operation.in_charge|default:""}}</td>
<td>{{operation.start_date|default:""}}</td>
<td>{{operation.excavation_end_date|default:""}}</td>
<td class='link'><a href="#" class='display_details'
onclick='load_window("{% url "show-operation" operation.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td>
</tr>
{% empty %}
<tr><td colspan="8" class='no_items'>{% trans "No operation associated to this archaeological file" %}</td></tr>
{% endfor %}
</table>
<h3>{%trans "Admninistrative acts linked to associated operations"%}</h3>
<table class="table table-striped">
<tr>
<th>{% trans "Year" %}</th>
<th>{% trans "Ref." %}</th>
<th>{% trans "Type" %}</th>
<th>{% trans "Date" %}</th>
</tr>
{% for act in item.operation_acts %}
<tr>
<td>{{act.signature_date.year}}</td>
<td>{{act.ref_sra}}</td>
<td class='string'>{{act.act_type}}</td>
<td>{{act.signature_date}}</td>
</tr>
{% empty %}
<tr><td colspan="4" class='no_items'>{% trans "No administrative act linked to operations" %}</td></tr>
{% endfor %}
</table>
{% endif %}
{% trans "Document for this archaeological file" as fle_docs %}
{% if permission_view_own_document or permission_view_document %}
{% if item.documents.count %}
{% dynamic_table_document fle_docs 'documents' 'files' item.pk '' output %}
{% endif %}
{% endif %}
</div>{% if has_costs %}
<div class="tab-pane fade show active" id="{{window_id}}-costs"
role="tabpanel" aria-labelledby="{{window_id}}-costs-tab">
<div class="row">
{% field_flex "Start date" item.start_date|date:"DATE_FORMAT" %}
{% field_flex "End date" item.end_date|date:"DATE_FORMAT" %}
{% field_flex "Ground start date" item.ground_start_date|date:"DATE_FORMAT" %}
{% field_flex "Ground end date" item.ground_end_date|date:"DATE_FORMAT" %}
{% field_flex "Study period" item.study_period %}
{% field_flex "Execution report date" item.execution_report_date|date:"DATE_FORMAT" %}
</div>
<div class="row">
{% if item.total_developed_surface %}
<dl class="col-12 col-lg-6 flex-wrap">
<dt>{%trans "Total developed surface"%}</dt>
<dd>
{{ item.total_developed_surface }} m<sup>2</sup> ({{ item.total_developed_surface_ha }} ha)
</dd>
</dl>
{% endif %}
{% if item.total_surface %}
<dl class="col-12 col-lg-6 flex-wrap">
<dt>{% trans "Surface" %}</dt>
<dd>
{{ item.total_surface }} m<sup>2</sup> ({{ item.total_surface_ha }} ha)
</dd>
</dl>
{% endif %}
</div>
<h3>{% trans "Human and technical requirements" %}</h3>
{% if item.ground_jobs.count %}
<div class="col-12">
<h4>{% trans "Ground jobs" %}</h4>
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Job" %}</th>
<th colspan="3">{% trans "Planned" %}</th>
<th colspan="3">{% trans "Effective" %}</th>
</tr>
<tr>
<td> </td>
<th>{% trans "Man by day" %}</th>
<th>{% trans "Days" %}</th>
<th>{% trans "Cost" %}</th>
<th>{% trans "Man by day" %}</th>
<th>{% trans "Days" %}</th>
<th>{% trans "Cost" %}</th>
</tr>
</thead>
{% for job in item.ground_jobs.all %}
<tr>
<td><em>{{job.job}}</em></td>
<td class="text-right">{{job.man_by_day_planned|default:"-"}}</td>
<td class="text-right">{{job.days_planned|default:"-"}}</td>
<td class="text-right">{{job.cost_planned|default:"-"|floatformat:2}}</td>
<td class="text-right">{{job.man_by_day_worked|default:"-"}}</td>
<td class="text-right">{{job.days_worked|default:"-"}}</td>
<td class="text-right">{{job.cost_worked|default:"-"|floatformat:2}}</td>
</tr>
{% endfor %}
<tr class="table-info">
<td><strong>{% trans "Total" %}</strong></td>
<td colspan="2"> </td>
<td class="text-right">
<strong>{{item.ground_job_cost_planned|default:"-"|floatformat:2}}</strong>
</td>
<td colspan="2"> </td>
<td class="text-right">
<strong>{{item.ground_job_cost_worked|default:"-"|floatformat:2}}</strong>
</td>
</tr>
<tr class="table-info">
<td><em>{% trans "Difference" %}</em></td>
<td colspan="5"> </td>
<td class="text-right">
<em>{{item.ground_job_cost_diff_planned_worked|default:"-"|floatformat:2}}</em>
</td>
</tr>
</table>
</div>
{% endif %}
{% if item.jobs.count %}
<div class="col-12">
<h4>{% trans "Post-excavation jobs" %}</h4>
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Job" %}</th>
<th colspan="3">{% trans "Planned" %}</th>
<th colspan="3">{% trans "Effective" %}</th>
</tr>
<tr>
<td> </td>
<th>{% trans "Man by day" %}</th>
<th>{% trans "Days" %}</th>
<th>{% trans "Cost" %}</th>
<th>{% trans "Man by day" %}</th>
<th>{% trans "Days" %}</th>
<th>{% trans "Cost" %}</th>
</tr>
</thead>
{% for job in item.jobs.all %}
<tr>
<td><em>{{job.job}}</em></td>
<td class="text-right">{{job.man_by_day_planned|default:"-"}}</td>
<td class="text-right">{{job.days_planned|default:"-"}}</td>
<td class="text-right">{{job.cost_planned|default:"-"|floatformat:2}}</td>
<td class="text-right">{{job.man_by_day_worked|default:"-"}}</td>
<td class="text-right">{{job.days_worked|default:"-"}}</td>
<td class="text-right">{{job.cost_worked|default:"-"|floatformat:2}}</td>
</tr>
{% endfor %}
<tr class="table-info">
<td><strong>{% trans "Total" %}</strong></td>
<td colspan="2"> </td>
<td class="text-right">
<strong>{{item.job_cost_planned|default:"-"|floatformat:2}}</strong>
</td>
<td colspan="2"> </td>
<td class="text-right">
<strong>{{item.job_cost_worked|default:"-"|floatformat:2}}</strong>
</td>
</tr>
<tr class="table-info">
<td><em>{% trans "Difference" %}</em></td>
<td colspan="5"> </td>
<td class="text-right">
<em>{{item.job_cost_diff_planned_worked|default:"-"|floatformat:2}}</em>
</td>
</tr>
</table>
</div>
{% endif %}
{% for service_type, cost_planned, cost_worked, diff, equipments in item.used_equipments %}
<div class="col-12">
<h4>{{service_type}}</h4>
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Equipment / service" %}</th>
<th colspan="4">{% trans "Planned" %}</th>
<th colspan="4">{% trans "Effective" %}</th>
</tr>
<tr>
<td> </td>
<th>{% trans "Quantity" %}</th>
<th colspan="2"> </th>
<th>{% trans "Cost" %}</th>
<th>{% trans "Quantity" %}</th>
<th colspan="2"> </th>
<th>{% trans "Cost" %}</th>
</tr>
</thead>
{% for equipment in equipments %}
{% if equipment.cost_planned or equipment.cost_worked %}
<tr>
<td><em>{{equipment.equipment_service_cost.equipment_service_type.label}}</em></td>
<td class="text-right">{{equipment.quantity_by_day_planned|default:"-"}}</td>
<td class="text-right">{{equipment.days_planned|default:"-"}}</td>
<td>{{equipment.equipment_service_cost.unit_label}}</td>
<td class="text-right">{{equipment.cost_planned|default:"-"|floatformat:2}}</td>
<td class="text-right">{{equipment.quantity_by_day_worked|default:"-"}}</td>
<td class="text-right">{{equipment.days_worked|default:"-"}}</td>
<td>{{equipment.equipment_service_cost.unit_label}}</td>
<td class="text-right">{{equipment.cost_worked|default:"-"|floatformat:2}}</td>
</tr>
{% endif %}
{% endfor %}
<tr class="table-info">
<td><strong>{% trans "Total" %}</strong></td>
<td colspan="3"> </td>
<td class="text-right"><strong>{{cost_planned|default:"-"|floatformat:2}}</strong></td>
<td colspan="3"> </td>
<td class="text-right"><strong>{{cost_worked|default:"-"|floatformat:2}}</strong></td>
</tr>
<tr class="table-info">
<td><em>{% trans "Difference" %}</em></td>
<td colspan="7"> </td>
<td class="text-right">
<em>{{diff|default:"-"|floatformat:2}}</em>
</td>
</tr>
</table>
</div>
{% endfor %}
</div>{% endif %}
</div>
{% endwith %} {% endwith %} {% endwith %}{% endwith %}
{% endblock %}
|