Browse Source

Bug 19173: Add opac payment and marc conversion plugins to the pulldown filter list

Edit: fixed tab-for-space errors (tcohen).

Signed-off-by: Magnus Enger <magnus@libriotech.no>
New categories are added to the pulldown and work as expected.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17.11.x
Kyle Hall 7 years ago
committed by Jonathan Druart
parent
commit
402c7f7567
  1. 6
      koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt
  2. 8
      opac/opac-account.pl

6
koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt

@ -39,6 +39,8 @@
<li><a href="/cgi-bin/koha/plugins/plugins-home.pl">View all plugins</a></li> <li><a href="/cgi-bin/koha/plugins/plugins-home.pl">View all plugins</a></li>
<li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=report">View report plugins</a></li> <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=report">View report plugins</a></li>
<li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=tool">View tool plugins</a></li> <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=tool">View tool plugins</a></li>
<li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=to_marc">View MARC conversion plugins</a></li>
<li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=opac_online_payment">View online payment plugins</a></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -53,6 +55,10 @@
<div class="dialog message">No plugins that can be used as a tool are installed</div> <div class="dialog message">No plugins that can be used as a tool are installed</div>
[% ELSIF method == 'report' %] [% ELSIF method == 'report' %]
<div class="dialog message">No plugins that can create a report are installed</div> <div class="dialog message">No plugins that can create a report are installed</div>
[% ELSIF method == 'to_marc' %]
<div class="dialog message">No plugins that can convert files to MARC records are installed</div>
[% ELSIF method == 'opac_online_payment' %]
<div class="dialog message">No plugins that can process online payments via the public catalog are installed</div>
[% ELSE %] [% ELSE %]
<div class="dialog message">Unknown plugin type <i>[% method %]</i></div> <div class="dialog message">Unknown plugin type <i>[% method %]</i></div>
[% END %] [% END %]

8
opac/opac-account.pl

@ -80,12 +80,12 @@ $template->param(
my $plugins_enabled = C4::Context->preference('UseKohaPlugins') && C4::Context->config("enable_plugins"); my $plugins_enabled = C4::Context->preference('UseKohaPlugins') && C4::Context->config("enable_plugins");
if ( $plugins_enabled ) { if ( $plugins_enabled ) {
my @plugins = Koha::Plugins->new()->GetPlugins({ my @plugins = Koha::Plugins->new()->GetPlugins({
method => 'opac_online_payment', method => 'opac_online_payment',
}); });
# Only pass in plugins where opac online payment is enabled # Only pass in plugins where opac online payment is enabled
@plugins = grep { $_->opac_online_payment } @plugins; @plugins = grep { $_->opac_online_payment } @plugins;
$template->param( plugins => \@plugins ); $template->param( plugins => \@plugins );
} }
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };

Loading…
Cancel
Save