Pulls the Copy Notes for the records, shows in the table, introduces a new style
authoredoceo <code@edoceo.com>
Thu, 21 Feb 2013 02:21:29 +0000 (18:21 -0800)
committerMike Rylander <mrylander@gmail.com>
Mon, 11 Mar 2013 19:48:25 +0000 (15:48 -0400)
Signed-off-by: edoceo <code@edoceo.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
Open-ILS/src/templates/opac/css/style.css.tt2
Open-ILS/src/templates/opac/parts/record/copy_table.tt2

index 026d792..beffcbf 100644 (file)
@@ -78,6 +78,16 @@ sub load_record {
     $ctx->{marc_xml} = $rec_data[0]->{marc_xml};
 
     $ctx->{copies} = $copy_rec->gather(1);
     $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;
     $self->timelog("past store copy retrieval call");
     $ctx->{copy_limit} = $copy_limit;
     $ctx->{copy_offset} = $copy_offset;
index acda930..fb39da2 100644 (file)
@@ -465,6 +465,12 @@ div.format_icon {
     padding-left: 13px;
     text-align: left;
 }
     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;
 
 .rdetail_extras {
     height: 29px;
index d75cb20..e82ba2b 100644 (file)
@@ -34,7 +34,7 @@ END;
             [%- ELSE -%]
             <th id='copy_header_library'>[% l("Location") %]</th>
             [%- END %]
             [%- ELSE -%]
             <th id='copy_header_library'>[% l("Location") %]</th>
             [%- END %]
-            <th id='copy_header_callnmber'>[% l("Call Number") %]</th>
+            <th id='copy_header_callnmber'>[% l("Call Number / Copy Notes") %]</th>
             [%- IF has_parts == 'true' %]
             <th id='copy_header_part'>[% l("Part") %]</th>
             [%- END %]
             [%- IF has_parts == 'true' %]
             <th id='copy_header_part'>[% l("Part") %]</th>
             [%- END %]
@@ -157,6 +157,13 @@ END;
                     '-';
                 END %]</td>
         </tr>
                     '-';
                 END %]</td>
         </tr>
+
+        [% IF copy_info.notes; %]
+            [% FOREACH note IN copy_info.notes; %]
+                <tr><td>&nbsp;</td><td class="copy_note" colspan="4"><strong>[% note.title | html %]:</strong> [% note.value | html %]</td></tr>
+            [% END %]
+        [% END %]
+
         [%- END %]
         <tr>
         [%- IF ctx.copy_offset > 0 AND NOT serial_holdings;
         [%- END %]
         <tr>
         [%- IF ctx.copy_offset > 0 AND NOT serial_holdings;