From ebd00617e1ad2b331fca69172e9b04e4b3129cc3 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 22 Apr 2024 15:53:57 +0000 Subject: [PATCH] Bug 36663: Hide specific inner elements, not the whole top pager container 1- Enable StaffDetailItemSelection 2- Visit a biblio page: http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=76 3- Notice there are no table configuration options on the top right (Columns, Export, Configure). 4- Click the "Show filters" link, notice the table configuration options now show, as well as top and bottom pagers, column filter inputs and search input. 5- Disable StaffDetailItemSelection 6- Visit a biblio page: http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=76 7- Notice that the table configurations options are visible, as well as top and bottom pagers, and search input. 8- Click the "Show filters" link, notice it now only governs the column filter inputs, the other elements mentioned in step 7 are always visible. 9- Apply patches, run yarn css:build 10- Repeat 1 and 2. 11- Notice the table configuration options are shown on the top right, and no other table options exist. Further testing: Test clicking hide/show filters Test with StaffDetailItemSelection enabled/disabled Test other datatables in other pages Signed-off-by: Lucas Gass Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer --- .../includes/html_helpers/tables/items/catalogue_detail.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc index e17fa23dac..3c08fe3ec7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc @@ -819,7 +819,9 @@ if (!add_filters && settings._iRecordsDisplay == settings._iRecordsTotal && settings._iDisplayLength >= settings._iRecordsDisplay){ let container = $(this).parent(); container.find(".dt-info").remove(); - container.find(".top.pager").remove(); + container.find(".table_entries").remove(); + container.find(".dataTables_filter").remove(); + container.find(".dt_button_clear_filter").remove(); container.find(".bottom.pager").remove(); } -- 2.39.5