From 053731e8006abcafe60f57d3c2a7aee518bcf701 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 21 Nov 2017 15:14:58 +0000 Subject: [PATCH] Bug 19672: Move tools templates JavaScript to the footer: More MARC tools This patch modifies some staff client templates from the "Tools" section so that JavaScript is included in the footer instead of the header. - Automatic item modifications by age - MARC modification templates - Stage MARC records for import - Staged MARC record management To test, apply the patch and test the JavaScript-driven features of each modified template: All button controls, DataTables functionality, form validation, etc. Signed-off-by: Claire Gravely Signed-off-by: Josef Moravec --- .../tools/automatic_item_modification_by_age.tt | 40 ++-- .../prog/en/modules/tools/manage-marc-import.tt | 257 +++++++++++---------- .../modules/tools/marc_modification_templates.tt | 37 +-- .../prog/en/modules/tools/showdiffmarc.tt | 25 +- .../prog/en/modules/tools/stage-marc-import.tt | 164 ++++++------- 5 files changed, 272 insertions(+), 251 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/automatic_item_modification_by_age.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/automatic_item_modification_by_age.tt index 44aa3ff..205b71d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/automatic_item_modification_by_age.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/automatic_item_modification_by_age.tt @@ -1,24 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Automatic item modifications by age [% INCLUDE 'doc-head-close.inc' %] - - -[% IF op == 'edit_form' %] - -[% END %] + [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] @@ -236,4 +221,25 @@ [% INCLUDE 'tools-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + + + [% IF op == 'edit_form' %] + + [% END %] +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt index b4403ef..5054035 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Manage staged MARC records [% IF ( import_batch_id ) %] @@ -5,134 +6,7 @@ [% END %] [% INCLUDE 'doc-head-close.inc' %] - -[% INCLUDE 'datatables.inc' %] - @@ -505,4 +379,133 @@ Page [% INCLUDE 'tools-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt index 6d32500..228c8a5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt @@ -1,23 +1,7 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › MARC modification templates [% INCLUDE 'doc-head-close.inc' %] - - @@ -350,4 +334,23 @@ +[% MACRO jsinclude BLOCK %] + + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/showdiffmarc.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/showdiffmarc.tt index 93edb39..b9c1307 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/showdiffmarc.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/showdiffmarc.tt @@ -1,15 +1,7 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Manage staged MARC records › Compare matched records [% INCLUDE 'doc-head-close.inc' %] - - + [% INCLUDE 'header.inc' %] @@ -52,4 +45,18 @@

Return to staged MARC batch [% batchid %]

+ +[% MACRO jsinclude BLOCK %] + + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt index acbf121..12fdef5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt @@ -1,91 +1,11 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Stage MARC records for import [% INCLUDE 'doc-head-close.inc' %] - - - - - [% INCLUDE 'header.inc' %] @@ -275,4 +195,86 @@ function cbUpload( status, fileid, errors ) { [% INCLUDE 'tools-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] -- 2.1.4