From 2a8338fb87dd9a3e5fd1466ad63c5e1d8bffc0ba 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 Signed-off-by: Jonathan Druart --- .../automatic_item_modification_by_age.tt | 40 +-- .../en/modules/tools/manage-marc-import.tt | 257 +++++++++--------- .../tools/marc_modification_templates.tt | 37 +-- .../prog/en/modules/tools/showdiffmarc.tt | 25 +- .../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 44aa3ff4b6..205b71df43 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 7bbb7d4bbe..82e1e2beae 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' %] - @@ -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 93edb3982b..b9c1307823 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 acbf12163f..12fdef5728 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.39.5