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
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',
$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);
}
}
</td>
<td>
<div class="format_icon">
- [% IF attrs.format_icon %]
- <img title="[% attrs.format_label | html %]" alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
+ [% IF attrs.all_formats.size %]
+ [% FOR format IN attrs.all_formats %]
+ <img title="[% format.label | html %]" alt="[% format.label | html %]" src="[% format.icon %]" />
+ [% END %]
[% END %]
</div>
</td>