From 1d5f1a2cafe9e0abd872210887f585d852ee98e5 Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Wed, 24 Feb 2016 17:51:16 -0500 Subject: [PATCH] KPAC - Hold results not displaying complete info and throwing log errors See also - bug report https://bugs.launchpad.net/evergreen/+bug/1548869 Signed-off-by: Terran McCanna --- .../src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm | 14 ++++++++---- Open-ILS/src/templates/kpac/getit_results.tt2 | 25 ++++++++++------------ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm index 708c211b44..5be9bfa61d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm @@ -35,9 +35,14 @@ sub load { # Everything below here requires SSL # ---------------------------------------------------------------- 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 @@ -219,7 +224,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..e1b4f2544a 100644 --- a/Open-ILS/src/templates/kpac/getit_results.tt2 +++ b/Open-ILS/src/templates/kpac/getit_results.tt2 @@ -13,28 +13,25 @@
[% IF ctx.added_to_anon %]

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

-

- [% l('You successfully saved [_1].', title_html) %]
- [% l('To manage your lists, go to [_1]My Lists[_2]', '', '') %] -

+

You successfully saved [% title_html %] to a temporary list.

+

[% 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) %]
- [% l('To manage your lists, go to [_1]My Lists[_2]', '', '') %] -

+

You successfully saved [%- title_html -%] to your [%- list_html -%] list.

+

[% l('To manage your lists, go to [_1]My Lists[_2]', '', '') %] +

[% ELSIF CGI.param('hold') %] [% lib_html = ctx.get_aou(ctx.hold.pickup_lib).name | html %]

[% l('Hold Successful!') %]

- [% l('Your request for [_1] was successful.', '' _ title_html _ '') %]
- [% l('You will be notified when your item is ready for pickup. You will be able to pick your item up at [_1].', lib_html) %] -

+ [% l('Your request for [_1] was successful.', '' _ title_html _ '') %]

+

You will be notified when your item is ready for pickup at [% lib_html %]

[% ELSE %]

- [% l('Unable to request [_1].', '' _ title_html _ '') %]
- [% l('Please see a librarian.') %] + [% l('Unable to request [_1].', '' _ title_html _ '') %]

+

Please see a librarian for assistance.

[% END %]
-- 2.11.0