From fc8379ab466686f8b0bcb8e8b266f96f6ca3fe64 Mon Sep 17 00:00:00 2001 From: edoceo Date: Wed, 20 Feb 2013 18:21:29 -0800 Subject: [PATCH] Pulls the Copy Notes for the records, shows in the table, introduces a new style Signed-off-by: edoceo --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm | 10 ++++++++++ Open-ILS/src/templates/opac/css/style.css.tt2 | 6 ++++++ Open-ILS/src/templates/opac/parts/record/copy_table.tt2 | 9 ++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) 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 f46abc99a4..87ab92c5f2 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm @@ -79,6 +79,16 @@ sub load_record { $ctx->{marc_xml} = $rec_data[0]->{marc_xml}; $ctx->{copies} = $copy_rec->gather(1); + + # Add public 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/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index 4b33659db8..c6fd82e574 100644 --- a/Open-ILS/src/templates/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates/opac/css/style.css.tt2 @@ -459,6 +459,12 @@ div.format_icon { padding-left: 13px; text-align: left; } +#rdetails_status tbody td.copy_note { + color: [% css_colors.primary %]; + text-wrap:normal; + white-space:pre-wrap !important; + word-wrap:normal; +} .rdetail_extras { height: 29px; 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 e4bb0da407..646cec7444 100644 --- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 @@ -34,7 +34,7 @@ END; [%- ELSE -%] [% l("Location") %] [%- END %] - [% l("Call Number") %] + [% l("Call Number / Copy Notes") %] [%- IF has_parts == 'true' %] [% l("Part") %] [%- END %] @@ -148,6 +148,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