'open-ils.circ.copy_note.retrieve.all',
{itemid => $copy->{id}, pub => 1 }
);
+ $self->timelog("past copy note retrieval call");
$copy->{peer_bibs} = $U->simplereq(
- 'open-ils.search',
- 'open-ils.search.multi_home.bib_ids.by_barcode',
- $copy->{barcode} );
- my @peer_marc;
- foreach my $bib (@{$copy->{peer_bibs}}) {
- my (undef, @peer_data) = $self->get_records_and_facets(
- [$bib], undef, {
- flesh => '{holdings_xml,acp,acnp,acns,exclude_invisible_acn}',
- site => $org_name,
- depth => $depth,
- pref_lib => $pref_ou
- });
- #$copy->{peer_bib_marc} = $peer_data[0]->{marc_xml};
- push @peer_marc,$peer_data[0]->{marc_xml};
- }
- $copy->{peer_bib_marc} = \@peer_marc;
+ 'open-ils.search',
+ 'open-ils.search.multi_home.bib_ids.by_barcode',
+ $copy->{barcode}
+ );
+ $self->timelog("past peer bib id retrieval");
+ my @peer_marc;
+ foreach my $bib (@{$copy->{peer_bibs}}) {
+ my (undef, @peer_data) = $self->get_records_and_facets(
+ [$bib], undef, {
+ flesh => '{holdings_xml,acp,acnp,acns,exclude_invisible_acn}',
+ site => $org_name,
+ depth => $depth,
+ pref_lib => $pref_ou
+ });
+ #$copy->{peer_bib_marc} = $peer_data[0]->{marc_xml};
+ push @peer_marc, $peer_data[0]->{marc_xml};
+ }
+ $copy->{peer_bib_marc} = \@peer_marc;
+ $self->timelog("past peer bib record retrieval");
}
$self->timelog("past store copy retrieval call");
[% END %]
[% END %]
-[% FOREACH peer IN ctx.foreign_copies %]
- [% FOREACH bib IN peer.foreign_copy_maps %]
+[%- FOREACH peer IN ctx.foreign_copies;
+ FOREACH bib IN peer.foreign_copy_maps; %]
<tr><td>
- [% ctx.get_aou(bib.target_copy.circ_lib).name %]
+ [%- ctx.get_aou(bib.target_copy.circ_lib).name -%]
</td><td>
<a href="[% mkurl(ctx.opac_root _ '/record/' _ bib.target_copy.call_number.record) %]">[% bib.target_copy.call_number.label %]</a>
- </td><td>
- [% bib.target_copy.barcode %]
- </td><td>
- [% copy_info.copy_location %]
- </td><td>
- [% copy_info.copy_status %]
- </td><td>
- [% copy_info.due_date %]
- </td></tr>
- [% END %]
-[% END %]
+ </td>
+ <td>[%- bib.target_copy.barcode -%]</td>
+ <td>[%- copy_info.copy_location -%]</td>
+ <td>[%- copy_info.copy_status -%]</td>
+ <td>[%- copy_info.due_date -%]</td>
+</tr>
+ [%- END; # FOREACH peer
+[%- END; # FOREACH bib
<tr><td>
-[% FOREACH bib IN copy_info.peer_bib_marc;
+[%- IF copy_info.peer_bib_marc.size > 1;
+'<ul>';
+ FOREACH bib IN copy_info.peer_bib_marc;
attrs = {marc_xml => bib};
PROCESS get_marc_attrs args=attrs %]
-[% IF attrs.bibid != ctx.bre_id %]
-<a href="[% mkurl(ctx.opac_root _ '/record/' _ attrs.bibid) %]"> [% attrs.title %] / [% attrs.author %]</a><br/>
-[% END %]
-[% END %]
+[%- IF attrs.bibid != ctx.bre_id; %]
+ <li><a href="[% mkurl(ctx.opac_root _ '/record/' _ attrs.bibid) %]"> [% attrs.title %] / [% attrs.author %]</a></li>
+[%- END; # IF attrs.bibid
+[%- END; # FOREACH bib in copy_info.peer_bib_marc
+'</ul>';
+ END # IF copy_info.peer_bib_marc.size
+%]
</td></tr>
-
[%- END %]
<tr>
[%- IF ctx.copy_offset > 0 AND NOT serial_holdings;