View | Details | Raw Unified | Return to bug 20968
Collapse All | Expand All

(-)a/catalogue/detail.pl (+15 lines)
Lines 22-27 use CGI qw ( -utf8 ); Link Here
22
use HTML::Entities;
22
use HTML::Entities;
23
use C4::Acquisition qw( GetHistory );
23
use C4::Acquisition qw( GetHistory );
24
use C4::Auth;
24
use C4::Auth;
25
use C4::Context;
25
use C4::Koha;
26
use C4::Koha;
26
use C4::Serials;    #uses getsubscriptionfrom biblionumber
27
use C4::Serials;    #uses getsubscriptionfrom biblionumber
27
use C4::Output;
28
use C4::Output;
Lines 46-51 use Koha::Items; Link Here
46
use Koha::ItemTypes;
47
use Koha::ItemTypes;
47
use Koha::Patrons;
48
use Koha::Patrons;
48
use Koha::Virtualshelves;
49
use Koha::Virtualshelves;
50
use Koha::Plugins;
49
51
50
my $query = CGI->new();
52
my $query = CGI->new();
51
53
Lines 61-66 my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user( Link Here
61
    }
63
    }
62
);
64
);
63
65
66
# Determine if we should be offering any enhancement plugin buttons
67
if ( C4::Context->preference('UseKohaPlugins') &&
68
	 C4::Context->config('enable_plugins') ) {
69
	my @plugins = Koha::Plugins->new()->GetPlugins({
70
		method => 'intranet_catalog_biblio_enhancements'
71
	});
72
	# Only pass plugins that can offer a toolbar button
73
	@plugins = grep { $_->get_toolbar_button } @plugins;
74
	$template->param(
75
		plugins => \@plugins
76
	);
77
}
78
64
my $biblionumber = $query->param('biblionumber');
79
my $biblionumber = $query->param('biblionumber');
65
$biblionumber = HTML::Entities::encode($biblionumber);
80
$biblionumber = HTML::Entities::encode($biblionumber);
66
my $record       = GetMarcBiblio({ biblionumber => $biblionumber });
81
my $record       = GetMarcBiblio({ biblionumber => $biblionumber });
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc (+4 lines)
Lines 139-144 CAN_user_serials_create_subscription ) %] Link Here
139
    <div class="btn-group"><a id="placehold" class="btn btn-default btn-sm" href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% biblionumber %]"><i class="fa fa-file-text-o"></i> Request article</a></div>
139
    <div class="btn-group"><a id="placehold" class="btn btn-default btn-sm" href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% biblionumber %]"><i class="fa fa-file-text-o"></i> Request article</a></div>
140
[% END %]
140
[% END %]
141
141
142
[% FOREACH p IN plugins %]
143
	[% p.get_toolbar_button %]
144
[% END %]
145
142
</div>
146
</div>
143
147
144
    <!--Modal for Dublin Core-->
148
    <!--Modal for Dublin Core-->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt (-1 / +3 lines)
Lines 33-38 Link Here
33
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=tool">View tool plugins</a></li>
33
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=tool">View tool plugins</a></li>
34
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=to_marc">View MARC conversion plugins</a></li>
34
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=to_marc">View MARC conversion plugins</a></li>
35
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=opac_online_payment">View online payment plugins</a></li>
35
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=opac_online_payment">View online payment plugins</a></li>
36
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=intranet_catalog_biblio_enhancements">View intranet catalog biblio enhancement plugins</a></li>
36
                                </ul>
37
                                </ul>
37
                            </div>
38
                            </div>
38
                        </div>
39
                        </div>
Lines 51-56 Link Here
51
                                <div class="dialog message">No plugins that can convert files to MARC records are installed</div>
52
                                <div class="dialog message">No plugins that can convert files to MARC records are installed</div>
52
                            [% ELSIF method == 'opac_online_payment' %]
53
                            [% ELSIF method == 'opac_online_payment' %]
53
                                <div class="dialog message">No plugins that can process online payments via the public catalog are installed</div>
54
                                <div class="dialog message">No plugins that can process online payments via the public catalog are installed</div>
55
                            [% ELSIF method == 'intranet_catalog_biblio_enhancements' %]
56
                                <div class="dialog message">No plugins that can enhance the intranet catalog biblio records are installed</div>
54
                            [% ELSE %]
57
                            [% ELSE %]
55
                                <div class="dialog message">Unknown plugin type <i>[% method %]</i></div>
58
                                <div class="dialog message">Unknown plugin type <i>[% method %]</i></div>
56
                            [% END %]
59
                            [% END %]
57
- 

Return to bug 20968