summaryrefslogtreecommitdiff
path: root/archaeological_finds/templates/ishtar/blocks/sheet_statement_condition.html
blob: a127648c36b90a9671b38c6d90a657c6f6e2e277 (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
{% load i18n l10n window_field %}
{% with window_id|add:"-statement-"|add:statement_condition.pk_str as document_window_id %}
<div class="p-2{% if even %} odd{% endif %}">
    <div class="row">
        <div class="offset-md-2 col-md-8">
            <h4>
            {{statement_condition.statement_condition_type.full_label}} - {{statement_condition.date|date:"SHORT_DATE_FORMAT"}} ({{statement_condition.applied_label|lower}})
            </h4>
        </div>
        {% if PROFILE.statement_condition and can_change %}
        <div class="col-md-2 text-right">
          <div class="btn-group btn-group-sm" role="group" aria-label="Actions">
            {% if statement_condition.applied == "D" %}
            <a class="btn-qa btn btn-success" href="#" data-target="{% url 'find-statement-condition-modify' item.pk statement_condition.pk %}" title="{% trans 'Modify' %}">
                <i class="fa fa-pencil"></i>
            </a>
            {% endif %}
            <a class="wait-button btn btn-success" href="/document/create/?statementcondition={{statement_condition.pk}}" title="Ajouter un document / une image">
                <i class="fa fa-plus"></i> doc./image
            </a>
            {% if statement_condition.applied == "D" %}
            <a class="btn btn-danger wait-button" href="#" data-target="{% url 'find-statement-condition-delete' statement_condition.pk %}" title="{% trans 'Delete' %}">
                <i class="fa fa-trash" aria-hidden="true"></i>
            </a>
            {% endif %}
          </div>
        </div>
        {% endif %}
    </div>

    {% if statement_condition.images.count %}
    <div class="clearfix">
    <div class="card float-left col-12 col-md-6 col-lg-4">
        {% with document_image=statement_condition %}
        {% include "ishtar/blocks/alt_window_image.html" %}
        {% endwith %}
    </div>
    {% endif %}

    <div class="row">
        {% field_flex _("Verification officer") statement_condition.verification_officer %}
        {% field_flex _("Campaign/observation number") statement_condition.campaign_number %}
        {% field_flex _("Report number") statement_condition.report_number %}
        {% field_flex_multiple_obj _("Follow-up actions") statement_condition "follow_up_actions" %}
        {% field_flex_full _("Observations") statement_condition.observations %}
    </div>
    {% if statement_condition.diff %}
    <hr>
    <div class="row">
        {% for label, value in statement_condition.diff.items %}
        <dl class="col-12 col-md-6 col-lg-3 flex-wrap">
            <dt>{{label}}</dt>
            <dd>{{value}}</dd>
        </dl>
        {% endfor %}
    </div>
    {% endif %}
    {% if statement_condition.images.count %}
    </div>
    {% endif %}
</div>
{% if statement_condition.images.count %}
<script type="text/javascript">{% localize off %}
jQuery(document).ready(function(){
    var lg = document.getElementById('lightgallery-{{document_window_id}}');
    lg.addEventListener('onAfterAppendSubHtml', function(e){
        $(".lg-sub-html").show();
        $(".lg-sub-html .close").click(function(){
            $(".lg-sub-html").hide();
        });
    }, false);
    lightGallery(lg);
});
{% endlocalize %}</script>
{% endif%}
{% endwith %}