From: Bill Erickson Date: Fri, 12 Apr 2013 21:58:07 +0000 (-0400) Subject: global copy location groups X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fcollab%2Fberick%2Fglobal-copy-location-groups;p=working%2FEvergreen.git global copy location groups Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm index 93cc3e120d..fe69d4db3c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm @@ -460,6 +460,14 @@ sub load_copy_location_groups { push(@ctx_orgs, $ctx->{physical_loc}) if $ctx->{physical_loc}; push(@ctx_orgs, $ctx->{user}->home_ou) if $ctx->{user}; + # if the global copy loc group setting is enabled, + # load all copy location groups, regardless of context + my $global = $ctx->{get_org_setting}->( + $ctx->{physical_loc} || $ctx_orgs[0], + 'opac.global_copy_location_groups'); + + @ctx_orgs = ($ctx->{aou_tree}->()->id) if $U->is_true($global); + my $grps = $self->editor->search_asset_copy_location_group([ { opac_visible => 't',