From: Terran McCanna Date: Wed, 24 Feb 2016 22:17:27 +0000 (-0500) Subject: LP#1548869 KPAC hold results screen not displaying complete info X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fmccanna%2Flp1548869_kpac_getit_results;p=working%2FEvergreen.git LP#1548869 KPAC hold results screen not displaying complete info The getit_results.tt2 page was not displaying item title after hold placement or after adding to a list. It was also not pulling in the item id (which was needed for navigational links back to the record) and was not pulling in the list name after adding an item to a named list. This patch adds some logic to prevent subroutine conflicts, adds missing parameters to a function call, and corrects a variable name. Signed-off-by: Terran McCanna --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm index 32e394b594..cdd73a5929 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm @@ -36,8 +36,12 @@ sub load { # ---------------------------------------------------------------- return $self->redirect_ssl unless $self->cgi->https; - return $self->load_getit_results if $path =~ m|kpac/getit_results|; - return $self->load_getit if $path =~ m|kpac/getit|; + #logic added to resolve path-matching conflict + if ($path =~ m|kpac/getit_results|) { + return $self->load_getit_results; + } elsif ($path =~ m|kpac/getit|) { + return $self->load_getit; + } # ---------------------------------------------------------------- # Everything below here requires authentication @@ -209,7 +213,8 @@ sub load_getit_results { my $hold_id = $self->cgi->param('hold'); my $rec_id = $ctx->{page_args}->[0]; - my (undef, @rec_data) = $self->get_records_and_facets([$rec_id]); + my (undef, @rec_data) = $self->get_records_and_facets([$rec_id], undef, + {flesh => '{mra,holdings_xml,acp,exclude_invisible_acn}'}); $ctx->{bre_id} = $rec_data[0]->{id}; $ctx->{marc_xml} = $rec_data[0]->{marc_xml}; diff --git a/Open-ILS/src/templates/kpac/getit_results.tt2 b/Open-ILS/src/templates/kpac/getit_results.tt2 index 18b12ea2cd..70e9803710 100644 --- a/Open-ILS/src/templates/kpac/getit_results.tt2 +++ b/Open-ILS/src/templates/kpac/getit_results.tt2 @@ -18,7 +18,7 @@ [% l('To manage your lists, go to [_1]My Lists[_2]', '', '') %]

[% ELSIF ctx.added_to_list %] - [% list_html = ctx.list.name | html %] + [% list_html = ctx.added_to_list.name | html %]

[% l('You Saved It!') %]

[% l('You successfully saved [_1] to [_2].', title_html, list_html) %]