From bc4b593a2c09a97db542d14001ef4768fd44bf67 Mon Sep 17 00:00:00 2001 From: David Busby Date: Fri, 1 Feb 2013 16:22:54 -0800 Subject: [PATCH] TPAC: Display public copy notes on record details Public copy notes should be displayed on the TPAC record details page. Loop over the returned copies and gathers any copy notes for display, then display the notes in the TPAC record details page. Signed-off-by: David Busby --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm | 10 ++++++++++ Open-ILS/src/templates/opac/parts/record/copy_table.tt2 | 7 +++++++ 2 files changed, 17 insertions(+) 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 a4af2c657f..d655b7092e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm @@ -78,6 +78,16 @@ sub load_record { $ctx->{marc_xml} = $rec_data[0]->{marc_xml}; $ctx->{copies} = $copy_rec->gather(1); + + # Add Copy Notes to Each Copy? + foreach my $copy (@{$ctx->{copies}}) { + $copy->{notes} = $U->simplereq( + 'open-ils.circ', + 'open-ils.circ.copy_note.retrieve.all', + {itemid => $copy->{id}, pub => 1 } + ); + } + $self->timelog("past store copy retrieval call"); $ctx->{copy_limit} = $copy_limit; $ctx->{copy_offset} = $copy_offset; 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 b806f5cead..02ca127b16 100644 --- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 @@ -143,6 +143,13 @@ END; '-'; END %] + + [% IF copy_info.notes; %] + [% FOREACH note IN copy_info.notes; %] +  [% note.title | html %]: [% note.value | html %] + [% END %] + [% END %] + [%- END %] [%- IF ctx.copy_offset > 0 AND NOT serial_holdings; -- 2.11.0