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

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

(limited to 'ishtar_common')

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