TPac: Easy access to item status
authorThomas Berezansky <tsbere@mvlc.org>
Sat, 14 Jan 2012 16:42:55 +0000 (11:42 -0500)
committerBill Erickson <berick@esilibrary.com>
Mon, 16 Jan 2012 22:13:40 +0000 (17:13 -0500)
Change item barcodes into item status links in TPac listings.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/opac/parts/record/copy_table.tt2

index c06c694..03d5f16 100644 (file)
@@ -52,7 +52,11 @@ END;
             [%- IF has_parts == 'true' %]
             <td header='copy_header_part'>[% copy_info.part_label | html %]</td>
             [%- END %]
-            <td header='copy_header_barcode'>[% copy_info.barcode | html %]</td>
+            <td header='copy_header_barcode'>
+                [%- IF ctx.is_staff -%]
+                    <a href="javascript:void(0)" onclick="xulG.new_tab(xulG.urls.XUL_COPY_STATUS, {}, {'from_item_details_new': true, 'barcodes': ['[%- copy_info.barcode | html | replace('\'', '\\\'') -%]']})">[% copy_info.barcode | html %]</a>
+                [%- ELSE -%][% copy_info.barcode | html %]
+                [%- END -%]</td>
             <td header='copy_header_shelfloc'>[% copy_info.copy_location | html %]</td>
             [%- IF ctx.is_staff %]
             <td header='copy_header_age_hold'>