From: Mike Rylander Date: Mon, 28 Jan 2019 21:02:43 +0000 (-0500) Subject: LP#1815815: Library Groups X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=55ac4251aaa664e7f234a764fed9a73fcaa344fa;p=Evergreen.git LP#1815815: Library Groups This branch implements Library Groups (what used to be called "lassos") for Evergreen. Evergreen has, internally, a concept called "lassos" that allows an administrator to define a group of org units to search that has no relation to the hierarchical org tree. For instance, one might create a group of law or science libraries within a university consortium, or group all school libraries together. In addition to the previous always-visible type of Library Group (lasso), one can now make them context-aware so that that only show up if the current search location is included as one of the org units in the Library Group. This is implemented without regard to the org unit hierarchy, and so requires that the relevant ancestor and descendent org units be included in the group along with those that actually hold copies, but allows for complete flexibility in context-aware Library Group configuration. Signed-off-by: Mike Rylander Signed-off-by: Ruth Frasur Signed-off-by: Terran McCanna Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 36dc6d550a..45ce731535 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -6369,26 +6369,30 @@ SELECT usr, - + - - + + + + - + + + - - - - + + + + - + - - - + + + @@ -6396,10 +6400,10 @@ SELECT usr, - - - - + + + + diff --git a/Open-ILS/src/eg2/src/app/staff/admin/server/admin-server-splash.component.html b/Open-ILS/src/eg2/src/app/staff/admin/server/admin-server-splash.component.html index de399d6517..fd65e16f9b 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/server/admin-server-splash.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/server/admin-server-splash.component.html @@ -55,6 +55,10 @@ routerLink="/staff/admin/server/config/copy_status"> + + simplereq( + 'open-ils.cstore', + 'open-ils.cstore.direct.actor.org_lasso.search.atomic', { name => $name } )->[0]; +} + +sub fetch_lasso_org_maps { + my( $self, $lasso ) = @_; + return $self->simplereq( + 'open-ils.cstore', + 'open-ils.cstore.direct.actor.org_lasso_map.search.atomic', { lasso => $lasso } ); +} + sub fetch_non_cat_type_by_name_and_org { my( $self, $name, $orgId ) = @_; $logger->debug("Fetching non cat type $name at org $orgId"); diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm index 950a081b63..c4e345562e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm @@ -1450,15 +1450,34 @@ sub flatten { my $site_org = $ot; my $negate = 'FALSE'; - my ($site_filter) = grep { $_->name eq 'site' } @{$self->filters}; - if ($site_filter and @{$site_filter->args} == 1) { - $negate = $site_filter->negate ? 'TRUE' : 'FALSE'; + my @lasso_list; + my ($lasso_filter) = grep { $_->name eq 'lasso' } @{$self->filters}; + if ($lasso_filter and @{$lasso_filter->args} == 1) { + $negate = $lasso_filter->negate ? 'TRUE' : 'FALSE'; + + my $lasso = $lasso_filter->args->[0]; + if ($lasso !~ /^\d+$/) { + $lasso = $U->find_lasso_by_name($lasso); + } + + if ($lasso) { + $lasso = $lasso->id if (ref $lasso); + @lasso_list = map { $_->org_unit } @{ $U->fetch_lasso_org_maps($lasso) }; + } + } - my $sitename = $site_filter->args->[0]; - $site_org = $U->find_org_by_shortname($ot, $sitename) || $ot; + + if (!@lasso_list) { + my ($site_filter) = grep { $_->name eq 'site' } @{$self->filters}; + if ($site_filter and @{$site_filter->args} == 1) { + $negate = $site_filter->negate ? 'TRUE' : 'FALSE'; + + my $sitename = $site_filter->args->[0]; + $site_org = $U->find_org_by_shortname($ot, $sitename) || $ot; + } } - my $dorgs = $U->get_org_descendants($site_org->id, $depth_filter); + my $dorgs = scalar(@lasso_list) ? [@lasso_list] : $U->get_org_descendants($site_org->id, $depth_filter); my $aorgs = $U->get_org_ancestors($site_org->id); flesh_parents($ot); @@ -1472,7 +1491,8 @@ sub flatten { push @{$vis_filter{'c_attr'}}, "search.calculate_visibility_attribute_test('circ_lib','{".join(',', @$dorgs)."}',$negate)"; - if (!$self->find_filter('locations') && !$self->find_filter('location_groups')) { + # NOTE: both lassos and shelving locations preclude Located URI search + if (!$lasso_filter && !$self->find_filter('locations') && !$self->find_filter('location_groups')) { my $lorgs = [@$aorgs]; my $luri_as_copy_gf = $U->get_global_flag('opac.located_uri.act_as_copy'); push @$lorgs, @$dorgs if ($luri_as_copy_gf and $U->is_true($luri_as_copy_gf->enabled)); diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm index c0dc2ac478..987b906c5e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm @@ -2972,30 +2972,35 @@ sub query_parser_fts { } $ou = actor::org_unit->search( { shortname => $ou } )->next->id if ($ou and $ou !~ /^(-)?\d+$/); - # gather lasso, as with $ou - my $lasso = $args{lasso}; - if (my ($filter) = $query->parse_tree->find_filter('lasso')) { - $lasso = $filter->args->[0] if (@{$filter->args}); - } - $lasso = actor::org_lasso->search( { name => $lasso } )->next->id if ($lasso and $lasso !~ /^\d+$/); - $lasso = -$lasso if ($lasso); - -# # XXX once we have org_unit containers, we can make user-defined lassos .. WHEEE -# # gather user lasso, as with $ou and lasso -# my $mylasso = $args{my_lasso}; -# if (my ($filter) = $query->parse_tree->find_filter('my_lasso')) { -# $mylasso = $filter->args->[0] if (@{$filter->args}); +# # XXX The following, along with most of the surrounding code, is actually dead now. However, realigning to be more "true" and match surrounding. +# # gather lasso, as with $ou + my $lasso = $args{lasso}; +# if (my ($filter) = $query->parse_tree->find_filter('lasso')) { +# $lasso = $filter->args->[0] if (@{$filter->args}); # } -# $mylasso = actor::org_unit->search( { name => $mylasso } )->next->id if ($mylasso and $mylasso !~ /^\d+$/); - - - # if we have a lasso, go with that, otherwise ... ou - $ou = $lasso if ($lasso); +# # search by name if an id (number) wasn't given +# $lasso = actor::org_lasso->search( { name => $lasso } )->next->id if ($lasso and $lasso !~ /^\d+$/); +# +# # gather lasso org list +# my $lasso_orgs = []; +# $lasso_orgs = [actor::org_lasso_map->search( { lasso => $lasso } )] if ($lasso); +# +# +## # XXX once we have org_unit containers, we can make user-defined lassos .. WHEEE +## # gather user lasso, as with $ou and lasso + my $mylasso = $args{my_lasso}; +## if (my ($filter) = $query->parse_tree->find_filter('my_lasso')) { +## $mylasso = $filter->args->[0] if (@{$filter->args}); +## } +## $mylasso = actor::org_unit->search( { name => $mylasso } )->next->id if ($mylasso and $mylasso !~ /^\d+$/); +# +# +# # if we have a lasso, go with that, otherwise ... ou +# $ou = $lasso if ($lasso); # gather the preferred OU, if one is specified, as with $ou my $pref_ou = $args{pref_ou}; - $log->info("pref_ou = $pref_ou"); if (my ($filter) = $query->parse_tree->find_filter('pref_ou')) { $pref_ou = $filter->args->[0] if (@{$filter->args}); } @@ -3303,6 +3308,7 @@ sub query_parser_fts_wrapper { # XXX All of the following, down to the 'return' is basically dead code. someone higher up should handle it $query = "site($args{org_unit}) $query" if ($args{org_unit}); + $query = "lasso($args{lasso}) $query" if ($args{lasso}); $query = "depth($args{depth}) $query" if (defined($args{depth})); $query = "sort($args{sort}) $query" if ($args{sort}); $query = "core_limit($args{core_limit}) $query" if ($args{core_limit}); diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index ef231feabe..1c6cb78116 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -407,11 +407,13 @@ sub load_common { $self->extract_copy_location_group_info; $ctx->{search_ou} = $self->_get_search_lib(); + $ctx->{search_scope} = $self->cgi->param('search_scope'); $self->staff_saved_searches_set_expansion_state if $ctx->{is_staff}; $self->load_eg_cache_hash; $self->load_copy_location_groups; $self->load_my_hold_subscriptions; $self->load_hold_subscriptions if $ctx->{is_staff}; + $self->load_lassos; $self->staff_saved_searches_set_expansion_state if $ctx->{is_staff}; $self->load_search_filter_groups($ctx->{search_ou}); $self->load_org_util_funcs; diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm index d0860bc24e..748b79a6b9 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm @@ -138,6 +138,10 @@ sub _prepare_biblio_search { # is still empty up to this point, there is no query. abandon ship. return () unless $query; + # The search_scope param comes from a mixed-use dropdown containing depth, + # lasso, and location_groups filters. + $query .= ' ' . $cgi->param('search_scope') if defined $cgi->param('search_scope'); + # sort is treated specially, even though it's actually a filter if (defined($cgi->param('sort'))) { $query =~ s/sort\([^\)]*\)//g; # override existing sort(). no stacking. 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 f741bcaa01..4816c7e10b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm @@ -70,87 +70,9 @@ sub init_ro_object_cache { my $locale_subs = {}; my $locale = $ctx->{locale}; - # make all "field_safe" classes accesible by default in the template context - my @classes = grep { - ($Fieldmapper::fieldmap->{$_}->{field_safe} || '') =~ /true/i - } keys %{ $Fieldmapper::fieldmap }; - - for my $class (@classes) { - - my $hint = $Fieldmapper::fieldmap->{$class}->{hint}; - next if $hint eq 'aou'; # handled separately - - my $ident_field = $Fieldmapper::fieldmap->{$class}->{identity}; - (my $eclass = $class) =~ s/Fieldmapper:://o; - $eclass =~ s/::/_/g; - - my $list_key = "${hint}_list"; - my $get_key = "get_$hint"; - my $search_key = "search_$hint"; - - my $memcache_key = join('.', 'EGWeb',$locale,$hint) . '.'; - - # Retrieve the full set of objects with class $hint - $locale_subs->{$list_key} = sub { - my $from_memcache = 0; - my $list = $memcache->get_cache($memcache_key.'list'); - if ($list) { - $cache{list}{$locale}{$hint} = $list; - $from_memcache = 1; - } - my $method = "retrieve_all_$eclass"; - my $e = new_editor(); - $cache{list}{$locale}{$hint} = $e->$method() unless $cache{list}{$locale}{$hint}; - undef $e; - $memcache->put_cache($memcache_key.'list',$cache{list}{$locale}{$hint}) unless $from_memcache; - return $cache{list}{$locale}{$hint}; - }; - - # locate object of class $hint with Ident field $id - $cache{map}{$hint} = {}; - $locale_subs->{$get_key} = sub { - my $id = shift; - return $cache{map}{$locale}{$hint}{$id} if $cache{map}{$locale}{$hint}{$id}; - ($cache{map}{$locale}{$hint}{$id}) = grep { $_->$ident_field eq $id } @{$locale_subs->{$list_key}->()}; - return $cache{map}{$locale}{$hint}{$id}; - }; - - # search for objects of class $hint where field=value - $cache{search}{$hint} = {}; - $locale_subs->{$search_key} = sub { - my ($field, $val, $filterfield, $filterval) = @_; - my $method = "search_$eclass"; - my $cacheval = $val; - my $scalar_cacheval = 1; - - if (ref $val) { - $scalar_cacheval = 0; - $val = [sort(@$val)] if ref $val eq 'ARRAY'; - $cacheval = OpenSRF::Utils::JSON->perl2JSON($val); - #$self->apache->log->info("cacheval : $cacheval"); - } - - my $search_obj = {$field => $val}; - if($filterfield) { - $search_obj->{$filterfield} = $filterval; - $cacheval .= ':' . $filterfield . ':' . $filterval; - } elsif ( - $scalar_cacheval - and $cache{list}{$locale}{$hint} - and !$cache{search}{$locale}{$hint}{$field}{$cacheval} - ) { - return $cache{search}{$locale}{$hint}{$field}{$cacheval} = - [ grep { $_->$field() eq $val } @{$cache{list}{$locale}{$hint}} ]; - } - - my $e = new_editor(); - $cache{search}{$locale}{$hint}{$field}{$cacheval} = $e->$method($search_obj) - unless $cache{search}{$locale}{$hint}{$field}{$cacheval}; - undef $e; - return $cache{search}{$locale}{$hint}{$field}{$cacheval}; - }; - } + # Create special-purpose subs + # aou is special because it's tree-ish $locale_subs->{aou_tree} = sub { # fetch the org unit tree @@ -190,6 +112,11 @@ sub init_ro_object_cache { return $cache{map}{$locale}{aou}{$org_id}; }; + # Returns a flat list of aout objects, sorted by depth and opac_label. + $locale_subs->{sorted_aout_list} = sub { + return [ sort { $a->depth() <=> $b->depth() || $a->opac_label() cmp $b->opac_label() } @{$locale_subs->{aout_list}->()} ]; + }; + # Returns a flat list of aou objects. often easier to manage than a tree. $locale_subs->{aou_list} = sub { $locale_subs->{aou_tree}->(); # force the org tree to load @@ -326,6 +253,87 @@ sub init_ro_object_cache { return $cache{authority_fields}{$locale}{$control_set}; }; + # make all "field_safe" classes accesible by default in the template context + my @classes = grep { + ($Fieldmapper::fieldmap->{$_}->{field_safe} || '') =~ /true/i + } keys %{ $Fieldmapper::fieldmap }; + + for my $class (@classes) { + + my $hint = $Fieldmapper::fieldmap->{$class}->{hint}; + next if $hint eq 'aou'; # handled separately + + my $ident_field = $Fieldmapper::fieldmap->{$class}->{identity}; + (my $eclass = $class) =~ s/Fieldmapper:://o; + $eclass =~ s/::/_/g; + + my $list_key = "${hint}_list"; + my $get_key = "get_$hint"; + my $search_key = "search_$hint"; + + my $memcache_key = join('.', 'EGWeb',$locale,$hint) . '.'; + + # Retrieve the full set of objects with class $hint + $locale_subs->{$list_key} ||= sub { + my $from_memcache = 0; + my $list = $memcache->get_cache($memcache_key.'list'); + if ($list) { + $cache{list}{$locale}{$hint} = $list; + $from_memcache = 1; + } + my $method = "retrieve_all_$eclass"; + my $e = new_editor(); + $cache{list}{$locale}{$hint} = $e->$method() unless $cache{list}{$locale}{$hint}; + undef $e; + $memcache->put_cache($memcache_key.'list',$cache{list}{$locale}{$hint}) unless $from_memcache; + return $cache{list}{$locale}{$hint}; + }; + + # locate object of class $hint with Ident field $id + $cache{map}{$hint} = {}; + $locale_subs->{$get_key} ||= sub { + my $id = shift; + return $cache{map}{$locale}{$hint}{$id} if $cache{map}{$locale}{$hint}{$id}; + ($cache{map}{$locale}{$hint}{$id}) = grep { $_->$ident_field eq $id } @{$locale_subs->{$list_key}->()}; + return $cache{map}{$locale}{$hint}{$id}; + }; + + # search for objects of class $hint where field=value + $cache{search}{$hint} = {}; + $locale_subs->{$search_key} ||= sub { + my ($field, $val, $filterfield, $filterval) = @_; + my $method = "search_$eclass"; + my $cacheval = $val; + my $scalar_cacheval = 1; + + if (ref $val) { + $scalar_cacheval = 0; + $val = [sort(@$val)] if ref $val eq 'ARRAY'; + $cacheval = OpenSRF::Utils::JSON->perl2JSON($val); + #$self->apache->log->info("cacheval : $cacheval"); + } + + my $search_obj = {$field => $val}; + if($filterfield) { + $search_obj->{$filterfield} = $filterval; + $cacheval .= ':' . $filterfield . ':' . $filterval; + } elsif ( + $scalar_cacheval + and $cache{list}{$locale}{$hint} + and !$cache{search}{$locale}{$hint}{$field}{$cacheval} + ) { + return $cache{search}{$locale}{$hint}{$field}{$cacheval} = + [ grep { $_->$field() eq $val } @{$cache{list}{$locale}{$hint}} ]; + } + + my $e = new_editor(); + $cache{search}{$locale}{$hint}{$field}{$cacheval} = $e->$method($search_obj) + unless $cache{search}{$locale}{$hint}{$field}{$cacheval}; + undef $e; + return $cache{search}{$locale}{$hint}{$field}{$cacheval}; + }; + } + $ctx->{$_} = $locale_subs->{$_} for keys %$locale_subs; $ro_object_subs->{$locale} = $locale_subs; } @@ -694,7 +702,7 @@ sub load_copy_location_groups { } } }, - {order_by => {acplg => 'pos'}} + {order_by => {acplg => ['pos','name']}} ]); my %buckets; @@ -736,6 +744,24 @@ sub load_my_hold_subscriptions { ) : []; } +sub load_lassos { + my $self = shift; + my $ctx = $self->ctx; + + # User can access global lassos and those at the current search lib + my $direct_lassos = $self->editor->search_actor_org_lasso_map( + { org_unit => $ctx->{search_ou} } + ); + $direct_lassos = [ map { $_->lasso } @$direct_lassos]; + + my $lassos = $self->editor->search_actor_org_lasso( + { '-or' => { global => 't', @$direct_lassos ? (id => { in => $direct_lassos}) : () } } + ); + + $ctx->{lassos} = [ sort { $a->name cmp $b->name } @$lassos ]; + $self->apache->log->info("Fetched ".scalar(@$lassos)." lassos"); +} + sub set_file_download_headers { my $self = shift; my $filename = shift; diff --git a/Open-ILS/src/sql/Pg/005.schema.actors.sql b/Open-ILS/src/sql/Pg/005.schema.actors.sql index 33ae6282a1..6fb6a49320 100644 --- a/Open-ILS/src/sql/Pg/005.schema.actors.sql +++ b/Open-ILS/src/sql/Pg/005.schema.actors.sql @@ -399,7 +399,8 @@ CREATE TRIGGER actor_org_unit_parent_protect_trigger CREATE TABLE actor.org_lasso ( id SERIAL PRIMARY KEY, - name TEXT UNIQUE + name TEXT UNIQUE, + global BOOL NOT NULL DEFAULT FALSE ); CREATE TABLE actor.org_lasso_map ( diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index dd3f884546..363a8b4d92 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -1952,7 +1952,9 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES ( 627, 'SSO_ADMIN', oils_i18n_gettext(627, 'Modify patron SSO settings', 'ppl', 'description')), ( 628, 'MANAGE_HOLD_GROUPS', oils_i18n_gettext(628, - 'Manage batch (subscription) hold events', 'ppl', 'description')) + 'Manage batch (subscription) hold events', 'ppl', 'description')), + ( 629, 'ADMIN_LIBRARY_GROUPS', oils_i18n_gettext(629, + 'Administer library groups', 'ppl', 'description')) ; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lassos.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lassos.sql new file mode 100644 index 0000000000..f4c333ae78 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lassos.sql @@ -0,0 +1,29 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +-- XXX Committer: confirm ID below is the next available! +INSERT INTO permission.perm_list (id, code, description) + VALUES ( 629, 'ADMIN_LIBRARY_GROUPS', 'Administer library groups'); + +INSERT INTO config.workstation_setting_type (name, grp, datatype, label) +VALUES ( + 'eg.grid.admin.server.actor.org_lasso', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.admin.server.actor.org_lasso', + 'Grid Config: admin.server.actor.org_lasso', + 'cwst', 'label' + ) +), ( + 'eg.grid.admin.server.actor.org_lasso_map', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.admin.server.actor.org_lasso_map', + 'Grid Config: admin.server.actor.org_lasso_map', + 'cwst', 'label' + ) +); + +ALTER TABLE actor.org_lasso ADD COLUMN global BOOL NOT NULL DEFAULT FALSE; + +COMMIT; + diff --git a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/opac/parts/advanced/search.tt2 index 7ac166dba9..07367388a1 100644 --- a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 +++ b/Open-ILS/src/templates/opac/parts/advanced/search.tt2 @@ -66,9 +66,15 @@ [% IF adv_chunk.adv_special; SWITCH adv_chunk.adv_special; + CASE "scope_selector"; + PROCESS "opac/parts/org_selector.tt2"; + select_scope_label = l("Select search scope"); + INCLUDE build_scope_selector arialabel=select_scope_label value=ctx.search_scope + id=adv_chunk.id name='search_scope' show_loc_groups=1; + CASE "lib_selector"; PROCESS "opac/parts/org_selector.tt2"; - INCLUDE build_org_selector show_loc_groups=1 id=adv_chunk.id %] + INCLUDE build_org_selector show_loc_groups=0 id=adv_chunk.id %]
[% l("Limit to Available") %]
+ [% CASE "pub_year"; %] +[%- END; + +BLOCK build_scope_selector; + IF !name; + name = id; + END; + IF !value; + value = loc_value; + END; + + ou_id = ctx.search_ou; + context_org = ctx.get_aou(ou_id); + + # if the selected org unit is out of hiding scope, + # disable the ou-hide scoping altogether. + hiding_disabled = ctx.org_hiding_disabled(value); + hiding_depth = ctx.get_org_setting(ou_id, 'opac.org_unit_hiding.depth') -%] + + [%- END %] diff --git a/Open-ILS/src/templates/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2 index f9fb92beac..2e5f6e3db8 100644 --- a/Open-ILS/src/templates/opac/parts/searchbar.tt2 +++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2 @@ -3,7 +3,7 @@ # We need to ignore some filters in our count -fignore = ['location_groups','site','core_limit','limit','badge_orgs','badges','estimation_strategy','depth']; +fignore = ['lasso','location_groups','site','core_limit','limit','badge_orgs','badges','estimation_strategy','depth']; fcount = 0; FOR f IN ctx.query_struct.filters; IF fignore.grep('^' _ f.name _ '$').size; @@ -97,7 +97,15 @@ END; l('Library: '); select_lib_label = l("Select search library"); INCLUDE build_org_selector arialabel=select_lib_label - id='search_org_selector' show_loc_groups=1 + id='search_org_selector' show_loc_groups=0 + -%] + + diff --git a/Open-ILS/src/templates/staff/admin/server/t_splash.tt2 b/Open-ILS/src/templates/staff/admin/server/t_splash.tt2 index 1377308693..07a36dabb4 100644 --- a/Open-ILS/src/templates/staff/admin/server/t_splash.tt2 +++ b/Open-ILS/src/templates/staff/admin/server/t_splash.tt2 @@ -34,6 +34,8 @@ ,[ l('Import Match Sets'), "./admin/server/vandelay/match_set" ] ,[ l('Item Statuses'), "./admin/server/legacy/config/copy_status" ] ,[ l('Item Tag Types'), "./admin/server/config/copy_tag_type" ] + ,[ l('Library Groups'), "/eg2/staff/admin/server/actor/org_lasso" ] + ,[ l('Library Group Maps'), "/eg2/staff/admin/server/actor/org_lasso_map" ] ,[ l('MARC Coded Value Maps'), "./admin/server/config/coded_value_map" ] ,[ l('MARC Import Remove Fields'), "./admin/server/vandelay/import_bib_trash_group" ] ,[ l('MARC Record Attributes'), "./admin/server/config/record_attr_definition" ]