From cf79a2694eab08613b409bec2b14c8f6949cd8c2 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 Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- .../modules/course_reserves/course-details.tt | 80 ++++++------- .../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 29f0132fb3..1d433e8538 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 97c2f65e07..8abc0b092c 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 1a3e01ecbc..78dad2cd45 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.39.2