From 76d9c74ffaea455bdb8b1756b69ee2af1f40d090 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 28 Nov 2017 19:04:43 +0000 Subject: [PATCH] Bug 19710: Move plugins templates javascript to the footer This patch modifies the staff client plugins template so that JavaScript is included in the footer instead of the header. To test, apply the patch and test the JavaScript-driven features of the modified template: - The plugins link should be bold in the sidebar menu. - Choosing "Uninstall" for an installed plugin should trigger a confirmation alert. Signed-off-by: Claire Gravely Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- .../prog/en/modules/plugins/plugins-home.tt | 24 +++++++++++-------- koha-tmpl/intranet-tmpl/prog/js/tools-menu.js | 2 ++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt index 29b9d752b7..0507e151a5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt @@ -1,17 +1,8 @@ [% USE KohaDates %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Plugins [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] - @@ -142,5 +133,18 @@ +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'calendar.inc' %] + +[% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js b/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js index eafaca3551..fe167a0178 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js +++ b/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js @@ -12,6 +12,8 @@ $('#navmenulist a[href$="/cgi-bin/koha/tools/batchMod.pl?del=1"]').css('font-weight','bold'); } else if (path.indexOf("quotes-upload.pl") >= 0 ){ $('#navmenulist a[href$="/cgi-bin/koha/tools/quotes.pl"]').css('font-weight','bold'); + } else if (path.indexOf("plugins") >= 0 ) { + $('#navmenulist a[href$="/cgi-bin/koha/plugins/plugins-home.pl?method=tool"]').css('font-weight','bold'); } else { $('#navmenulist a[href$="/' + path + '"]').css('font-weight','bold'); } -- 2.20.1