From 187dbc59e6ce377c520e0d72f6d02d578c9da16b Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Sat, 12 Mar 2022 22:13:13 +0000 Subject: [PATCH] lp1913815 Browse for Course Fixes - Course Browse is no longer case sensitive - Course Browse will now default to the correct page Signed-off-by: Kyle Huckins --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm | 2 +- Open-ILS/src/templates-bootstrap/opac/course_browse.tt2 | 10 +++++----- Open-ILS/src/templates/opac/course_browse.tt2 | 11 +++++------ 3 files changed, 11 insertions(+), 12 deletions(-) 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 260221f4d0..404534940a 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm @@ -174,7 +174,7 @@ sub load_course_browse { if ($value_exists eq 0) { # For Name/Course Number browse queries... if ($bterm_match eq 0) { - if ($result->{$qtype} =~ m/^$bterm./ || $result->{$qtype} eq $bterm) { + if ($result->{$qtype} =~ m/^$bterm./i || $result->{$qtype} eq $bterm) { $bterm_match = 1; $entry->{'match'} = 1; } diff --git a/Open-ILS/src/templates-bootstrap/opac/course_browse.tt2 b/Open-ILS/src/templates-bootstrap/opac/course_browse.tt2 index 15c87fd62d..a2221ce72d 100644 --- a/Open-ILS/src/templates-bootstrap/opac/course_browse.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/course_browse.tt2 @@ -50,12 +50,12 @@ [% BLOCK browse_pager %] [% - pivot_lower = CGI.param('didx') - blimit; - pivot_higher = CGI.param('didx') + blimit; + pivot_lower = display_idx - blimit; + pivot_higher = display_idx + blimit; IF pivot_lower < 0; pivot_lower = 0; END; - IF CGI.param('didx') <= 0; + IF display_idx <= 0; lower_limit = 1; ELSE; lower_limit = 0; @@ -113,8 +113,8 @@