record => $mr->master_record
}));
}
+
+ # see which formats are available for the selected records.
+ # fetches search_label, value for each ccvm linked to the
+ # mr holds format attribute, for every record within this MR.
+ $ctx->{metarecord_formats} = $e->json_query({
+ select => {ccvm => ['id', 'value', 'search_label']},
+ from => {mraf => {
+ cgf => {
+ fkey => 'attr',
+ field => 'value',
+ filter => {name => 'opac.metarecord.holds.format_attr'}
+ },
+ ccvm => {
+ fkey => 'attr',
+ field => 'ctype'
+ }
+ }},
+ where => {'+mraf' => {id => \@targets}}
+ });
},
T => sub {
my $recs = $e->batch_retrieve_biblio_record_entry(\@targets, {substream => 1});