From 2b60991ced8d3a0d1aa36c0517a50a2e431b2fce Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 19 Aug 2020 16:52:13 +0200 Subject: [PATCH] Bug 21260: Create three main XSLT Availability segments XSLT changes: [1] Add an item count at the start. Also add variables for counting status available and reference. Use these vars in the corresponding 'blocks'. [2] Refine the No items-test with the new itemcount. [3] Combine the reallynotforloan block with the other statuses by refining (extending) its initial test. All if's are moved up into the former block but are unchanged. Result of these changes makes that the Availability line consists of three segments: 1 Available items, 2 Reference items, 3 Other statuses. Test plan: [1] Check a biblio without any items in the OAPC results. You should see the No items only here. [2] Check a biblio with one item checked out. You should see only the 'third' segment with Checked out(1). [3] Check a biblio with one available and a notforloan==1. You should see segment 1 and 2. Both listing item call numbers. [4] Check a biblio with one available and a notforloan==-1. You should see segment 1 and 3. Both listing item call numbers. (See also the following patch.) Signed-off-by: Marcel de Rooy Signed-off-by: ava li Signed-off-by: Martin Renvoize --- .../en/xslt/MARC21slim2OPACResults.xsl | 128 ++++++++++-------- 1 file changed, 71 insertions(+), 57 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl index d760b8be0b..b611865f2a 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -19,6 +19,8 @@ + + @@ -1248,8 +1250,11 @@ Availability: + + + - + @@ -1264,7 +1269,7 @@ No items available. - + Items available for loan: - + Items available for reference: @@ -1370,18 +1375,20 @@ - - - Not available: - - - + + + Not available: + + + + + ItemSummary - + @@ -1394,55 +1401,62 @@ ) . , - - - + + + + + + + Checked out ( + + ). + + + + + Withdrawn ( + + ). + + + + + Lost ( + + ). + + + + + Damaged ( + + ). + + + + + Pending hold ( + + ). + + + + + In transit ( + + ). + + + + + On hold ( + + ). + + + - - - - Checked out ( - - ). - - - - - Withdrawn ( - - ). - - - - Lost ( - - ). - - - - Damaged ( - - ). - - - - Pending hold ( - - ). - - - - In transit ( - - ). - - - - On hold ( - - ). - -- 2.20.1