Bugzilla – Attachment 109433 Details for
Bug 26338
Show tool plugins run in tools home
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26338: Show tool plugins run in tools home
Bug-26338-Show-tool-plugins-run-in-tools-home.patch (text/plain), 2.79 KB, created by
Fridolin Somers
on 2020-09-01 13:48:24 UTC
(
hide
)
Description:
Bug 26338: Show tool plugins run in tools home
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2020-09-01 13:48:24 UTC
Size:
2.79 KB
patch
obsolete
>From 14dc58e6999f5dcd8bd04fadd7b0d54018e0d8bf Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Tue, 1 Sep 2020 15:43:19 +0200 >Subject: [PATCH] Bug 26338: Show tool plugins run in tools home > >In tools home there is a link to the table showing tool plugins. >Would be great to be able to run a tool plugin directly from tools home. > >Also adds the behavior than if there is no tool plugin, "Tool plugins" >section is not displayed in tools home. >No need of a link that goes to an empty table ;) > >Test plan : >1) Enable plugins, dont install any >2) Go to "Tools" module : /cgi-bin/koha/tools/tools-home.pl >3) Check you dont see "Tool plugins" >4) Install a tool plugin like Carrousel https://inlibro.com/instructions-carrousel/ >5) Refresh /cgi-bin/koha/tools/tools-home.pl >6) Check you see "Tool plugins" and a link to Carrousel >7) Click on link to Carrousel => You see plugin run >8) Disable Carrousel plugin >9) Refresh /cgi-bin/koha/tools/tools-home.pl >10) Check you dont see "Tool plugins" >--- > .../prog/en/modules/tools/tools-home.tt | 13 +++++++++++-- > tools/tools-home.pl | 7 +++++++ > 2 files changed, 18 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >index 350fd1b28d..d34f7360be 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >@@ -120,9 +120,18 @@ > <dd>Quote editor for Quote-of-the-day feature in OPAC</dd> > [% END %] > >- [% IF ( Koha.ArePluginsEnabled() && CAN_user_plugins_tool ) %] >+ [% IF ( Koha.ArePluginsEnabled() && CAN_user_plugins_tool && tool_plugins ) %] > <dt><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=tool">Tool plugins</a></dt> >- <dd>Use tool plugins</dd> >+ <dd> >+ Use tool plugins >+ [% FOREACH plugin IN tool_plugins %] >+ <div class="plugin_link"> >+ <a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class | uri %]&method=tool"> >+ Run plugin <span class="plugin_name">[% plugin.metadata.name | html %]</span> >+ </a> >+ </div> >+ [% END %] >+ </dd> > [% END %] > > [% IF ( CAN_user_tools_upload_general_files ) %] >diff --git a/tools/tools-home.pl b/tools/tools-home.pl >index 99fde6391d..d171e44702 100755 >--- a/tools/tools-home.pl >+++ b/tools/tools-home.pl >@@ -43,4 +43,11 @@ $template->param( > pendingtags => $pendingtags > ); > >+if ( C4::Context->config('enable_plugins') ) { >+ my @tool_plugins = Koha::Plugins->new()->GetPlugins({ >+ method => 'tool', >+ }); >+ $template->param( tool_plugins => \@tool_plugins ); >+} >+ > output_html_with_http_headers $query, $cookie, $template->output; >-- >2.27.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26338
:
109432
|
109433
|
109835
|
109836
|
109842
|
109993