http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780
--- Comment #3 from Indranil Das Gupta <[email protected]> --- 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_v1.01 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. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
