From 84d81de7d95071e3bbea98b42f673dd908ff5a1c Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 20 Oct 2023 15:35:12 +0100 Subject: [PATCH] Bug 35119: Use page-section and bg-danger on biblio errors This patch uses the page-section and bg-danger classes to increase the prominence of bibliographic record errors in the staff client to encourage staff to fix such issues as soon as possible. We also output the actual encoding error in a
 block to maintain
the proper whitespacing of the errors themselves.. this makes it much
clearer which characters are the issues.

Test plan
1) Using ktd navigate to record 369
2) Note the display of an encoding warning at the top of the page
3) Apply the patch
4) Refresh the above page and note the stronger visual prominence of the
   error

Signed-off-by: David Nind 
Signed-off-by: Phil Ringnalda 
Signed-off-by: Nick Clemens 
---
 .../prog/en/modules/catalogue/detail.tt       | 28 ++++++++++---------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
index a3c08aa693..7fba55620b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
@@ -92,19 +92,6 @@
 [% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %]
 
 [% INCLUDE 'cat-toolbar.inc' %]
-    [% IF decoding_error %]
-        
- - There is an error with this bibliographic record, the view may be degraded. -
Error: [% decoding_error | html %]
-
- [% END %] - [% IF analytics_error %] -
- - There was an error searching for analytic records, please see the logs for details. -
- [% END %] [% IF ( ocoins ) %] @@ -115,6 +102,21 @@ [% ELSE %]
[% END %] + [% IF decoding_error || analytics_error %] +
+

Errors found

+ [% IF decoding_error %] +

Encoding errors

+

There is at least one encoding error with this bibliographic record, the view may be degraded.

+
[% decoding_error | html %]
+ [% END %] + [% IF analytics_error %] +

Analytics errors

+

There was an error searching for analytic records, please see the logs for details.

+ [% END %] +
+ [% END %] +
[% XSLTBloc | $raw %] -- 2.30.2