[Bug 12780] New: Addition of plugins-menu.inc for handling a nav menu for Koha Plugins
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 Bug ID: 12780 Summary: Addition of plugins-menu.inc for handling a nav menu for Koha Plugins Change sponsored?: --- Product: Koha Version: 3.16 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: indradg@gmail.com QA Contact: gmcharlt@gmail.com Unlike other *-menu.inc files in the /intranet-tmpl/prog/en/includes directory, Koha plugin do not include such a file. This bug/patch is intended to add such sopport. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Test Suite |Tools Assignee|chris@bigballofwax.co.nz |gmcharlt@gmail.com QA Contact|gmcharlt@gmail.com |testopia@bugs.koha-communit | |y.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P3 CC| |indradg@gmail.com Patch complexity|--- |Trivial patch Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com Assignee|gmcharlt@gmail.com |indradg@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 --- Comment #1 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 30973 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30973&action=edit Screenshot of plugins-menu.inc patch in action -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 --- Comment #2 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 30974 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30974&action=edit plugins-menu.inc patch (commit msg without test plan) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 --- Comment #3 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 30976 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30976&action=edit plugins-menu.inc patch (commit msg with test plan) Koha plugins system (http://manual.koha-community.org/3.16/en/pluginsystem.html) does not provide a ready method to show an auto-populated nav menu for the plugins installed in the system. This patch adds that capability and allows plugin authors to add this .inc file in the plugin's template file. Test Plan: 1) Apply this patch 2) Upload a copy of "Kitchen Sink Example" plugin from ByWater Solutions's website http://git.bywatersolutions.com/koha-plugins.git/snapshot/tags/kitchen_sink_... 3) Edit "<pluginsdir>/Koha/Plugin/Com/ByWaterSolutions/KitchenSink/tool-step1.tt" Replace the line "<div id="doc3">" with : <div id="doc3" class="yui-t2"> <div id="bd"> <div id="yui-main"> <div class="yui-b"> Also, just before the line "[% INCLUDE 'intranet-bottom.inc' %]" at the end of the file, insert the following lines : </div> </div> <div class="yui-b noprint"> [% INCLUDE 'plugins-menu.inc' %] </div> </div> </div> Note: <pluginsdir> as defined in your koha-conf.xml 4) Edit "<pluginsdir>/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm" by adding : use Koha::Plugins; after the line : use base qw(Koha::Plugins::Base); Also, just after the line : my $template = $self->get_template({ file => 'tool-step1.tt' }); Insert the following : my @reports = Koha::Plugins->new()->GetPlugins("report"); $template->param( reports => \@reports, ); my @tools = Koha::Plugins->new()->GetPlugins("tool"); $template->param( tools => \@tools, ); 5) Go to http://<intranet_hostname>/cgi-bin/koha/plugins/plugins-home.pl and click on "Run tool" link. 6) The page should now show the menu on the left, with the KitchenSink plugin under the "Plugin Tools" sub-menu being highlighted. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Addition of |Addition of |plugins-menu.inc for |plugins-menu.inc for addinh |handling a nav menu for |a nav menu for Koha Plugins |Koha Plugins | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Addition of |Addition of |plugins-menu.inc for addinh |plugins-menu.inc for adding |a nav menu for Koha Plugins |a nav menu for Koha Plugins -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.16 |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30974|0 |1 is obsolete| | Attachment #30976|0 |1 is obsolete| | --- Comment #4 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 31069 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31069&action=edit Patch to add plugins-menu.inc nav menu Koha plugins system (http://manual.koha-community.org/3.16/en/pluginsystem.html) does not provide a ready method to show an auto-populated nav menu for the plugins installed in the system. This patch adds that capability and allows plugin authors to add this .inc file in the plugin's template file Test Plan: 1) Apply this patch 2) Upload a copy of "Kitchen Sink Example" plugin from ByWater Solutions's website http://git.bywatersolutions.com/koha-plugins.git/snapshot/tags/kitchen_sink_... 3) Edit "<pluginsdir>/Koha/Plugin/Com/ByWaterSolutions/KitchenSink/tool-step1.tt" Replace the line "<div id="doc3">" with : <div id="doc3" class="yui-t2"> <div id="bd"> <div id="yui-main"> <div class="yui-b"> Also, just before the line "[% INCLUDE 'intranet-bottom.inc' %]" at the end of the file, insert the following lines : </div> </div> <div class="yui-b noprint"> [% INCLUDE 'plugins-menu.inc' %] </div> </div> </div> Note: <pluginsdir> as defined in your koha-conf.xml 4) Edit "<pluginsdir>/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm" by adding: use Koha::Plugins; after the line : use base qw(Koha::Plugins::Base); Also, just after the line : my $template = $self->get_template({ file => 'tool-step1.tt' }); Insert the following : my @reports = Koha::Plugins->new()->GetPlugins("report"); $template->param( reports => \@reports, ); my @tools = Koha::Plugins->new()->GetPlugins("tool"); $template->param( tools => \@tools, ); 5) Go to http://<intranet_hostname>/cgi-bin/koha/plugins/plugins-home.pl and click on "Run tool" link. 6) The page should now show the menu on the left, with the KitchenSink plugin under the "Plugin Tools" sub-menu being highlighted. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion CC| |frederic@tamil.fr, | |kyle@bywatersolutions.com --- Comment #5 from Frédéric Demians <frederic@tamil.fr> --- I see one issue with this patch. It may be usefull, but the way it's implemented if included to Koha, all existing plugins in the wild would have to be updated to work properly with it: points 3 & 4 of your test plan. Plugins system author opinion is required. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=10713 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org