Koha/koha-tmpl/opac-tmpl/bootstrap/en/xslt
Marcel de Rooy ddce55a2aa Bug 26302: Refactor Availability block in OPAC results xslt
Decided finally to do a larger refactor here. Hopefully we improved
consistency and removed some redundancy. And the two new prefs provide
additional functionality.

Most significant changes:
[1] Clearer distinction of the Availability line in three parts:
    Available, Reference and Unavailable.
    For Unavailable we loop thru branches now too.
[2] Calling template to list item data (including location or ccode).
    Made the separate Location line obsolete.
[3] The tests around OPACItemLibrary are removed since we now look at
    resultbranch from XSLT.pm.
[4] Removed code replication for various 'other' statuses like Checked out.
[5] Obsoleted three xslt key indexes, singleBranchMode.
[6] Apply the two prefs to control number of listed items.

Test plan:
You may play with: OPACResultsLibrary (home/holding), OPACItemLocation
(library, callno, location, ccode), resultsMaxItems[Unavailable] (numbers),
Reference_NFL_Statuses (list of notforloan codes in reference part).

[1] Create a biblio with various items on a few branches. Fill call number,
    location and ccode too. Set home branch and holdingbranch differently.
[2] Toggle the preferences, and verify display within OAPC search results.

Example with prefs (home, callnumber, 2, 2):
Availability: Items available for loan: Centerville (2)Call number: perl A 4, PERL D 1. Items available for reference: Fairfield: Not For Loan (1)Call number: PERL A 5. Not available: Centerville: Checked out (1)Call number: PERL A 3. Centerville: Ordered (1)Call number: PERL B 1. Centerville: Staff Collection (2)Call number: PERL A 2, PERL E 1. Centerville: Withdrawn (1)Call number: PERL B 2. Fairfield: Withdrawn (1)Call number: PERL C 1.

Same data with prefs (holding, callnumber, 2, 2):
Availability: Items available for loan: Centerville (1)Call number: PERL D 1. Liberty (1)Call number: perl A 4. Items available for reference: Centerville: Not For Loan (1)Call number: PERL A 5. Not available: Centerville: Checked out (1)Call number: PERL A 3. Centerville: Staff Collection (1)Call number: PERL A 2. Centerville: Withdrawn (1)Call number: PERL B 2. Fairfield: Ordered (1)Call number: PERL B 1. Fairfield: Withdrawn (1)Call number: PERL C 1. Liberty: Staff Collection (1)Call number: PERL E 1.

Same data with prefs (holding, library, n/a, n/a):
Availability: Items available for loan: Centerville (1). Liberty (1). Items available for reference: Centerville: Not For Loan (1). Not available: Centerville: Checked out (1). Centerville: Staff Collection (1). Centerville: Withdrawn (1). Fairfield: Ordered (1). Fairfield: Withdrawn (1). Liberty: Staff Collection (1).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-30 17:04:30 +02:00
..
compact.xsl Bug 25381: XSLTs should not define entities 2021-01-22 13:46:40 +01:00
MARC21Languages.xsl Bug 25381: XSLTs should not define entities 2021-01-22 13:46:40 +01:00
MARC21slim2OPACDetail.xsl Bug 27850: Search link for 260 a and c in MARC21 XSLT OPAC display 2021-07-26 12:46:32 +02:00
MARC21slim2OPACResults.xsl Bug 26302: Refactor Availability block in OPAC results xslt 2021-08-30 17:04:30 +02:00
MARC21slimUtils.xsl Bug 27633: (bug 15436 follow-up) Fix duplicate of 440$v at the OPAC 2021-02-08 14:56:00 +01:00
NORMARCslim2OPACDetail.xsl Bug 27581: Rename USeICU preference to UseICUStyleQuotes 2021-02-08 14:56:00 +01:00
NORMARCslim2OPACResults.xsl Bug 25381: XSLTs should not define entities 2021-01-22 13:46:40 +01:00
NORMARCslimUtils.xsl Bug 25381: XSLTs should not define entities 2021-01-22 13:46:40 +01:00
plainMARC.xsl Bug 25381: XSLTs should not define entities 2021-01-22 13:46:40 +01:00
UNIMARCslim2OPACDetail.xsl Bug 25381: XSLTs should not define entities 2021-01-22 13:46:40 +01:00
UNIMARCslim2OPACResults.xsl Bug 25381: XSLTs should not define entities 2021-01-22 13:46:40 +01:00
UNIMARCslimUtils.xsl Bug 25381: XSLTs should not define entities 2021-01-22 13:46:40 +01:00