From 57e3b882f6021db354149ae6405b97f8d5c703de Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 15 Nov 2016 16:41:45 +0100 Subject: [PATCH] Bug 17624: [Follow-up] Consistency between Availability and Location Content-Type: text/plain; charset=utf-8 If OpacItemLocation is set to location, the opac results xslt shows something like: Availability: Copies available for loan: Library(1). Copies available for reference: Library(1). Location(s): Location_1 callnumber_1 Note that the reference item is not listed under Location, since the logic for that section is different. Simply stated: Available is created by two separate if statements, but Location is one if-else statement. This patch changes the Location logic to two if statements. In this process some single choose/when's are replaced by simple if's. Actually, the change is quite minimal. Test plan: [1] Set OPACXSLTResultsHideNFL to Show. Set OpacItemLocation to Location. [2] Use a biblio with two items. Put data in callnumber and location. Mark one item as not for loan. [3] Verify that you now see both items in the Location line of the search results. --- .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl index b1ea15f..63b944f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -1294,12 +1294,11 @@ ). - - + + Location(s): - - + @@ -1311,8 +1310,9 @@ . , - - + + + @@ -1324,11 +1324,10 @@ . , - - + + - - + -- 2.1.4