From: Kyle Huckins Date: Wed, 20 Apr 2022 16:35:24 +0000 (+0000) Subject: lp1913815 Course Browse Owning Lib Support X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ad772b09003dbf390eb6f311e49b3e3ecdc4d20f;p=working%2FEvergreen.git lp1913815 Course Browse Owning Lib Support - Enable the ability to filter Course Browse results by owning library Signed-off-by: Kyle Huckins Changes to be committed: modified: Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm index 404534940a..22cf1f0467 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm @@ -53,6 +53,7 @@ sub load_course_browse { if ($cgi->param('bterm')) { my $bterm = $cgi->param('bterm'); my $qtype = $cgi->param('qtype'); + my $locg = $cgi->param('locg'); # Search term is optional. If it's empty, start at the # beginning. Otherwise, center results on a match. # Regardless, we're listing everything, so retrieve all. @@ -115,10 +116,13 @@ sub load_course_browse { 'owning_lib' ]}, "order_by" => {"acmc" => [$qtype]}, - # TODO: We need to support the chosen library as well... - "where" => {'-not' => {'+acmc' => 'is_archived'}} + "where" => { + '-not' => {'+acmc' => 'is_archived'}, + '+acmc' => { 'owning_lib' => $locg } + } }); } + my $bterm_match = 0; for my $result(@$results) { my $value_exists = 0;