CAT-49 Copy View/Edit Links in Catalog
authorVictoria Lewis <vlewis@catalystitservices.com>
Tue, 22 Mar 2016 16:58:09 +0000 (09:58 -0700)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Add view and edit link next to each copy in the copy gird.
Cross-ported this feature.
https://bugs.launchpad.net/evergreen/+bug/1346421

Signed-off-by: Victoria Lewis <vlewis@catalystitservices.com>
On branch dev/catalyst-vlewis/CAT-49-copy_view_edit_links_in_catalog
modified:   var/templates_kcls/opac/parts/record/summary.tt2

KCLS/openils/var/templates_kcls/opac/parts/record/summary.tt2

index ad76cd3..412d514 100644 (file)
                     class="classic_link">[% org_name %]</a>
             </td>
             <td>[% copy_info.call_number_label | html %]</td>
-            <td>[% copy_info.barcode | html %]</td>
+            <td>[% copy_info.barcode | html %]
+                [% IF ctx.is_staff %]
+                    <a onclick="xulG.new_tab(xulG.urls.XUL_COPY_STATUS, {}, {'from_item_details_new': true, 'barcodes': ['[%- copy_info.barcode | html | replace('\'', '\\\'') -%]']})"
+                        href="javascript:;">[% l('view') %]</a>
+                    [%# if the user can edit copies, show the copy edit link %]
+                    [% IF ctx.has_perm('UPDATE_COPY', copy_info.circ_lib)
+                        OR ctx.has_perm('UPDATE_COPY', copy_info.call_number_owning_lib) %]
+                        <span> | </span>
+                        <a href="javascript:;"
+                            onclick="xulG.volume_item_creator({copy_id : [% copy_info.id %]})">
+                            [% l(' edit') %]
+                        </a>
+                    [% END %]
+                [% END %]
+            </td>
             <td>[% copy_info.copy_location | html %]</td>
             [% IF ctx.is_staff %]
             <td>