From b10f22d30b52a59a6e4b239387d3e3c421cc3e59 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 15 Nov 2024 11:19:00 -0100 Subject: [PATCH] Bug 38441: Style updates for staffnotes - Use pre for staffnotes in staff illview - Ensure
 has same font-family as rest of the page
- Render html for staff notes in list. Truncate to 100 chars max
---
 koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss      | 4 ++++
 koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 2 +-
 koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js           | 6 +++++-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
index d8a1d8aca37..21cb1a51378 100644
--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
@@ -3918,6 +3918,10 @@ input.renew {
             max-height: 70vh;
         }
     }
+
+    pre {
+        font-family: inherit;
+    }
 }
 
 .ill-view-panel {
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
index 3e5d139aa30..7a4fffe2d81 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
@@ -659,7 +659,7 @@
                             [% IF request.notesstaff %]
                                 
  • Staff notes: -

    [% request.notesstaff | $raw %]

    +
    [% request.notesstaff | $raw %]
  • [% END %] [% IF request.notesopac %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js index 0fc313a2213..5bb38ed9e70 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js +++ b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js @@ -454,7 +454,11 @@ $(document).ready(function () { data: "staff_notes", orderable: true, render: function (data, type, row, meta) { - return escape_str(data); + if (data?.length > 100) { + data = data.substr(0, 100) + "..."; + } + + return data; }, }, { -- 2.39.5