blob: c6f5d30565ae7abf28fefe4187c3ed89074bc622 (
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
|
{% extends "ishtar/sheet.html" %}
{% load i18n ishtar_helpers window_field from_dict link_to_window window_tables window_ope_tables window_header humanize %}
{% block head_title %}<strong>{% trans "Treatment request" %}</strong> - {{ item.name|default:"" }}{% endblock %}
{% block toolbar %}
{% window_nav item window_id 'show-treatmentfile' 'treatmentfile_modify' 'show-historized-treatmentfile' 'revert-treatmentfile' previous next 1 %}
{% endblock %}
{% block content %}
{% with perm_documents=permission_view_own_document|or_:permission_view_document %}
{% with has_documents=item|safe_or:"documents.count|documents_list" %}
{% with display_documents=perm_documents|and_:has_documents %}
<div class="clearfix">
<div class="card float-left col-12 col-md-6 col-lg-4">
{% include "ishtar/blocks/window_image.html" %}
<div class="card-body">
<div class="card-text">
<p class="window-refs">{{ item.name|default:"" }}</p>
{% if item.internal_reference %}
<p class="window-refs">{{ item.internal_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 request" %} ({{item.end_date}})</p>
{% else %}
<p class="window-refs">{% trans "Active" context "Treatment request" %}</p>
{% endif %}
</div>
</div>
</div>
{% with has_image=item.images.count %}
{% if not has_image %}
</div>
{% endif %}
<div class="row">
{% endwith %}
{% field_flex "Type" item.type %}
{% field_flex_detail "Responsible" item.in_charge %}
{% field_flex_detail "Associated basket" item.associated_basket %}
{% field_flex "Reception date" item.reception_date|date:"DATE_FORMAT" %}
{% field_flex "Start date" item.creation_date|date:"DATE_FORMAT" %}
{% field_flex "Closing date" item.end_date|date:"DATE_FORMAT" %}
{% field_flex_full "Comment" item.comment "<pre>" "</pre>" %}
{% include "ishtar/blocks/sheet_json.html" %}
</div>
</div>
{% if item.exhibition_name or item.exhibition_start_date or item.exhibition_end_date %}
<h3>{% trans "Exhibition" %}</h3>
<div class="row">
{% field_flex "Name" item.exhibition_name %}
{% field_flex "Start date" item.exhibition_start_date %}
{% field_flex "End date" item.exhibition_end_date %}
</div>
{% endif %}
{% if item.applicant %}
<h3>{% trans "Applicant" %}</h3>
<div class="row">
{% field_flex_detail "Name" item.applicant %}
{% field_flex_full "Contact" item.applicant.address_lbl %}
</div>
{% endif %}
{% if item.applicant_organisation %}
<h3>{% trans "Applicant organisation" %}</h3>
<div class="row">
{% field_flex_detail "Name" item.applicant_organisation %}
{% field_flex_full "Contact" item.applicant_organisation.address_lbl %}
</div>
{% endif %}
{% if item.treatments.count %}
{% trans "Treatments" as treatments %}
{% dynamic_table_document treatments 'treatments' 'file' item.pk '' output '' 'treatment' %}
{% endif %}
{% if display_documents %}
{% with permission_change_item=item|can_edit_item:request %}
{% include "ishtar/blocks/sheet_document_list.html" %}
{% endwith %}
{% endif %}
{% if item.administrative_act.count %}
{% trans "Administrative acts" as admact_lbl %}
{% table_administrativact admact_lbl item.administrative_act.all %}
{% 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 %}
{% endblock %}
|