From fc3f77b2db29391ce1340c535a02b7a32583caa7 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 30 Nov 2020 17:22:14 +0100 Subject: Documents: add pages fields to related source --- ishtar_common/templates/ishtar/sheet_document.html | 24 ++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'ishtar_common/templates') 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 %}{% trans "Document" %} {% if item.complete_identifier %} - {{item.complete_identifier}}{% endif %} - {{item.title}}{% endblock %} +{% block head_title %}{% trans "Document" %} - {{item.sheet_header}}{% endblock %} {% block content %} {% block window_nav %} @@ -20,6 +20,16 @@ {% else %}
{% endif %} + {% with pdf_attached=item.pdf_attached %} + {% if pdf_attached %} +

+ + {% trans "View PDF" %} + + +

+ {% endif %} + {% endwith %}

{% trans "Identification" %}

@@ -82,6 +92,7 @@

{% trans "Source" %}

{% 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 %}
-
-
{% include "ishtar/blocks/sheet_json.html" %} {% block related %} {% if item.has_related %} -

{% trans "Related items" %}

+

{% trans "Related items" %}

{% 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 %} +

{% trans "Associated documents" %}

+
+ {% field_flex_full "" item.children|add_links %} +
+{% endif %} + {% endblock %} {% endblock %} -- cgit v1.2.3