https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26302
--- Comment #34 from Marcel de Rooy <m.de.r...@rijksmuseum.nl> --- Created attachment 123502 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123502&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.r...@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/