summaryrefslogtreecommitdiff
path: root/archaeological_operations/templates/ishtar/sheet_site.html
blob: 1de4c367ff6ebab23fb7d959e2e120485d4a81ac (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
{% extends "ishtar/sheet.html" %}
{% load i18n ishtar_helpers window_tables window_header window_ope_tables window_field from_dict %}

{% block head_title %}<strong>{{SITE_LABEL}}</strong> - {{item.cached_label}}{% endblock %}

{% block toolbar %}
{% window_nav item window_id 'show-site' 'site_modify' 'show-historized-site' 'revert-site' previous next 1 %}
{% endblock %}

{% block content %}
{# trick to set to null non existing variable #}
{% with permission_view_own_archaeologicalsite=permission_view_own_archaeologicalsite %}

{% with can_change=permission_change_own_archaeologicalsite|or_:permission_change_archaeologicalsite %}
{% with dating_list=item|m2m_listing:"datings" %}
{% with permission_change_own_geovectordata=permission_change_own_geovectordata %}
{% with permission_change_geovectordata=permission_change_geovectordata %}

{% with permission_change_geo=permission_change_own_geovectordata|or_:permission_change_geovectordata %}

<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="row">
                <div class="col main">
                    {{item.reference}}
                    {{item.name|default:''}}
                    {% if item.complete_identifier %}<p class="window-refs"
                        title="{% trans 'Complete identifier' %}">
                        <strong>{{ item.complete_identifier }}</strong></p>{% endif %}
                    <p class="col text-muted">
                        {% include "ishtar/blocks/sheet_external_id.html" %}
                    </p>
                </div>
            </div>
            <p class="card-text">
            </p>
        </div>
      </div>
    </div>
</div>

<h3>{% trans "General"%}</h3>

<div class="row">
    {% field_flex _("Other reference") item.other_reference %}
    {% field_flex_multiple_obj _("Heritage interest") item 'heritage_interests' %}
    {% field_flex_detail_multiple _("Actors") item.actors %}
    {% field_flex_detail_multiple _("Collaborators") item.collaborators %}
    {% if item.description == item.public_description %}
    {% field_flex_full _("Description/Public description") item.description "<pre>" "</pre>" %}
    {% else %}
    {% field_flex_full _("Description") item.description "<pre>" "</pre>" %}
    {% field_flex_full _("Public description") item.public_description "<pre>" "</pre>" %}
    {% endif %}
    {% field_flex_full _("Comment") item.comment "<pre>" "</pre>" %}
</div>
{% if item.cached_periods or dating_list %}
    <h3>{% trans "Periods / Datings" %}</h3>
    {% field_flex_multiple_obj _("Periods") item 'periods' %}
    {% with url_dating="site-dating" %}
    {% include "ishtar/blocks/sheet_dating_list.html" %}
    {% endwith %}
{% endif %}
{% if item.cached_types or item.nature_of_site or item.interpretation_level or item.discovery_status or item.cached_current_states or item.cached_periods or item.cached_remains or item.cultural_attributions.count or item.discoverer %}
<h3>{% trans "Scientific" %}</h3>
<div class="row">
    {% field_flex_multiple_obj _("Types") item 'types' %}
    {% field_flex _("Nature of site") item.nature_of_site %}
    {% field_flex _("Interpretation level") item.interpretation_level %}
    {% field_flex _("Discovery status") item.discovery_status %}
    {% field_flex_multiple_obj _("Current states") item 'current_states' %}
    {% field_flex_multiple_obj _("Periods") item 'periods' %}
    {% field_flex_multiple_obj _("Remains") item 'remains' %}
    {% field_flex_multiple_obj _("Cultural attributions") item 'cultural_attributions' %}
    {% field_flex_detail _("Discoverer") item.discoverer %}
</div>
{% endif %}
{% if item.cached_heritage_environmental_protections or item.details_on_protection or item.protection_id or item.protection_date %}
<h3>{% trans "Protection" %}</h3>
<div class="row">
    {% field_flex _("Protection ID") item.protection_id %}
    {% field_flex _("Protection date") item.protection_date|date:"DATE_FORMAT" %}
    {% field_flex_multiple_obj _("Heritage and environmental protections") item 'heritage_environmental_protections' %}
    {% field_flex_full _("Details on protection") item.details_on_protection "<pre>" "</pre>" %}
</div>
{% endif %}

{% if item.affmar_number or item.drassm_number or item.oceanographic_service_localisation or item.shipwreck_code or item.sinking_date or item.discovery_area or item.shipwreck_name %}
<h3>{% trans "Underwater"%}</h3>

<div class="row">
    {% field_flex "Numéro AffMar" item.affmar_number %}
    {% field_flex "Numéro DRASSM" item.drassm_number %}
    {% field_flex "Shipwreck name" item.shipwreck_name %}
    {% field_flex "Shipwreck code" item.shipwreck_code %}
    {% field_flex "Sinking date" item.sinking_date %}
    {% field_flex_full "Discovery area" item.discovery_area "<pre>" "</pre>" %}
    {% field_flex_full "Oceanographic service localisation" item.oceanographic_service_localisation "<pre>" "</pre>" %}
</div>
{% endif %}

{% if item.x or item.towns.count or item|m2m_listing:'towns' or item.locality_ngi or item.locality_cadastral %}
<h3>{% trans "Geographic localisation" %}</h3>
<div class="row">
    {% with geo_item=item %}
    {% include "ishtar/blocks/sheet_map.html"%}
    {% endwith %}
</div>
<div class="row">
    {% if next %}
    {% field_flex_full "Towns" item|m2m_listing:'towns'|join:" ; "  %}
    {% else %}
    {% field_flex_detail_multiple_full "Towns" item.towns %}
    {% endif %}
    {% field_flex_full _("Address") item.precise_locality "<pre>" "</pre>" %}
    {% field_flex_full "National Geographic Institute locality" item.locality_ngi "<pre>" "</pre>" %}
    {% field_flex_full "Cadastral locality" item.locality_cadastral "<pre>" "</pre>" %}
</div>
{% endif %}

{% include "ishtar/blocks/sheet_json.html" %}

{% trans "Operations" as operations %}
{% if item.operations.count and not item.operations_not_available %}
{% dynamic_table_document operations 'operations' 'archaeological_sites' item.pk '' output %}
{% endif %}

{% trans "Context records" as cr_label %}
{% if item.context_records.count and not item.context_record_not_available %}
{% dynamic_table_document cr_label 'context_records' 'archaeological_sites' item.pk '' output %}
{% endif %}

{% trans "Context records from operations" as cr_label %}
{% if item.operations_has_cr and not item.context_record_not_available %}
{% dynamic_table_document cr_label 'context_records' 'archaeological_sites_operations' item.pk '' output %}
{% endif %}

{% if item.finds.count and not item.finds_not_available %}
{% trans "Finds" as finds %}
{% dynamic_table_document finds 'finds' 'base_finds__context_record__archaeological_site' item.pk '' output %}
{% endif %}

{% trans "Documents" as docs %}
{% if permission_view_own_document or permission_view_document %}
{% if item.documents.count and not item.documents_not_available %}
{% dynamic_table_document docs 'documents' 'sites' item.pk '' output %}
{% endif %}
{% endif %}

{% if not is_external and SHOW_GEO %}
<h3>{% trans "Geographic data" %}</h3>
{% with geo_item=item %}{% include "ishtar/blocks/sheet_geographic.html" %}{% endwith %}
{% endif %}

{% if not is_external %}
{% if item.history_creator or item.last_edition_date or item.created %}
<h3>{% trans "Sheet"%}</h3>
<div class="row">
    {% include "ishtar/blocks/sheet_creation_section.html" %}
</div>
{% endif %}
{% endif %}

{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}
{% endblock %}