From d0bd4aaf542c73b686e021eec066886f0b80a5e6 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 15 Nov 2017 16:08:57 +0000 Subject: [PATCH] Bug 19628: Move course reserves templates JS to the footer This patch modifies the staff client course reserves templates so that JavaScript is included in the footer instead of the header. To test, apply the patch and test the JavaScript-driven features of each page: All button controls, DataTables, autocomplete, etc. Signed-off-by: Claire Gravely --- .../en/modules/course_reserves/course-details.tt | 80 ++++++++-------- .../en/modules/course_reserves/course-reserves.tt | 21 +++-- .../prog/en/modules/course_reserves/course.tt | 105 ++++++++++----------- 3 files changed, 103 insertions(+), 103 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt index 29f0132..1d433e8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt @@ -1,51 +1,12 @@ [% USE AuthorisedValues %] [% USE ItemTypes %] [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Course reserves › Course details for [% course.course_name %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - - @@ -233,4 +194,43 @@ +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt index 97c2f65..8abc0b0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt @@ -1,19 +1,12 @@ [% USE AuthorisedValues %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Course reserves [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - - + [% INCLUDE 'header.inc' %] @@ -106,5 +99,15 @@ $(document).ready(function() { +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + +[% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt index 1a3e01e..78dad2c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt @@ -1,60 +1,7 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Course reserves › [% IF course_name %] Edit [% course_name %] [% ELSE %] New course [% END %] [% INCLUDE 'doc-head-close.inc' %] - -[% IF ( departments ) %] - - - -[% END %] - @@ -188,4 +135,54 @@ [% END %] +[% IF ( departments ) %] + [% MACRO jsinclude BLOCK %] + + [% END %] +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] -- 2.1.4