blob: fd4c4d021c77efd4c866291be5673bd59ec2281c (
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
|
{% extends "ishtar/sheet.html" %}
{% load i18n %}
{% block content %}
<div class='tool'>{%trans "Export as:"%} <a href='{% url show-operation item.pk "odt" %}'>{%trans "OpenOffice.org file"%}</a>, <a href='{% url show-operation item.pk "pdf" %}'>{%trans "PDF file"%}</a></div>
<h3>{% trans "General"%}</h3>
{% if item.common_name %}<p><label>{%trans "Name:"%}</label> <span class='value'>{{ item.common_name }}</span></p>{% endif %}
<p><label>{%trans "Year:"%}</label> <span class='value'>{{ item.year }}</span></p>
{% if item.operation.operation_code %}<p><label>{%trans "Numerical reference:"%}</label> <span class='value'>{{ item.operation_code }}</span></p>{% endif %}
{% if item.code_patriarche %}<p><label>{%trans "Patriarche OA code:"%}</label> <span class='value'>{{ item.code_patriarche }}</span></p>{%else%}
<p class='alert'>{%trans "Patriarche OA code not yet recorded!"%}</p>{%endif%}
<p><label>{%trans "Edition date:"%}</label> <span class='value'>{{ item.history.all.0.history_date }}</span></p> <!-- date = now -->
{% if item.start_date %}<p><label>{%trans "Begining date:"%}</label> <span class='value'>{{ item.start_date }}</span></p>
<p><label>{%trans "Excavation end date:"%}</label> <span class='value'>{{ item.excavation_end_date|default:"-" }}</span></p>
{%endif%}
{% if item.in_charge %}<p><label>{%trans "Head scientist:"%}</label> <span class='value'>{{ item.in_charge.full_label }}</span></p>{%endif%}
<p><label>{%trans "State:"%}</label> <span class='value'>{% if item.is_active %}{%trans "Active file"%}</span></p>
{% else %}{%trans "Closed operation"%}</span></p>
<p><label>{%trans "Closing date:"%}</label> <span class='value'>{{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user }}</span></p>
{% endif %}
<p><label>{%trans "Type:"%}</label> <span class='value'>{{ item.operation_type }}</span></p>
{% if item.surface %}<p><label>{%trans "Surface:"%}</label> <span class='value'>{{ item.surface }} m<sup>2</sup> ({{ item.surface_ha }} ha)</span></p>{% endif %}
{% if item.cost %}<p><label>{%trans "Cost:"%}</label> <span class='value'>{{ item.cost }} €{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} €/m<sup>2</sup>){%endif%}</span></p>{%endif%}
{% if item.duration %}<p><label>{%trans "Duration:"%}</label> <span class='value'>{{ item.duration }} {%trans "Day"%}s</span></p>{%endif%}
<p><label>{%trans "Remains:"%}</label> <span class='value'>{{ item.remains.all|join:", " }}</span></p>
<p><label>{%trans "Periods:"%}</label> <span class='value'>{{ item.periods.all|join:", " }}</span></p>
{% if item.associated_file %}
<p><label>{%trans "Associated file:"%}</label> <span class='value'><a href='#' onclick='load_window("{% url show-file item.associated_file.pk ''%}")'>{{ item.associated_file }}</a></span></p><!-- Displayed as Year/index/Commune/Common_name This should be a link to the file sheet of the related file -->
{% if item.associated_file.is_preventive %}
{#{% if item.operator_reference_code %}<p><label>{%trans "Operator's reference code:"%}</label> <span class='value'>{{ item.operator_reference_code }}</span></p>{% endif %}#}
{% if item.associated_file.town_planning_service %}<p><label>{%trans "Town planning service:"%}</label> <span class='value'>{{ item.associated_file.town_planning_service }}</span></p>{% endif %}
{% if item.associated_file.permit_type %}<p><label>{%trans "Permit type:"%}</label> <span class='value'>{{ item.associated_file.permit_type }}</span></p>{% endif %}
{% if item.associated_file.permit_reference %}<p><label>{%trans "Permit reference:"%}</label> <span class='value'>{{ item.associated_file.permit_reference }}</span></p>{% endif %}
{% if item.associated_file.general_contractor.attached_to %}<p><label>{%trans "General contractor organisation:"%}</label> <span class='value'>{{ item.associated_file.general_contractor.attached_to }}</span></p>{% endif %} <!-- Contractor's organisation displayed as concat of Name/Adress/postal_code/city -->
{% if item.associated_file.general_contractor %}<p><label>{%trans "General contractor:"%}</label> <span class='value'>{{ item.associated_file.general_contractor.full_label }}</span></p>{% endif %}
{% endif %}
{% endif %}
{% if item.comment %}<p><label>{%trans "Comment:"%}</label> <span class='value'>{{ item.comment }}</span></p>{%endif%}
<h3>{% trans "Localisation"%}</h3>
<p><label>{%trans "Towns:"%}</label> <span class='value'>{{ item.towns.all|join:", " }}</span></p>
{% if item.associated_file.address %}<p><label>{%trans "Main address:"%}</label> <span class='value'>{{ item.associated_file.address }}</span></p>
{% if item.associated_file.address_complement %}<p><label>{%trans "Complement:"%}</label> <span class='value'>{{ item.associated_file.address_complement }}</span></p>{%endif%}
{% if item.associated_file.postal_code %}<p><label>{%trans "Postal code:"%}</label> <span class='value'>{{ item.associated_file.postal_code }}</span></p>{%endif%}
{%endif%}
{% comment %}
<p><label>{%trans "Lambert X:"%}</label> <span class='value'>{{ item.lambert_x }}</span></p>
<p><label>{%trans "Lambert Y:"%}</label> <span class='value'>{{ item.lambert_y }}</span></p>
<p><label>{%trans "Altitude (m NGF):"%}</label> <span class='value'>{{ item.altitude }}</span></p>
{% endcomment %}
<table>
<caption>{%trans "Associated parcels"%}</caption>
<tr>
<th>{% trans "Commune" %}</th>
<th>{% trans "Year" %}</th>
<th>{% trans "Section" %}</th>
<th>{% trans "Parcels" %}</th>
{#<th>{% trans "Owner" %}</th>#}
</tr>
{% for parcel in item.grouped_parcels %}
<tr>
<td class='string'>{{parcel.town}}</td>
<td>{{parcel.year}}</td>
<td>{{parcel.section}}</td>
<td>{{parcel.parcel_numbers|join:", "}}</td>
{#<td class='string'>{{operation.parcel.owner}}</td>#}
</tr>
{% empty %}
<tr><td colspan="4" class='no_items'>{% trans "No parcel associated to this operation" %}</td></tr>
{% endfor %}
</table>
<table>
<caption>{%trans "Administrative acts"%}</caption>
<tr>
<th>{% trans "Year" %}</th>
<th>{% trans "Ref." %}</th>
<th>{% trans "Type" %}</th>
<th>{% trans "Date" %}</th>
</tr>
{% for act in item.administrative_act.all %}
<tr>
<td>{{act.signature_date.year}}</td>
<td>{% if act.ref_sra %}{{act.ref_sra}}{% endif %}</td>
<td class='string'>{{act.act_type}}</td>
<td class="string">{{act.signature_date}}</td>
</tr>
{% empty %}
<tr><td colspan="4" class='no_items'>{% trans "No acts associated to this operation" %}</td></tr>
{% endfor %}
</table>
<h3>{% trans "Scientific documentation"%}</h3>
<table>
<caption>{%trans "Documents"%}</caption>
<tr>
<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 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}}'>{% trans "Link"%}</a>{% endif %}</td>
</tr>
{% empty %}
<tr><td colspan="4" class='no_items'>{% trans "No scientific document associated to this operation" %}</td></tr>
{% endfor %}
</table>
<table>
<caption>{%trans "Context records"%}</caption>
<tr>
<th>{% trans "ID" %}</th>
<th>{% trans "Type" %}</th>
<th>{% trans "Chronology" %}</th>
<th>{% trans "Description" %}</th>
<th>{% trans "Parcel" %}</th>
<th class='link'> </th>
</tr>
{% for context_record in item.context_record.all %}
<tr>
<td class='string'>{{ context_record.label }}</td>
<td class='string'>{{context_record.unit|default:""}}</td>
<td class='string'>{{ context_record.datings.all|join:", " }}</td>{# periods ?#}
<td class='string'>{{ context_record.description }}</td>
<td class='string'>{{ context_record.parcel.section }} - {{context_record.parcel.parcel_number}}</td>
<td class='link'><a href="#" onclick='load_window("{%url show-contextrecord context_record.pk ''%}")'>{% trans "Details" %}</a></td>
</tr>
{% empty %}
<tr><td colspan="6" class='no_items'>{% trans "No context record associated to this operation" %}</td></tr>
{% endfor %}
</table>
<div class='table'>
<table>
<caption>{%trans "Finds"%}</caption>
<tr>
<th>{% trans "Complete Id" %}</th>
<th>{% trans "Short Id" %}</th>
<th>{% trans "Material type" %}</th>
<th>{% trans "Context record" context "short"%}</th>
<th>{% trans "Periods" %}</th>
<th>{% trans "Description" %}</th>
<th>{% trans "Weight" %}</th>
<th>{% trans "Numbers" %}</th>
<th>{% trans "Parcel" %}</th>
<th>{% trans "Container ref." %}</th>
<th>{% trans "Warehouse" %}</th>
<th class='link'> </th>
</tr>
{% for context_record in item.context_record.all %}
{% for find in context_record.base_finds.all %}
<tr>
{# OPE|MAT.CODE|UE|FIND_index #}
<td class="ref">{{ find.complete_id|default:""}}</td>
{# OPE|FIND_index #}
<td class="ref">{{ find.short_id|default:"" }}</td>
<td class="string">{{ find.get_last_find.material_type|default:"" }}</td>
<td>{{find.context_record.label}}</td>
<td class='string'>{{ find.get_last_find.dating}}</td>{# TODO .all|join:", " ? #}
<td class='string'>{{ find.get_last_find.description }}</td>
<td>{{ find.get_last_find.weight|default:"" }}</td>
<td>{{ find.get_last_find.item_number }}</td>
<td class="ref">{{ context_record.parcel.short_label }}</td>
<td class='ref'>{{ find.get_last_find.container.reference|default:""}}</td>
<td class='string'>{{ find.get_last_find.container.location|default:""}}</td>
<td class='link'><a href="#">{% trans "Details" %}</a></td>
{#<a href="#" onclick='load_window("{% url show-find find.pk%}");'>{%trans "Details"%}</a></td>#}
</tr>
{% empty %}
<tr><td colspan="9" class='no_items'>{% trans "No find associated to context record" %} {{context_record.short_label}}</td></tr>
{% endfor %}
{% empty %}
<tr><td colspan="9" class='no_items'>{% trans "No find associated to parcel" %} {{parcel.short_label}} {% trans "(no context record)" %}</td></tr>
{% endfor %}
</table>
</div>
{% endblock %}
|