summaryrefslogtreecommitdiff
path: root/archaeological_operations/templates/ishtar/sheet_administrativeact.html
blob: 843d5fc8dff356bcb43f76db1bb8cf4a53625336 (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
{% extends "ishtar/sheet.html" %}
{% load i18n window_header window_field window_tables link_to_window %}

{% block head_title %}<strong>{% trans "Administrative act" %}</strong> - {{item.full_ref}}{% endblock %}

{% block toolbar %}
{% if item.operation %}
{% window_nav item window_id 'show-administrativeact' 'operation_administrativeactop_modify' %}
{% endif %}
{% if item.associated_file %}
{% window_nav item window_id 'show-administrativeact' 'file_administrativeactfile_modify' %}
{% endif %}
{% if item.treatment %}
{% window_nav item window_id 'show-administrativeact' 'treatment_administrativeacttreatment_modify' %}
{% endif %}
{% if item.treatment_file %}
{% window_nav item window_id 'show-administrativeact' 'treatmentfile_administrativeacttreatmentfile_modify' %}
{% endif %}
{% endblock %}

{% block content %}

{% with pdf_attached=item.pdf_attached %}
{% if pdf_attached %}
<p class="text-center col-12 p-2">
    <a href="{{pdf_attached}}" target="_blank">
        {% trans "View PDF" %}
        <i class="fa fa-external-link" aria-hidden="true"></i>
    </a>
</p>
{% endif %}
{% endwith %}

<div class="clearfix">
    {% if item.images.count %}
    <div class="card float-left col-12 col-md-6 col-lg-4">
        {% include "ishtar/blocks/window_image.html" %}
    </div>
    {% endif %}
    <h3>{% trans "General"%}</h3>
    <div class="row">
        {% field_flex "Year" item.year %}
        {% field_flex "Index" item.index %}
        {% field_flex "Internal reference" item.ref_sra %}
        {% field_flex "Type" item.act_type %}
        {% field_flex "Object" item.act_object %}
        {% field_flex_detail "Signatory" item.signatory %}
        {% field_flex "Signature date" item.signature_date %}
        {% field_flex "In charge" item.in_charge %}
        {% field_flex "Archaeological preventive operator" item.operator %}
        {% field_flex_detail "Associated file" item.associated_file %}
        {% field_flex_detail "Operation" item.operation %}
        {% field_flex_detail "Treatment" item.treatment %}
        {% field_flex_detail "Treatment request" item.treatment_file %}

        {% if item.operation and item.operation.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.operation.surface }} m<sup>2</sup> ({{ item.operation.surface_ha }} ha)
            </dd>
        </div>
        {% endif %}
        {% field_flex_detail "Created by" item.history_creator.ishtaruser.person %}

        {% comment %}{% 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 %}
        {% endcomment %}
    </div>
</div>
    {% if item.documents.count %}
    <div class="row spacer">
        <div class="col-12">
            {% dynamic_table_document 'Documents' 'documents' 'administrativeacts' item.pk '' output %}
        </div>
    </div>
    {% endif %}

{% endblock %}