summaryrefslogtreecommitdiff
path: root/archaeological_files/templates/ishtar/sheet_file.html
blob: dddae309b31b5ee8222469cb51d57f9ee3eb1b83 (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
{% extends "ishtar/sheet.html" %}
{% load i18n window_ope_tables %}

{% block head_sheet %}
{{block.super}}
<h1>{% trans "Archaeological file"%}</h1>
{% endblock %}

{% block content %}
{% if previous or next %}
<div class='tool'>
{%if previous%}
<a href="#" onclick='load_window("{% url show-historized-file item.pk previous|date:"c"%}");$("#{{window_id}}").hide();return false;'>{%trans "Previous version"%} ({{previous}})</a>
{% endif %}
{% if previous and next %} - {% endif %}
{%if next%}
<a href="#" onclick='if(confirm("{%trans "Are you sure to rollback to this version?"%}")){load_url("{% url revert-file item.pk item.history_date|date:"c"%}");closeAllWindows();load_window("{% url show-file item.pk None %}");}'>Rollback</a> -
<a href="#" onclick='load_window("{% url show-historized-file item.pk next|date:"c" %}");$("#{{window_id}}").hide();return false;'>{%trans "Next version"%} ({{next}})</a>
{% endif %}
</div>
{% endif %}
<div class='tool'>{%trans "Export as:"%} <a href='{% url show-file item.pk "odt" %}'>{%trans "OpenOffice.org file"%}</a>, <a href='{% url show-file item.pk "pdf" %}'>{%trans "PDF file"%}</a></div>
<div class='tool modify'><a href='{% url file_modify item.pk %}'>{% trans "Modify" %}</a></div>
<h3>{% trans "General"%}</h3>
<p><label>{%trans "Year:"%}</label> <span class='value strong'>{{ item.year }}</span></p>
{% if item.numeric_reference %}<p><label>{%trans "Numerical reference:"%}</label> <span class='value strong'>{{ item.numeric_reference }}</span></p>{% endif %}
{% if item.internal_reference %}<p><label>{%trans "Other reference:"%}</label> <span class='value'>{{ item.internal_reference }}</span></p>{% endif %}
{% if item.name %}
<p><label>{%trans "Name:"%}</label> <span class='value'>{{ item.name }}</span></p>
{% endif %}
<p><label>{%trans "Edition date:"%}</label> <span class='value'>{{ item.history_date }}</span></p> <!-- date = now -->
{% if item.reception_date %}<p><label>{%trans "Reception date:"%}</label> <span class='value'>{{ item.reception_date }}</span></p>{% endif %}
<p><label>{%trans "Creation date:"%}</label> <span class='value'>{{ item.creation_date }}</span></p>
<p><label>{%trans "Created by:"%}</label> <span class='value'>{{ item.created_by.full_label }}</span></p>
{% 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 %}

<p><label>{%trans "In charge:"%}</label> <span class='value'>{{ item.in_charge.full_label }}</span></p>
<p><label>{%trans "State:"%}</label> <span class='value'>{% if item.is_active %}{%trans "Active file"%}</span></p>
{% else %}{%trans "Closed file"%}</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.file_type }}</span></p>

{% if item.related_file %}<p><label>{%trans "Related file:"%}</label> <span class='value'><a href='#' onclick='load_window("{% url show-file item.related_file.pk ''%}")'>{{ item.related_file }}</a></span></p>{% endif %} <!-- Displayed as Year/index/Commune/Common_name This should be a link to the file sheet of the related file -->
{% 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.address %}
<p><label>{%trans "Main address:"%}</label> <span class='value'>{{ item.address }}</span></p>
{% if item.address_complement %}<p><label>{%trans "Complement:"%}</label> <span class='value'>{{ item.address_complement }}</span></p>{%endif%}
{% if item.postal_code %}<p><label>{%trans "Postal code:"%}</label> <span class='value'>{{ item.postal_code }}</span></p>{%endif%}
{% endif %}
{% if item.total_surface %}<p><label>{%trans "Surface:"%}</label> <span class='value'>{{ item.total_surface }} m<sup>2</sup> ({{ item.total_surface_ha }} ha)</span></p>{%endif%}


{% if item.is_preventive %}

<h3>{% trans "Preventive archaelogical file"%}</h3>
<p><label>{%trans "Developed surface:"%}</label> <span class='value'>{{ item.total_developed_surface }} m<sup>2</sup> ({{ item.total_developed_surface_ha }} ha)</span></p>
<p><label>{%trans "Saisine type:"%}</label> <span class='value'>{{ item.saisine_type }}</span></p>
{% if item.town_planning_service %}<p><label>{%trans "Town planning service:"%}</label> <span class='value'>{{ item.town_planning_service }}</span></p>{% endif %}
{% if item.permit_type %}<p><label>{%trans "Permit type:"%}</label> <span class='value'>{{ item.permit_type }}</span></p>{% endif %}
{% if item.permit_reference %}<p><label>{%trans "Permit reference:"%}</label> <span class='value'>{{ item.permit_reference }}</span></p>{% endif %}
{% if item.general_contractor.attached_to %}<p><label>{%trans "General contractor organisation:"%}</label> <span class='value'>{{ item.general_contractor.attached_to }}</span></p>{% endif %} <!-- Contractor's organisation displayed as concat of Name/Adress/postal_code/city -->
{% if item.general_contractor %}<p><label>{%trans "General contractor:"%}</label> <span class='value'>{{ item.general_contractor.full_label }}</span></p>{% endif %}

{%else%}

<h3>{% trans "Research archaeology"%}</h3>
{% if item.departments.count %}<p><label>{%trans "Departments"%}{%trans ":"%}</label> <span class='value'>{% for department in item.departments.all %}{% if forloop.counter0 %}, {% endif %}{{ department }}{% endfor %}</span></p>{% endif %}
{% if item.scientist %}<p><label>{%trans "Head scientist"%}{%trans ":"%}</label> <span class='value'>{{ item.scientist }}</span></p>{% endif %}
{% if item.requested_operation_type %}<p><label>{%trans "Requested operation type"%}{%trans ":"%}</label> <span class='value'>{{ item.requested_operation_type }}</span></p>{% endif %}
{% if item.organization %}<p><label>{%trans "Organization"%}{%trans ":"%}</label> <span class='value'>{{ item.organization }}</span></p>{% endif %}
{% if item.cira_advised != None %}<p><label>Passage en CIRA</label> <span class='value'>{{ item.cira_advised|yesno }}</span></p>{% endif %}
{% if item.mh_register != None %}<p><label>Sur Monument Historique classé</label> <span class='value'>{{ item.mh_register|yesno }}</span></p>{% endif %}
{% if item.mh_listing != None %}<p><label>Sur Monument Historique inscrit</label> <span class='value'>{{ item.mh_listing|yesno }}</span></p>{% endif %}
{% if item.classified_area != None %}<p><label>{% trans "Classified area"  %}</label> <span class='value'>{{ item.classified_area|yesno }}</span></p>{% endif %}
{% if item.protected_area != None %}<p><label>{% trans "Protected area"  %}</label> <span class='value'>{{ item.protected_area|yesno }}</span></p>{% endif %}
{% if item.research_comment %}<p><label>{%trans "Comment"%}{%trans ":"%}</label> <span class='value'>{{ item.research_comment }}</span></p>{% endif %}

{% endif %}

<table>
  <caption>{%trans "Associated parcels"%}</caption>
  <tr>
    <th>{% trans "Town" %}</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>

{% trans "Administrativ acts" as administrativeacts_label %}
{% table_administrativact administrativeacts_label item.administrative_act.all %}

<table>
  <caption>{%trans "Associated operations"%}</caption>
  <tr>
    <th>{% trans "Year" %}</th>
    <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'>&nbsp;</th>
  </tr>
  {% for operation in item.operations.all %}
  <tr>
    <td>{{operation.year}}</td>
    <td>{{operation.operation_code}}</td>
    <td>{{operation.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 ''%}")'>{% trans "Details" %}</a></td>
  </tr>
  {% empty %}
  <tr><td colspan="8" class='no_items'>{% trans "No operation associated to this archaelogical file" %}</td></tr>
  {% endfor %}
</table>

<table>
  <caption>{%trans "Admninistrative acts linked to associated operations"%}</caption>
  <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>
{% endblock %}