From 225f429dd101c6d7045ec66075f73a3a643236b1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 18 Apr 2023 15:36:52 +0200 Subject: [PATCH] Bug 33568: Restore action buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Owen Leonard Signed-off-by: Laurence Rault Signed-off-by: Emily Lamancusa Signed-off-by: Tomás Cohen Arazi --- .../prog/en/modules/catalogue/detail.tt | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index d5a9fe30108..b0d29e87c0f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -2931,8 +2931,25 @@ [% IF CAN_user_editcatalogue_edit_items %] { data: function( row, type, val, meta ) { - let result = 'Edit + Delete'; // FIXME Add links - return result; + let nodes = ''; + if ( can_edit_items_from[row.holding_library_id] ){ + [% IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %] + nodes += '
'; + nodes += ' Edit'.format(row.biblio_id, row.item_id); + nodes += ' '; + nodes += '
'; + [% ELSE %] + nodes += ' Edit'.format(row.biblio_id, row.item_id); + [% END %] + } + [% IF bundlesEnabled %] + // FIXME How do we handle that correctly? + //nodes += ''.format(row.bundled, row.bundled_lost); + [% END %] + + return nodes; }, className: "actions", searchable: false, -- 2.34.1