Bug 20968: (follow-up) Respond to feedback
authorAndrew Isherwood <andrew.isherwood@ptfs-europe.com>
Wed, 27 Jun 2018 16:13:27 +0000 (17:13 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 2 Nov 2018 10:36:02 +0000 (10:36 +0000)
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 <s.graham4@herts.ac.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

catalogue/detail.pl
koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc

index 2707a81..73c37c6 100755 (executable)
@@ -65,11 +65,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
        );
index 597c4f7..4e84865 100644 (file)
@@ -140,7 +140,7 @@ CAN_user_serials_create_subscription ) %]
 [% END %]
 
 [% FOREACH p IN plugins %]
-       [% p.get_toolbar_button %]
+       [% p.get_intranet_catalog_toolbar_button %]
 [% END %]
 
 </div>