From fe446a41c3ff945c94314bf64b5287bf4c3397d3 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 20 Jan 2023 17:08:54 +0100 Subject: PDF export: fix new line on
 blocks

---
 archaeological_finds/templates/ishtar/sheet_find.html       | 3 ++-
 ishtar_common/templates/ishtar/blocks/sheet_geographic.html | 4 ++--
 ishtar_common/views_item.py                                 | 3 +++
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html
index b4954b7e6..d72d26b12 100644
--- a/archaeological_finds/templates/ishtar/sheet_find.html
+++ b/archaeological_finds/templates/ishtar/sheet_find.html
@@ -543,10 +543,11 @@
   {% if not is_external and display_geo %}
   
+

{% trans "Geographic data" %}

{% for base_find in item.base_finds.all %} {% with geo_item=base_find %} -

{% if base_find.complete_identifier %}{{ base_find.complete_identifier }}{% else %}{{base_find.short_id}}{% endif %}

+

{% if base_find.complete_identifier %}{{ base_find.complete_identifier }}{% else %}{{base_find.short_id}}{% endif %}

{% with current_geolabel=base_find %} {% include "ishtar/blocks/sheet_geographic.html" %} {% endwith %} {% endwith %} diff --git a/ishtar_common/templates/ishtar/blocks/sheet_geographic.html b/ishtar_common/templates/ishtar/blocks/sheet_geographic.html index 8b6255f26..bad399ef2 100644 --- a/ishtar_common/templates/ishtar/blocks/sheet_geographic.html +++ b/ishtar_common/templates/ishtar/blocks/sheet_geographic.html @@ -26,7 +26,7 @@ {% if geo.origin %}{{ geo.origin }}{% else %}-{% endif %} {% if geo.provider %}{{ geo.provider }}{% else %}-{% endif %} {% if geo.comment %}{{ geo.comment }}{% else %}-{% endif %} - {% if permission_change_geo %} + {% if permission_change_geo and output != "ODT" and output != "PDF" %} {% if geo|can_edit_item:request %}{% else %}–{% endif %} @@ -34,7 +34,7 @@ {% endfor %} -{% if permission_change_geo %} +{% if permission_change_geo and output != "ODT" and output != "PDF" %} diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index f905d677c..531eef995 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -492,6 +492,9 @@ def show_item(model, name, extra_dct=None, model_for_perms=None): body{ font-family: Gentium } + pre { + white-space: pre-wrap; + } """ % (base_url + static("gentium/GentiumPlus-R.ttf")) ) -- cgit v1.2.3