summaryrefslogtreecommitdiff
path: root/archaeological_finds/templates/ishtar/sheet_treatment.html
blob: 21f0e537079a3af97345a6de0250612401be641d (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
{% extends "ishtar/sheet.html" %}
{% load i18n window_field from_dict link_to_window window_tables window_ope_tables window_header humanize %}

{% block head_title %}<strong>{% trans "Treatment" %}</strong> - {{ item.label|default:"" }}{% endblock %}

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

{% block content %}

<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">
                <p class="card-text">
                    <p class="window-refs">{{ item.label|default:"" }}</p>
                    {% if item.other_reference %}
                    <p class="window-refs">{{ item.other_reference }}</p>{% endif %}
                    <p class="window-refs">{{ item.year }} - {{ item.index }}</p>
                    {% if item.external_id %}
                    <p class="window-refs">{{ item.external_id }}</p>{% endif %}
                    {% if item.end_date %}
                    <p class="window-refs">{% trans "Closed" context "Treatment" %} ({{item.end_date}})</p>
                    {% else %}
                    <p class="window-refs">{% trans "Active" context "Treatment" %}</p>
                    {% endif %}
                    </p>
            </div>
        </div>
    </div>
</div>

<div class="row">
    {% field_flex_multiple "Treatment type" item.treatment_types %}
    {% field_flex "State" item.treatment_state %}
    {% field_flex_detail "Associated request" item.file %}
    {% field_flex "Location" item.location %}
    {% field_flex "Container" item.container %}
    {% field_flex "Responsible" item.person %}
    {% field_flex "Organization" item.organization %}
    {% field_flex "Start date" item.start_date %}
    {% field_flex "Closing date" item.end_date %}
    {% field_flex "Estimated cost" item.estimated_cost|intcomma '' " "|add:CURRENCY %}
    {% field_flex "Quoted cost" item.quoted_cost|intcomma '' " "|add:CURRENCY %}
    {% field_flex "Realized cost" item.realized_cost|intcomma '' " "|add:CURRENCY %}
    {% field_flex "Insurance cost" item.insurance_cost|intcomma '' " "|add:CURRENCY %}
    {% field_flex_full "Comment" item.comment "<pre>" "</pre>" %}
    {% field_flex_full "Description" item.description "<pre>" "</pre>" %}
    {% field_flex_full "Goal" item.goal "<pre>" "</pre>" %}

    {% include "ishtar/blocks/sheet_json.html" %}
</div>

{% trans "Upstream finds" as finds %}
{% if item.upstream.count %}
{% dynamic_table_document finds 'finds_for_treatment' 'downstream_treatment' item.pk 'TABLE_COLS_FOR_OPE' output %}
{% endif %}

{% trans "Downstream finds" as finds %}
{% if item.downstream.count %}
{% dynamic_table_document finds 'finds_for_treatment' 'upstream_treatment' item.pk 'TABLE_COLS_FOR_OPE' output %}
{% endif %}

{% trans "Related operations" as related_operations %}
{% dynamic_table_document related_operations 'operations' 'related_treatment' item.pk 'TABLE_COLS' output %}

{% if item.source.count %}
{% trans "Associated documents" as associated_docs %}
{% dynamic_table_document associated_docs 'treatments_docs' 'treatment' item.pk '' output %}
{% endif %}

{% if item.administrative_act.count %}
{% trans "Administrative acts" as admact_lbl %}
{% table_administrativact admact_lbl item.administrative_act.all %}
{% endif %}

{% endblock %}