From: Bill Erickson Date: Fri, 7 Feb 2014 16:09:01 +0000 (-0500) Subject: LP#1053397 tpac show icons for all selected MR formats in patron holds list X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=aa4e9e7d6294ea5ecc30f5b6aba4e6ade5cda648;p=working%2FEvergreen.git LP#1053397 tpac show icons for all selected MR formats in patron holds list Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm index 6d63aa21ad..4f56877277 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -4252,6 +4252,7 @@ sub mr_hold_filter_attrs { # helper sub for fetching ccvms for a batch of record IDs sub get_batch_ccvms { my ($e, $attr, $bre_ids) = @_; + return [] unless $bre_ids and @$bre_ids; my $vals = $e->search_metabib_record_attr_flat({ attr => $attr, id => $bre_ids diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index eb99180be8..040966d2b7 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -571,10 +571,7 @@ sub fetch_user_holds { if(@collected) { while(my $blob = pop(@collected)) { - my (undef, @data) = $self->get_records_and_facets( - [$blob->{hold}->{bre_id}], undef, {flesh => '{mra}'} - ); - $blob->{marc_xml} = $data[0]->{marc_xml}; + my @data; # in the holds edit UI, we need to know what formats and # languages the user selected for this hold, plus what @@ -582,6 +579,10 @@ sub fetch_user_holds { if ($blob->{hold}{hold}->hold_type eq 'M') { my $hold = $blob->{hold}->{hold}; + # for MR, fetch the combined MR unapi blob + (undef, @data) = $self->get_records_and_facets( + [$hold->target], undef, {flesh => '{mra}', metarecord => 1}); + my $filter_data = $U->simplereq( 'open-ils.circ', 'open-ils.circ.mmr.holds.filters.authoritative.atomic', @@ -592,7 +593,14 @@ sub fetch_user_holds { $filter_data->[0]->{metarecord}; $blob->{metarecord_selected_filters} = $filter_data->[1]->{hold}; + } else { + + (undef, @data) = $self->get_records_and_facets( + [$blob->{hold}->{bre_id}], undef, {flesh => '{mra}'} + ); } + + $blob->{marc_xml} = $data[0]->{marc_xml}; push(@holds, $blob); } } diff --git a/Open-ILS/src/templates/opac/myopac/holds.tt2 b/Open-ILS/src/templates/opac/myopac/holds.tt2 index 18eadc2fe4..98e980429e 100644 --- a/Open-ILS/src/templates/opac/myopac/holds.tt2 +++ b/Open-ILS/src/templates/opac/myopac/holds.tt2 @@ -154,8 +154,10 @@
- [% IF attrs.format_icon %] - [% attrs.format_label | html %] + [% IF attrs.all_formats.size %] + [% FOR format IN attrs.all_formats %] + [% format.label | html %] + [% END %] [% END %]