TPAC: Preferred library display - less magic, more functionality
authorDan Scott <dan@coffeecode.net>
Sat, 17 Mar 2012 03:44:04 +0000 (23:44 -0400)
committerDan Scott <dan@coffeecode.net>
Sat, 17 Mar 2012 18:33:05 +0000 (14:33 -0400)
commit8bd01e74718f9e20b44ca3067ac9b4ace4bb9175
tree76d32fb41764a2cac234c50d4c4b2cdb0ec57847
parente62fbbe9f5ced0e712eadb5b7061f512e8677ddf
TPAC: Preferred library display - less magic, more functionality

A boatload of changes that make the "preferred search library" really,
truly work in TPAC:

1) Display multiple URIs correctly in detailed results and record
   details. We weren't clearing the hash each time that we added it
   to the list of URIs, and that ended up duplicating the URI rather
   than adding distinct URIs.

2) Display the preferred search library copy count if it hasn't already
   been displayed. For example, if your preferred search library is BR3
   and your chosen search library is BR1, an additional line with the
   count for BR3 will be displayed. However, if your chosen search
   library is BM1, the count for BR3 will already have been displayed
   so no duplicate line will be displayed.

3) In record details, give users the ability to jump to their preferred
   library scope via "Show preferred library" beside the preferred
   library copy count, if applicable. If your search library is located
   beneath your pref library in the org hierarchy, then you'll get just
   the "copy depth" link instead.

4) Untangle the located URIs from physical call numbers in in-database
   unapi. We had been facing the limitation of URIs being limited by
   the maximum number of call numbers, with the result that URIs may
   or may not have been displayed. Now, we take the bold tack of
   returning all URIs that are in scope for both the search library
   and the preferred library. No limiting is currently possible, but in
   the realistic worst case scenario of both search lib and pref lib
   being set to an OU at depth 4, we'll get a maximum of 8 different
   URIs back to display. (More realistically, it's unlikely that a
   different URI will be set for each level of the hierarchy.)

Signed-off-by: Dan Scott <dan@coffeecode.net>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
Open-ILS/src/sql/Pg/990.schema.unapi.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.unapi_limit_rank.sql
Open-ILS/src/templates/opac/parts/misc_util.tt2
Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
Open-ILS/src/templates/opac/parts/result/copy_counts.tt2