Bugzilla – Attachment 30976 Details for
Bug 12780
Addition of plugins-menu.inc for adding a nav menu for Koha Plugins
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
plugins-menu.inc patch (commit msg with test plan)
0002-Bug-12780-ENH-Adds-plugins-menu.inc-to-support-nav-m.patch (text/plain), 2.91 KB, created by
Indranil Das Gupta
on 2014-08-19 09:27:59 UTC
(
hide
)
Description:
plugins-menu.inc patch (commit msg with test plan)
Filename:
MIME Type:
Creator:
Indranil Das Gupta
Created:
2014-08-19 09:27:59 UTC
Size:
2.91 KB
patch
obsolete
>From 13fd73c731d3b5daeefa5419cbb199265e768077 Mon Sep 17 00:00:00 2001 >From: Indranil Das Gupta <indradg@gmail.com> >Date: Tue, 19 Aug 2014 09:12:36 +0000 >Subject: [PATCH 2/2] Bug 12780 [ENH] Adds plugins-menu.inc to support nav > mexnu for plugins installed > >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. >--- > koha-tmpl/intranet-tmpl/prog/en/includes/plugins-menu.inc | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/plugins-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/plugins-menu.inc >index 9bfa681..1f2b012 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/plugins-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/plugins-menu.inc >@@ -1,3 +1,4 @@ >+<!-- http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 --> > <script type="text/javascript">//<![CDATA[ > $(document).ready(function() { > var path = location.pathname.substring(1); >@@ -27,6 +28,7 @@ > }); > //]]> > </script> >+<!-- http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12780 --> > <div id="navmenu"> > <div id="navmenulist"> > <h5>Custom Plug-ins >@@ -62,4 +64,4 @@ > [% END %] > [% END %] > >-</div></div> >\ No newline at end of file >+</div></div> >-- >1.8.1.2 >
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 12780
:
30973
|
30974
|
30976
|
31069