From dc27978d7326a6be561f1bbcf29ce9f37791592b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 8 Dec 2017 19:09:05 +0000 Subject: [PATCH] Bug 19785: Move template JavaScript to the footer: Authorities, part 1 This patch modifies even more staff client authorities 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 the modified templates: All button controls, DataTables functionality, tabs, etc. - Authorities - New from Z39.50 -> Search -> Results - New from Z39.50 - Deletion confirmation - Merge records -> Merge - Tabs - Tag selection -> Authority detail - Tabs - Deletion confirmation - New from Z39.50 Signed-off-by: Claire Gravely Signed-off-by: Katrin Fischer --- .../prog/en/includes/authorities-search.inc | 16 ----- .../prog/en/includes/authorities-toolbar.inc | 24 ------- .../prog/en/includes/authorities_js.inc | 54 +++++++++++++++- .../en/modules/authorities/authorities-home.tt | 28 ++------ .../prog/en/modules/authorities/detail.tt | 75 ++++++++-------------- .../prog/en/modules/authorities/merge.tt | 75 ++++++++++++---------- .../en/modules/authorities/searchresultlist.tt | 45 ++----------- 7 files changed, 133 insertions(+), 184 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc index 45517c8d37..1f4bab7e2c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc @@ -1,22 +1,6 @@

[% LibraryName %]

- + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'authorities_js.inc' %] +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt index 5694a2d02b..b8d7c37509 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% PROCESS 'authorities.inc' %] [% INCLUDE 'doc-head-open.inc' %] Koha › Authorities › @@ -8,56 +9,8 @@ [% END %] [% INCLUDE 'doc-head-close.inc' %] -[% IF ( displayhierarchy ) %] - -[% END %] - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'authorities-search.inc' %] @@ -143,4 +96,28 @@ function searchauthority() { [% END %]
+[% MACRO jsinclude BLOCK %] + [% INCLUDE 'authorities_js.inc' %] + [% IF ( displayhierarchy ) %] + + [% END %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt index 0d30a7848e..4badb7ba06 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt @@ -1,47 +1,15 @@ [% PROCESS 'merge-record.inc' %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Cataloging › Merging records [% INCLUDE 'doc-head-close.inc' %] - -[% INCLUDE 'merge-record-strings.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'authorities-search.inc' %] @@ -139,4 +107,43 @@ function changeFramework(fw) { +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'merge-record-strings.inc' %] + [% INCLUDE 'authorities_js.inc' %] + + [% INCLUDE 'merge-record-strings.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt index 76e45895fa..2c8e8e0ea3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt @@ -1,46 +1,10 @@ +[% SET footerjs = 1 %] [% PROCESS 'authorities-search-results.inc' %] [% INCLUDE 'doc-head-open.inc' %] Koha › Authorities › Authority search results [% INCLUDE 'doc-head-close.inc' %] - -[% INCLUDE 'authorities_js.inc' %] + [% INCLUDE 'header.inc' %] [% INCLUDE 'authorities-search.inc' %] @@ -116,4 +80,9 @@ function searchauthority() { + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'authorities_js.inc' %] +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] -- 2.14.1