TPAC - Add config option to turn on/off public copy notes user/bshum/public-copy-notes-config
authorBen Shum <bshum@biblio.org>
Tue, 28 May 2013 15:31:23 +0000 (11:31 -0400)
committerBen Shum <bshum@biblio.org>
Tue, 28 May 2013 15:45:15 +0000 (11:45 -0400)
Note, public copy notes continues to be shipped "on" by default. This option
is intended to allow for quick enabling/disabling of all public copy notes in
the catalog.

Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/opac/parts/config.tt2
Open-ILS/src/templates/opac/parts/record/copy_table.tt2

index c8e87ef..34e4b97 100644 (file)
@@ -149,4 +149,9 @@ search.basic_config = {
 # Set to 1 or 'true' to enable
 ctx.google_books_preview = 0;
 
+##############################################################################
+# Show Public Copy Notes
+# Set to 1 or 'true' to enable
+ctx.public_copy_notes = 1;
+
 %]
index e82ba2b..e43283a 100644 (file)
@@ -34,7 +34,11 @@ END;
             [%- ELSE -%]
             <th id='copy_header_library'>[% l("Location") %]</th>
             [%- END %]
+            [%- IF ctx.public_copy_notes -%]
             <th id='copy_header_callnmber'>[% l("Call Number / Copy Notes") %]</th>
+            [%- ELSE -%]
+            <th id='copy_header_callnmber'>[% l("Call Number") %]</th>
+            [%- END %]
             [%- IF has_parts == 'true' %]
             <th id='copy_header_part'>[% l("Part") %]</th>
             [%- END %]
@@ -158,11 +162,13 @@ END;
                 END %]</td>
         </tr>
 
+        [%- IF ctx.public_copy_notes -%]
         [% 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 %]
 
         [%- END %]
         <tr>