From e3f4d3e318e3e6cd3d2893fd8a97a91235f59169 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 --- .../prog/en/modules/cataloguing/addbooks.tt | 158 +++++++------- .../prog/en/modules/cataloguing/merge.tt | 228 +++++++++++---------- .../en/modules/cataloguing/z3950_auth_search.tt | 105 +++++----- .../prog/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 d6d39d8..5293029 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 464d763..a672811 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 6e6de65..df1e3d9 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 733c6b5..20b1f82 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.1.4