Bugzilla – Attachment 30974 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 without test plan)
0001-Bug-12780-ENH-Adds-plugins-menu.inc-to-support-nav-m.patch (text/plain), 2.89 KB, created by
Indranil Das Gupta
on 2014-08-19 09:25:26 UTC
(
hide
)
Description:
plugins-menu.inc patch (commit msg without test plan)
Filename:
MIME Type:
Creator:
Indranil Das Gupta
Created:
2014-08-19 09:25:26 UTC
Size:
2.89 KB
patch
obsolete
>From 54e0ab8d49018044a7515466dc4c2f31d6cebcba Mon Sep 17 00:00:00 2001 >From: Indranil Das Gupta <indradg@gmail.com> >Date: Tue, 19 Aug 2014 07:42:10 +0000 >Subject: [PATCH 1/2] Bug 12780 [ENH] Adds plugins-menu.inc to support nav menu > 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. >--- > .../prog/en/includes/plugins-menu.inc | 65 ++++++++++++++++++++++ > 1 file changed, 65 insertions(+) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/plugins-menu.inc > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/plugins-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/plugins-menu.inc >new file mode 100644 >index 0000000..9bfa681 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/plugins-menu.inc >@@ -0,0 +1,65 @@ >+<script type="text/javascript">//<![CDATA[ >+ $(document).ready(function() { >+ var path = location.pathname.substring(1); >+ var url = window.location.toString(); >+ var params = ''; >+ if ( url.match(/\?(.+)$/) ) { >+ params = RegExp.$1; >+ >+ var outstring = "?"; >+ >+ var qstr = params.split("&"); >+ >+ for (i=0; i < qstr.length; i++) { >+ var qstrkey = qstr[i].split("="); >+ for (j=0; j < qstrkey.length; j++) { >+ if (qstrkey[j] == "class" || qstrkey[j] == "method" ) { >+ if (i > 0) { >+ outstring = outstring + "&" + qstrkey[0] + "=" + qstrkey[1]; >+ } else { >+ outstring = outstring + qstrkey[0] + "=" + qstrkey[1]; >+ } >+ } >+ } >+ } >+ } >+ $('#navmenulist a[href$="/' + path + outstring + '"]').css('font-weight','bold'); >+ }); >+//]]> >+</script> >+<div id="navmenu"> >+<div id="navmenulist"> >+<h5>Custom Plug-ins >+</h5> >+<ul> >+ <li><a href="/cgi-bin/koha/plugins/plugins-home.pl">Plugins home</a></li> >+ <li><a href="/cgi-bin/koha/plugins/plugins-upload.pl">Upload plugins</a></li> >+</ul> >+ >+[% IF ( reports ) %] >+ <h5>Plugin Reports</h5> >+ [% FOREACH report IN reports %] >+ <ul> >+ [% IF ( CAN_user_plugins_report ) %] >+ [% IF report.can('report') %] >+ <li><a href="/cgi-bin/koha/plugins/run.pl?class=[% report.class %]&method=report">[% report.metadata.name %]</a></li> >+ [% END %] >+ [% END %] >+ </ul> >+ [% END %] >+[% END %] >+ >+[% IF ( tools ) %] >+ <h5>Plugin Tools</h5> >+ [% FOREACH tool IN tools %] >+ <ul> >+ [% IF ( CAN_user_plugins_report ) %] >+ [% IF tool.can('tool') %] >+ <li><a href="/cgi-bin/koha/plugins/run.pl?class=[% tool.class %]&method=tool">[% tool.metadata.name %]</a></li> >+ [% END %] >+ [% END %] >+ </ul> >+ [% END %] >+[% END %] >+ >+</div></div> >\ No newline at end of file >-- >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