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>