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

(-)a/catalogue/detail.pl (+15 lines)
Lines 21-26 use Modern::Perl; Link Here
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use HTML::Entities;
22
use HTML::Entities;
23
use C4::Auth;
23
use C4::Auth;
24
use C4::Context;
24
use C4::Koha;
25
use C4::Koha;
25
use C4::Serials;    #uses getsubscriptionfrom biblionumber
26
use C4::Serials;    #uses getsubscriptionfrom biblionumber
26
use C4::Output;
27
use C4::Output;
Lines 45-50 use Koha::Items; Link Here
45
use Koha::ItemTypes;
46
use Koha::ItemTypes;
46
use Koha::Patrons;
47
use Koha::Patrons;
47
use Koha::Virtualshelves;
48
use Koha::Virtualshelves;
49
use Koha::Plugins;
48
50
49
my $query = CGI->new();
51
my $query = CGI->new();
50
52
Lines 60-65 my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user( Link Here
60
    }
62
    }
61
);
63
);
62
64
65
# Determine if we should be offering any enhancement plugin buttons
66
if ( C4::Context->preference('UseKohaPlugins') &&
67
	 C4::Context->config('enable_plugins') ) {
68
	my @plugins = Koha::Plugins->new()->GetPlugins({
69
		method => 'intranet_catalog_biblio_enhancements'
70
	});
71
	# Only pass plugins that can offer a toolbar button
72
	@plugins = grep { $_->get_toolbar_button } @plugins;
73
	$template->param(
74
		plugins => \@plugins
75
	);
76
}
77
63
my $biblionumber = $query->param('biblionumber');
78
my $biblionumber = $query->param('biblionumber');
64
$biblionumber = HTML::Entities::encode($biblionumber);
79
$biblionumber = HTML::Entities::encode($biblionumber);
65
my $record       = GetMarcBiblio({ biblionumber => $biblionumber });
80
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 | html %]"><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 | html %]"><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 34-39 Link Here
34
                                    <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=tool">View tool plugins</a></li>
35
                                    <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=to_marc">View MARC conversion plugins</a></li>
36
                                    <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=opac_online_payment">View online payment plugins</a></li>
37
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=intranet_catalog_biblio_enhancements">View intranet catalog biblio enhancement plugins</a></li>
37
                                </ul>
38
                                </ul>
38
                            </div>
39
                            </div>
39
                        </div>
40
                        </div>
Lines 52-57 Link Here
52
                                <div class="dialog message">No plugins that can convert files to MARC records are installed</div>
53
                                <div class="dialog message">No plugins that can convert files to MARC records are installed</div>
53
                            [% ELSIF method == 'opac_online_payment' %]
54
                            [% ELSIF method == 'opac_online_payment' %]
54
                                <div class="dialog message">No plugins that can process online payments via the public catalog are installed</div>
55
                                <div class="dialog message">No plugins that can process online payments via the public catalog are installed</div>
56
                            [% ELSIF method == 'intranet_catalog_biblio_enhancements' %]
57
                                <div class="dialog message">No plugins that can enhance the intranet catalog biblio records are installed</div>
55
                            [% ELSE %]
58
                            [% ELSE %]
56
                                <div class="dialog message">Unknown plugin type <i>[% method | html %]</i></div>
59
                                <div class="dialog message">Unknown plugin type <i>[% method | html %]</i></div>
57
                            [% END %]
60
                            [% END %]
58
- 

Return to bug 20968