From: Bill Erickson Date: Fri, 17 Feb 2012 16:57:19 +0000 (-0500) Subject: copy loc groups: UI round 1 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=10ff0b901f4be9a1d6a905c6e21c26374dccaba0;p=evergreen%2Fequinox.git copy loc groups: UI round 1 Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index 0a1fd65a4d..9f4a642e55 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -254,6 +254,7 @@ sub load_common { $ctx->{search_ou} = $self->_get_search_lib(); $self->staff_saved_searches_set_expansion_state if $ctx->{is_staff}; + $self->load_copy_location_groups; return Apache2::Const::OK; } @@ -282,6 +283,14 @@ sub staff_saved_searches_set_expansion_state { $self->ctx->{saved_searches_expanded} = $value; } +sub load_copy_location_groups { + my $self = shift; + my $grps = $self->editor->search_asset_copy_location_group({opac_visible => 't'}); + my %buckets; + push(@{$buckets{$_->owner}}, $_) for @$grps; + $self->ctx->{copy_location_groups} = \%buckets; +} + # physical_loc (i.e. "original location") passed in as a URL # param will replace any existing physical_loc stored as a cookie. sub get_physical_loc { diff --git a/Open-ILS/src/templates/opac/parts/org_selector.tt2 b/Open-ILS/src/templates/opac/parts/org_selector.tt2 index 96bdcbf9ca..bd2a7bcd94 100644 --- a/Open-ILS/src/templates/opac/parts/org_selector.tt2 +++ b/Open-ILS/src/templates/opac/parts/org_selector.tt2 @@ -1,33 +1,54 @@ [% - BLOCK build_org_selector_options; - disabled = ''; - selected = ''; - IF can_have_vols_only AND walker.ou_type.can_have_vols != 't'; - disabled = 'disabled="disabled"'; - ELSIF walker.id == value; - selected = 'selected="selected"'; - END; - IF ctx.is_staff || walker.opac_visible == 't'; -%] -