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

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

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


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

        <h4 class="col-12">{% trans "Identification" %}</h4>
        <div class="col-12 col-md-6 col-lg-3 flex-wrap">
            <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 %}
</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 %}
    {% 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>
<div class="row">
</div>

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

{% block related %}
{% if item.has_related %}
<h2>{% trans "Related items" %}</h2>
{% field_flex_full "Files" item.files|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 %}

{% endblock %}
{% endblock %}