From 8e04e4f155781a476f34c96589d7eca33a846204 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 26 Aug 2020 13:49:53 +0000 Subject: [PATCH] Bug 26302: OPAC XSLT Results: List variable number of itemcallnumbers Content-Type: text/plain; charset=utf-8 We define a local preference resultsMaxItems and add it to the xml passed to the results XSLT (in C4::XSLT). Instead of showing one item, we add this number of items for the available for loan and reference segments. Test plan: Play with the value of local pref resultsMaxItems. Check if it matches with displayed callnumbers. Try home and holdingbranch for results location. Signed-off-by: Marcel de Rooy --- C4/XSLT.pm | 2 ++ .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 41 +++++++++++++++++----- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index a3053bde23..dd2b0a851c 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -173,9 +173,11 @@ sub get_xslt_sysprefs { TrackClicks opacthemes IdRef OpacSuppression OPACResultsLibrary OPACShowOpenURL OpenURLResolverURL OpenURLImageLocation + resultsMaxItems 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 8ecbf32025..987fe8f389 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -37,6 +37,7 @@ + @@ -1255,7 +1256,13 @@ Call number: - , .. + + + + , + + , .. + @@ -1275,10 +1282,16 @@ ) - + Call number: - , .. - + + + + , + + , .. + + . @@ -1295,10 +1308,16 @@ ) - + Call number: - , .. - + + + + , + + , .. + + . @@ -1335,7 +1354,13 @@ Call number: - , .. + + + + , + + , .. + . , -- 2.11.0