From c9839e84950f84a73da8bdff9d038b956dc04198 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 14 Nov 2017 17:53:24 +0000 Subject: [PATCH] Bug 19623: Move template JavaScript to the footer: Cataloging This patch modifies some staff client cataloging templates so that JavaScript is included in the footer instead of the header. Several cataloging templates are excluded because they require significant structural changes: addbiblio.tt, additem.tt, and editor.tt To test, apply the patch and test the JavaScript-driven features of the modified templates: All button controls, DataTables functionality, tabs, etc. Note that z350_auth_search.tt is tested by performing a Z39.50 search from the Authorities module. Signed-off-by: Claire Gravely Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- .../prog/en/modules/cataloguing/addbooks.tt | 158 ++++++------ .../prog/en/modules/cataloguing/merge.tt | 228 +++++++++--------- .../modules/cataloguing/z3950_auth_search.tt | 105 ++++---- .../en/modules/cataloguing/z3950_search.tt | 81 +++---- 4 files changed, 289 insertions(+), 283 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt index d6d39d8e86..5293029bf2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt @@ -1,85 +1,10 @@ [% USE Koha %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Cataloging [% INCLUDE 'doc-head-close.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'cataloging-search.inc' %] @@ -286,4 +211,83 @@ + +[% MACRO jsinclude BLOCK %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt index 464d763e34..a672811ef6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt @@ -3,126 +3,14 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Cataloging › Merging records [% INCLUDE 'doc-head-close.inc' %] - -[% INCLUDE 'merge-record-strings.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'cataloging-search.inc' %] @@ -296,4 +184,118 @@ $(document).ready(function(){ +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'merge-record-strings.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt index 6e6de65fa3..df1e3d9ddc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt @@ -1,45 +1,8 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Z39.50 search results [% INCLUDE 'doc-head-close.inc' %] - -[% INCLUDE 'datatables.inc' %] - -[% INCLUDE 'z3950_search.inc' %] - - [% IF ( opsearch ) %] - - - -
- [% ELSE %] - - -
- [% END %] +[% IF ( opsearch ) %] + + + +
+[% ELSE %] + + + +
+[% END %] +
[% IF ( opsearch ) %]

Z39.50 Authority search points

@@ -198,5 +163,41 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : [% IF ( numberpending ) %]

Still [% numberpending %] servers to search

[% END %] - - +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + + [% INCLUDE 'z3950_search.inc' %] + +[% END %] + +[% INCLUDE 'popup-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt index 733c6b508d..20b1f82efe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt @@ -1,46 +1,8 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Z39.50/SRU search results [% INCLUDE 'doc-head-close.inc' %] - -[% INCLUDE 'datatables.inc' %] - -[% INCLUDE 'z3950_search.inc' %] - +
@@ -222,6 +185,42 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
[% IF ( numberpending ) %]

Still [% numberpending %] servers to search

[% END %] - - +[% MACRO jsinclude BLOCK %] + + + [% INCLUDE 'datatables.inc' %] + + [% INCLUDE 'z3950_search.inc' %] +[% END %] +[% INCLUDE 'popup-bottom.inc' %] -- 2.39.5