From 652b22fa8e5bd739f690815a40b4bdca91bd3fdf 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 --- .../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 | 74 +++++++++++---------- .../en/modules/authorities/searchresultlist.tt | 45 ++----------- 7 files changed, 132 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 45517c8..1f4bab7 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 d8d736a..348b7ad 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 003e673..9e1443d 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,42 @@ function changeFramework(fw) { +[% MACRO jsinclude BLOCK %] + [% 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 76e4589..2c8e8e0 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.1.4