summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-11-30 17:22:14 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:21 +0100
commitfc3f77b2db29391ce1340c535a02b7a32583caa7 (patch)
tree8e11704684e46825b997518385263fde8df651d4 /ishtar_common/templates
parentd3c393b0ed29b361d3f052a1437201ac917ae711 (diff)
downloadIshtar-fc3f77b2db29391ce1340c535a02b7a32583caa7.tar.bz2
Ishtar-fc3f77b2db29391ce1340c535a02b7a32583caa7.zip
Documents: add pages fields to related source
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/ishtar/sheet_document.html24
1 files changed, 20 insertions, 4 deletions
diff --git a/ishtar_common/templates/ishtar/sheet_document.html b/ishtar_common/templates/ishtar/sheet_document.html
index e01d0d9fb..0497e7f5a 100644
--- a/ishtar_common/templates/ishtar/sheet_document.html
+++ b/ishtar_common/templates/ishtar/sheet_document.html
@@ -1,7 +1,7 @@
{% extends "ishtar/sheet.html" %}
{% load i18n window_field window_header link_to_window %}
-{% block head_title %}<strong>{% trans "Document" %}</strong> {% if item.complete_identifier %} - {{item.complete_identifier}}{% endif %} - {{item.title}}{% endblock %}
+{% block head_title %}<strong>{% trans "Document" %}</strong> - {{item.sheet_header}}{% endblock %}
{% block content %}
{% block window_nav %}
@@ -20,6 +20,16 @@
{% 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">
@@ -82,6 +92,7 @@
<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 %}
@@ -100,14 +111,12 @@
{% endif %}
</div>
</div>
-<div class="row">
-</div>
{% include "ishtar/blocks/sheet_json.html" %}
{% block related %}
{% if item.has_related %}
-<h2>{% trans "Related items" %}</h2>
+<h3>{% trans "Related items" %}</h3>
{% field_flex_full "Files" item.files|add_links %}
{% field_flex_full "Sites" item.sites|add_links %}
{% field_flex_full "Operations" item.operations|add_links %}
@@ -121,5 +130,12 @@
{{ 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 %}