Copy Location Search Groups : TPac org unit selector
authorBill Erickson <berick@esilibrary.com>
Fri, 17 Feb 2012 16:57:19 +0000 (11:57 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 22 Feb 2012 15:07:56 +0000 (10:07 -0500)
commit22273923051318fa8022d3c342519a4e2f1f3654
treef7327d2b402cb6bb9b43ab36b412a448d32d80fe
parentb1c5ed242331f1e37cc6c4f21eeee3d9f51f7451
Copy Location Search Groups : TPac org unit selector

Adds support for viewing and searching on copy location groups in the
tpac.  Groups appear within the org unit selector, when the selector is
used in a search context.  Groups display below the owning org unit
similar to a child org unit.  Groups are displayed for all org units
that meet the following criteria:  search org unit, physical location,
patron home org unit, plus ancestors and descendents of each.

To support this, TPac gets a new "locg" CGI parameter, which contains
the org unit and copy location group.  It takes the form
org_id:group_id.  The TPac mod_perl code will extract this value and
popuplate the search_ou accordingly.  For consistency, we also use
ctx.search_ou instead of directly checking CGI.param('loc') within the
template environment.

This also includes a rewrite of the org_selector.tt2 template.  It
changes it from a recursive routine to a depth-first while loop.  I did
this mainly because the recursive approach was suffering from global
variable clobbering in the template environment.  In theory, this new
approach should be faster as well.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
16 files changed:
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
Open-ILS/src/templates/opac/advanced.tt2
Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
Open-ILS/src/templates/opac/parts/advanced/expert.tt2
Open-ILS/src/templates/opac/parts/advanced/search.tt2
Open-ILS/src/templates/opac/parts/org_selector.tt2
Open-ILS/src/templates/opac/parts/place_hold.tt2
Open-ILS/src/templates/opac/parts/preserve_params.tt2
Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
Open-ILS/src/templates/opac/parts/record/copy_table.tt2
Open-ILS/src/templates/opac/parts/record/refworks.tt2
Open-ILS/src/templates/opac/parts/record/series.tt2
Open-ILS/src/templates/opac/parts/record/subjects.tt2
Open-ILS/src/templates/opac/parts/searchbar.tt2