From 30b75ceadeeb86f50ac874000e1ca38ebed725db Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Mon, 15 Jul 2013 09:11:53 -0400 Subject: [PATCH] Whitespace and timelog entries Signed-off-by: Dan Scott Signed-off-by: Ben Shum --- .../lib/OpenILS/WWW/EGCatLoader/Record.pm | 36 ++++++++-------- .../opac/parts/record/copy_table.tt2 | 41 ++++++++++--------- 2 files changed, 41 insertions(+), 36 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm index 75de856913..0e42be0055 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm @@ -94,23 +94,27 @@ sub load_record { '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"); diff --git a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 index 274020263f..8602d3f69d 100644 --- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 @@ -167,33 +167,34 @@ END; [% 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; %] - [% ctx.get_aou(bib.target_copy.circ_lib).name %] + [%- ctx.get_aou(bib.target_copy.circ_lib).name -%] [% bib.target_copy.call_number.label %] - - [% bib.target_copy.barcode %] - - [% copy_info.copy_location %] - - [% copy_info.copy_status %] - - [% copy_info.due_date %] - - [% END %] -[% END %] + + [%- bib.target_copy.barcode -%] + [%- copy_info.copy_location -%] + [%- copy_info.copy_status -%] + [%- copy_info.due_date -%] + + [%- END; # FOREACH peer +[%- END; # FOREACH bib -[% FOREACH bib IN copy_info.peer_bib_marc; +[%- IF copy_info.peer_bib_marc.size > 1; +''; + END # IF copy_info.peer_bib_marc.size +%] - [%- END %] [%- IF ctx.copy_offset > 0 AND NOT serial_holdings; -- 2.43.2