From 76edb4d9ae346ecf398a7df7aec5e2cee18ee0d7 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Wed, 27 Jun 2018 17:13:27 +0100 Subject: [PATCH] Bug 20968: (follow-up) Respond to feedback This patch: - Removes the unecessary testing for intranet_catalog_biblio_enhancements method in detail.pl - Renames get_toolbar_button to get_intranet_catalog_toolbar_button Signed-off-by: Stephen Graham Signed-off-by: Kyle M Hall Signed-off-by: Nick Clemens (cherry picked from commit 7910a530b85b6ee42307d41cba57b95ced2aca27) Signed-off-by: Martin Renvoize (cherry picked from commit cd3af66cd47c34bc01afa188ce879a4d3e2cc353) Signed-off-by: Fridolin Somers --- catalogue/detail.pl | 5 ++--- koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 0e8405ea65..46687ec42b 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -66,11 +66,10 @@ my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user( # Determine if we should be offering any enhancement plugin buttons if ( C4::Context->preference('UseKohaPlugins') && C4::Context->config('enable_plugins') ) { + # Only pass plugins that can offer a toolbar button my @plugins = Koha::Plugins->new()->GetPlugins({ - method => 'intranet_catalog_biblio_enhancements' + method => 'get_intranet_catalog_toolbar_button' }); - # Only pass plugins that can offer a toolbar button - @plugins = grep { $_->get_toolbar_button } @plugins; $template->param( plugins => \@plugins ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index a32f51d958..1d54cc0332 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -139,7 +139,7 @@ CAN_user_serials_create_subscription ) %] [% END %] [% FOREACH p IN plugins %] - [% p.get_toolbar_button %] + [% p.get_intranet_catalog_toolbar_button %] [% END %] -- 2.39.5