From df5684379d3122f3ebb4b660ae1ea2d1977a6c8e Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 29 Jun 2021 12:22:18 +0000 Subject: [PATCH] Bug 26302: (follow-up) Handle zero callnumbers-case Content-Type: text/plain; charset=utf-8 As David observed while testing, we should differentiate between the pref value 1 and 0 (or undef). This patch does no longer convert the value to 1 as default. And it removes an empty [ Call number: ] suffix. Test plan: Set resultsMaxItems or ..Unavailable to zero and check search results. Verify that you see something like: Availability: Items available for loan: Centerville (3) . Items available for reference: Centerville Staff Collection (1) . Not available: TEST (2). MOVING (1). Withdrawn (2). Signed-off-by: Marcel de Rooy --- C4/XSLT.pm | 1 - .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 716bdc10c5..3d0ac08270 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -177,7 +177,6 @@ sub get_xslt_sysprefs { OpenURLText OPACShowMusicalInscripts OPACPlayMusicalInscripts / ) { my $sp = C4::Context->preference( $syspref ); - $sp ||= 1 if $syspref eq 'resultsMaxItems'; # needs default next unless defined($sp); $sysxml .= "$sp\n"; } diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl index 35b3eeb3e4..96142b5785 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -1281,7 +1281,7 @@ - + Call number: @@ -1309,7 +1309,7 @@ ( ) - + Call number: @@ -1335,7 +1335,7 @@ ( ) - + Call number: @@ -1379,7 +1379,7 @@ ( ) - + Call number: -- 2.20.1