Copy Location Search Groups : TPac org unit selector
authorBill Erickson <berick@esilibrary.com>
Fri, 17 Feb 2012 16:57:19 +0000 (11:57 -0500)
committerDan Scott <dan@coffeecode.net>
Sun, 11 Mar 2012 00:20:52 +0000 (19:20 -0500)
commit32458ad85b11e517eca78ebb3aead3300e31b4b2
treedc107e5afd2456f3e2a1699a2af5faf07247a456
parentfb1a10e370bf708b1f4fb1c59dc029ed75a85d94
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>
Signed-off-by: Dan Scott <dan@coffeecode.net>
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