From 6037f22d10dc691bb2e74ab083c232aaf4e1b80e Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 9 Feb 2021 14:39:35 +0000 Subject: [PATCH] Bug 27653: [Alternate] Use toolbar elements instead of captions The aqbudgets and aqui-home tables use captions for additional table controls - these are more appropriate as a DataTables custom toolbar To test: 1 - View the tables on acquisitions home and budgets views 2 - Note the 'Expand all...' control row 3 - Apply patch 4 - The row remains, but is below the table controls 5 - The row is not included when printing or copying the table --- .../intranet-tmpl/prog/en/modules/acqui/acqui-home.tt | 18 +++--------------- .../intranet-tmpl/prog/en/modules/admin/aqbudgets.tt | 14 +++++--------- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt index c9b7296017..895af6e7b1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -79,20 +79,6 @@
- @@ -241,8 +227,10 @@ 'bSort': true, 'aaSortingFixed': [[ 1, 'asc' ]], 'bPaginate': false, - "bAutoWidth": false + "bAutoWidth": false, + "dom": 'ifB<"budget_toolbar">' }); + $(".budget_toolbar").html('
Expand all | Collapse all | Hide inactive budgets | Show inactive budgets |
'); $(oTable).treetable({ expandable: true diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt index 5eeb57766b..1c976565b4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt @@ -52,14 +52,6 @@ [% IF budgets %]
- Expand all - | Collapse all - | Hide inactive budgets - | Show inactive budgets - | - - -
- [% UNLESS budget_period_id %] - - [% END %] @@ -653,8 +645,12 @@ 'bSort': true, 'aaSortingFixed': [[ 1, 'asc' ]], 'bPaginate': false, - "bAutoWidth": false + "bAutoWidth": false, + "dom": 'ifB<"budget_toolbar">' }); + [% UNLESS budget_period_id %] + $(".budget_toolbar").html('
'); + [% END %] $(oTable).treetable({ expandable: true -- 2.11.0
- Expand all - | Collapse all - | Hide inactive budgets - | Show inactive budgets -
Active