From 44e7d5e84b2e4020011500ccf0f0f53f974af73d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 27 Nov 2017 15:15:06 +0000 Subject: [PATCH] Bug 19700: Move template JavaScript to the footer: Some circulation pages This patch modifies some staff client circulation 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. - Article requests (enable ArticleRequests system preference, have at least one outstanding article request) - Request article (Bibliographic detail page -> Request article). - Item circulation statistics (Bibliographic detail page -> Items -> View item's checkout history). - On-site checkouts (enable OnSiteCheckouts system preference; Check out some items as on-site checkouts; Go to Circulation -> Pending on-site checkouts - Overdues report (Circulation -> Overdues). - Holds to pull (Circulation -> Holds to pull). - Renew - Holds ratios (Circulation -> Holds ratios). - Check in - Transfers to receive (Circulation -> Transfers to receive). - Holds queue (Circulation -> Holds queue). - Holds awaiting pickup (Circulation -> Holds awaiting pickup). Signed-off-by: Simon Pouchol Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- .../prog/en/modules/circ/article-requests.tt | 191 ++++++------- .../prog/en/modules/circ/bookcount.tt | 16 +- .../circ/circulation_batch_checkouts.tt | 48 ++-- .../prog/en/modules/circ/on-site_checkouts.tt | 52 ++-- .../prog/en/modules/circ/overdue.tt | 140 +++++----- .../prog/en/modules/circ/pendingreserves.tt | 131 ++++----- .../prog/en/modules/circ/renew.tt | 24 +- .../prog/en/modules/circ/request-article.tt | 171 ++++++------ .../prog/en/modules/circ/reserveratios.tt | 50 ++-- .../prog/en/modules/circ/returns.tt | 252 +++++++++--------- .../en/modules/circ/transferstoreceive.tt | 40 +-- .../prog/en/modules/circ/view_holdsqueue.tt | 71 ++--- .../prog/en/modules/circ/waitingreserves.tt | 38 +-- 13 files changed, 633 insertions(+), 591 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt index b695dc6aed..eefc9122f2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt @@ -2,7 +2,7 @@ [% USE ItemTypes %] [% USE Branches %] [% USE AuthorisedValues %] - +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Article requests [% INCLUDE 'doc-head-close.inc' %] @@ -13,99 +13,6 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] - - + +[% MACRO jsinclude BLOCK %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt index 9257027652..2211a986cd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt @@ -1,14 +1,11 @@ [% USE KohaDates %] [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Circulation statistics for [% title |html %] [% INCLUDE 'doc-head-close.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'circ-search.inc' %] @@ -63,4 +60,13 @@ $(document).ready(function(){ [% INCLUDE 'biblio-view-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt index 2416f36d4d..5da3352acd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt @@ -2,6 +2,7 @@ [% USE KohaDates %] [% USE Price %] [% USE AuthorisedValues %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] [% SET destination = "circ" %] Koha › Circulation @@ -10,30 +11,9 @@ [% END %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] -[% INCLUDE 'datatables.inc' %] - + [% INCLUDE 'header.inc' %] @@ -307,4 +287,28 @@ $(document).ready(function() { [% END %] + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'calendar.inc' %] + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt index 648225c3e9..d3d939d1d0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt @@ -2,36 +2,13 @@ [% USE Branches %] [% USE KohaDates %] [% USE AuthorisedValues %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Pending on-site checkouts [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'circ-search.inc' %] @@ -83,4 +60,29 @@ $(document).ready(function(){ [% IF Koha.Preference('CircSidebar') %][% INCLUDE 'circ-nav.inc' %][% END %] + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt index 8bc2ceef14..afde83d62d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -1,82 +1,15 @@ [% USE KohaDates %] +[%- USE Branches -%] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Items overdue as of [% todaysdate %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] -[% INCLUDE 'datatables.inc' %] -[%- USE Branches -%] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'circ-search.inc' %] @@ -262,4 +195,71 @@ +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'calendar.inc' %] + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt index 62cdc26ba9..f2e443d45f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -3,75 +3,13 @@ [% USE AuthorisedValues %] [%- USE Branches -%] [%- USE ItemTypes -%] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Holds to pull [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] - -[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'columns_settings.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'circ-search.inc' %] @@ -209,4 +147,69 @@ $(document).ready(function() { + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'calendar.inc' %] + [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt index 1008727a99..66b0ee7d65 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt @@ -1,22 +1,10 @@ [% USE Koha %] [% USE KohaDates %] - +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Renew [% title |html %] - [% INCLUDE 'doc-head-close.inc' %] - -[% IF error %] - -[% END %] - @@ -174,4 +162,14 @@ [% END %]
+[% MACRO jsinclude BLOCK %] + [% IF error %] + + [% END %] +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt index 0a6d6f62c8..1ca4a6644f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt @@ -1,96 +1,13 @@ [% USE KohaDates %] [% USE Branches %] [% USE ItemTypes %] +[% SET footerjs = 1 %] [% SET article_requests_view = 1 %] [% SET biblionumber = biblio.biblionumber %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Request article [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - - @@ -377,4 +294,90 @@ $(document).ready(function() {
+ +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt index ec92cb7683..dc6cfe4438 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt @@ -2,33 +2,11 @@ [% USE AuthorisedValues %] [% USE Branches %] [% USE ItemTypes %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Hold ratios [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] -[% INCLUDE 'datatables.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'circ-search.inc' %] @@ -163,4 +142,29 @@ + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'calendar.inc' %] + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 9f439b2b23..5fe673c8ca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -5,7 +5,7 @@ [% USE ItemTypes %] [% USE AuthorisedValues %] [% USE ColumnsSettings %] - +[% SET footerjs = 1 %] [% BLOCK display_bormessagepref %] [% IF ( bormessagepref ) %]
  • Patron notification: @@ -33,129 +33,8 @@ Koha › Circulation › Check in [% title |html %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'columns_settings.inc' %] -[% INCLUDE 'calendar.inc' %] - -[% INCLUDE 'timepicker.inc' %] - - + @@ -809,4 +688,131 @@ $(document).ready(function () { + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] + [% INCLUDE 'calendar.inc' %] + + [% INCLUDE 'timepicker.inc' %] + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt index 8b820281fd..6d99682419 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt @@ -1,29 +1,13 @@ [% USE Koha %] [% USE KohaDates %] [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Transfers to receive [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'circ-search.inc' %] @@ -104,4 +88,24 @@ $(document).ready(function() { [% END %] + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt index 75411cc1b1..5cae4d1609 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt @@ -5,45 +5,14 @@ [% USE AuthorisedValues %] [% USE ColumnsSettings %] [% USE Koha %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Holds queue [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'columns_settings.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] @@ -224,4 +193,40 @@ $(document).ready(function() { [% END %] + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt index b0a8724223..b703728be0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt @@ -1,28 +1,13 @@ [% USE Koha %] [% USE KohaDates %] [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Holds awaiting pickup [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'circ-search.inc' %] @@ -213,4 +198,23 @@ [% END %] + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5