summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/sheet_document.html
blob: 5e74abe1cdab6e538faf747163ee1a7089c4fa71 (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
{% extends "ishtar/sheet.html" %}
{% load i18n window_field window_header link_to_window %}

{% block head_title %}<strong>{% trans "Document" %}</strong> - {{item.sheet_header}}{% endblock %}

{% block content %}
{% block window_nav %}
{% window_nav item window_id 'show-document' 'edit-document' %}
{% endblock %}


{% block general %}
{% if item.main_image or item.has_iframe %}
<div class="clearfix">
    <div class="card float-left col-12 col-md-4">
        {% include "ishtar/blocks/window_image.html" %}
        {{ item.get_iframe }}
    </div>
    <div class="row float-left col-12 col-md-6 col-lg-8 text-center">
{% else %}
    <div class="row">
{% endif %}
    {% 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 %}

        <h4 class="col-12">{% trans "Identification" %}</h4>
        <div class="col-12 col-md-6 col-lg-3 flex-wrap">
            {% if item.complete_identifier %}<p class="window-refs"
                       title="{% trans 'Complete identifier' %}">
            <strong>{{ item.complete_identifier }}</strong></p>{% endif %}
            <p class="window-refs"
                title="{% trans 'Reference' %}">{{ item.reference|default:"" }}</p>
            <p class="window-refs"
                title="{% trans 'Internal reference' %}">{{ item.internal_reference|default:"" }}</p>
          {% include "ishtar/blocks/sheet_external_id.html" %}
        </div>
        {% field_flex "Title" item.title %}
        {% field_flex "Type" item.source_type_html "" "" 1 %}
        {% include "ishtar/blocks/sheet_creation_section.html" %}

        {% if item.format_type or item.support_type or item.scale %}
        <h4 class="col-12">{% trans "Format" %}</h4>
        {% field_flex "Format" item.format_type %}
        {% field_flex "Support" item.support_type %}
        {% field_flex "Scale" item.scale %}
        {% endif %}

        {% if item.associated_file or item.associated_url or item.tags.count %}
        <h4 class="col-12">{% trans "Content" %}</h4>
        {% trans "File" context "Not directory" as file_label %}
        {% field_flex_file file_label item.associated_file %}
        {% trans "Web link" as weblink_label %}
        {% field_flex_url weblink_label item.associated_url %}
        {% field_flex_multiple_obj "Tags" item 'tags' %}
        {% endif %}

        {% if item.authors.count %}
        <h4 class="col-12">{% trans "Authors" %}</h4>
        {% field_flex_full "" item.authors|add_links:'person' %}
        {% endif %}
    </div>
{% if item.main_image or has_iframe %}
</div>
{% endif %}
<div class="row">

    {% if item.creation_date or item.receipt_date or item.receipt_date_in_documentation %}
    <h4 class="col-12">{% trans "Dates" %}</h4>
    {% field_flex "Creation date" item.creation_date|date:"DATE_FORMAT" %}
    {% field_flex "Receipt date" item.receipt_date|date:"DATE_FORMAT" %}
    {% field_flex "Receipt date in documentation" item.receipt_date_in_documentation|date:"DATE_FORMAT" %}
    {% endif %}

    {% if item.publisher or item.language or item.isbn or item.issn or item.licenses.count %}
    <h4 class="col-12">{% trans "Publishing" %}</h4>
    {% field_flex_detail "Publisher" item.publisher %}
    {% field_flex "Language" item.language %}
    {% field_flex "ISBN" item.isbn %}
    {% field_flex "ISSN" item.issn %}
    {% field_flex_multiple_obj "Licenses" item 'licenses' %}
    {% endif %}

    {% if item.source or item.source_free_input %}
    <h4 class="col-12">{% trans "Source" %}</h4>
    {% field_flex_detail "Source" item.source %}
    {% field_flex "" item.source_free_input %}
    {% field_flex_detail "Pages" item.source_page_range %}
    {% endif %}

    {% if item.container or item.container_ref or item.item_number != 1 or item.duplicate %}
    <h4 class="col-12">{% trans "Container" %}</h4>
    {% field_flex_detail "Container" item.container 2 %}
    {% field_flex_detail "Reference container" item.container_ref 2 %}
    {% if item.item_number != 1 %}{% field_flex "Item number" item.item_number %}{% endif %}
    {% if item.duplicate %}{% field_flex "Has a duplicate" item.duplicate %}{% endif %}
    {% endif %}

    {% if item.description or item.comment or item.additional_information %}
    <h4 class="col-12">{% trans "Other" %}</h4>
    {% field_flex_full "Description" item.description %}
    {% field_flex_full "Comment" item.comment %}
    {% field_flex_full "Additional information" item.additional_information %}
    {% endif %}
    </div>
</div>

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

{% block related %}
{% if item.has_related %}
<h3>{% trans "Related items" %}</h3>
{% field_flex_full "Files" item.files|add_links %}
{% field_flex_full "Administrative acts" item.administrativeacts|add_links %}
{% field_flex_full "Sites" item.sites|add_links %}
{% field_flex_full "Operations" item.operations|add_links %}
{% field_flex_full "Context records" item.context_records|add_links %}
{% field_flex_full "Finds" item.finds|add_links %}
{% field_flex_full "Treatments" item.treatments|add_links %}
{% field_flex_full "Treatment files" item.treatment_files|add_links %}
{% field_flex_full "Warehouses" item.warehouses|add_links %}
{% field_flex_full "Containers" item.containers|add_links %}
{% endif %}
{{ item.coins_tag|default:""|safe }}
{% endblock %}

{% if item.children.count %}
<h3>{% trans "Associated documents" %}</h3>
<div class="row">
    {% field_flex_full "" item.children|add_links %}
</div>
{% endif %}

{% endblock %}
{% endblock %}