[Koha-bugs] [Bug 26302] OPAC XSLT Results: List variable number of itemcallnumbers

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Aug 9 15:03:13 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26302

--- Comment #55 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 123647
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123647&action=edit
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 at rijksmuseum.nl>

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

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

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

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list