From: David Busby Date: Sat, 2 Feb 2013 00:22:54 +0000 (-0800) Subject: TPAC: Display public copy notes on record details X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bc4b593a2c09a97db542d14001ef4768fd44bf67;p=working%2FEvergreen.git 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 --- 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;