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 <pre> 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 <david@davidnind.com>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2023-10-20 15:35:12 +01:00 committed by Tomas Cohen Arazi
parent 0e4e22c45c
commit 1cf43ec855
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -92,19 +92,6 @@
[% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %]
[% INCLUDE 'cat-toolbar.inc' %]
[% IF decoding_error %]
<div>
<span class="biberror">
There is an error with this bibliographic record, the view may be degraded.</span>
<span class="error"><br/> Error: [% decoding_error | html %]</span>
</div>
[% END %]
[% IF analytics_error %]
<div>
<span class="analytics_error">
There was an error searching for analytic records, please see the logs for details.</span>
</div>
[% END %]
[% IF ( ocoins ) %]
<!-- COinS / OpenURL -->
<span class="Z3988" title="[% ocoins | html %]"></span>
@ -115,6 +102,21 @@
[% ELSE %]
<div id="catalogue_detail_biblio" class="col-xs-12">
[% END %]
[% IF decoding_error || analytics_error %]
<div class="page-section bg-danger">
<h1>Errors found</h1>
[% IF decoding_error %]
<h2>Encoding errors</h2>
<p>There is at least one encoding error with this bibliographic record, the view may be degraded.</p>
<pre class="error">[% decoding_error | html %]</pre>
[% END %]
[% IF analytics_error %]
<h2>Analytics errors</h2>
<p>There was an error searching for analytic records, please see the logs for details.</p>
[% END %]
</div>
[% END %]
<div class="page-section">
[% XSLTBloc | $raw %]