KPAC - Hold results not displaying complete info and throwing log errors
authorTerran McCanna <tmccanna@georgialibraries.org>
Wed, 24 Feb 2016 22:51:16 +0000 (17:51 -0500)
committerTerran McCanna <tmccanna@georgialibraries.org>
Wed, 24 Feb 2016 22:51:16 +0000 (17:51 -0500)
See also - bug report https://bugs.launchpad.net/evergreen/+bug/1548869

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm
Open-ILS/src/templates/kpac/getit_results.tt2

index 708c211..5be9bfa 100644 (file)
@@ -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};
 
index 18b12ea..e1b4f25 100644 (file)
 <div class="checkout_res_body">
     [% IF ctx.added_to_anon %]
         <h2 class="sub_header2">[% l('You Saved It!') %]</h2>
-        <p>
-        [% l('You successfully saved [_1].', title_html) %]<br/>
-        [% l('To manage your lists, go to [_1]My Lists[_2]', '<a href="' _ mkurl(ctx.opac_root _ '/myopac/lists', {}, 1) _ '">', '</a>') %]
-        <p>
+        <p>You successfully saved [% title_html %] to a temporary list.</p>
+               <p>[% l('To manage your lists, go to [_1]My Lists[_2]', '<a href="' _ mkurl(ctx.opac_root _ '/myopac/lists', {}, 1) _ '">', '</a>') %]
+        </p>
     [% ELSIF ctx.added_to_list %]
-        [% list_html = ctx.list.name | html %]
+        [% list_html = ctx.added_to_list.name | html %]
         <h2 class="sub_header2">[% l('You Saved It!') %]</h2>
-        <p>
-        [% l('You successfully saved [_1] to [_2].', title_html, list_html) %]<br/>
-        [% l('To manage your lists, go to [_1]My Lists[_2]', '<a href="' _ mkurl(ctx.opac_root _ '/myopac/lists', {}, 1) _ '">', '</a>') %]
-        <p>
+        <p>You successfully saved <b>[%- title_html -%]</b> to your <b>[%- list_html -%]</b> list.</p>
+               <p>[% l('To manage your lists, go to [_1]My Lists[_2]', '<a href="' _ mkurl(ctx.opac_root _ '/myopac/lists', {}, 1) _ '">', '</a>') %]
+        </p>
     [% ELSIF CGI.param('hold') %]
         [% lib_html = ctx.get_aou(ctx.hold.pickup_lib).name | html %]
         <h2 class="sub_header2">[% l('Hold Successful!') %]</h2>
         <p>
-        [% l('Your request for [_1] was successful.', '<a href="' _ mkurl(ctx.kpac_root _ '/record/' _ ctx.bre_id, {}, kill_params) _ '">' _ title_html _ '</a>') %]<br/>
-        [% 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) %]
-        <p>
+        [% l('Your request for [_1] was successful.', '<a href="' _ mkurl(ctx.kpac_root _ '/record/' _ ctx.bre_id, {}, kill_params) _ '">' _ title_html _ '</a>') %]</p>
+               <p>You will be notified when your item is ready for pickup at <b>[% lib_html %]</b></p>
     [% ELSE %]
         <p>
-        [% l('Unable to request [_1].', '<a href="' _ mkurl(ctx.kpac_root _ '/record/' _ ctx.bre_id, {}, kill_params) _ '">' _ title_html _ '</a>') %]<br/>
-        [% l('Please see a librarian.') %]
+        [% l('Unable to request [_1].', '<a href="' _ mkurl(ctx.kpac_root _ '/record/' _ ctx.bre_id, {}, kill_params) _ '">' _ title_html _ '</a>') %]</p>
+               <p>Please see a librarian for assistance.</p>
     [% END %]
 </div>