To reproduce: 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. This does not seem consistent, "Show filters" should behave the same regardless of the value of StaffDetailItemSelection, i.e. it should only hide or show the column filter inputs. Additionally, before bug 33568, I believe the configuration options showed by default (with StaffDetailItemSelection enabled) on k-t-d, and they don't anymore. Patch adding this behavior: https://github.com/Koha-Community/Koha/commit/0db4098
Created attachment 165262 [details] [review] Bug 36663: Don't hide table elements if StaffDetailItemSelection is enabled
@Joubu would love input here. I'm not 100% sure about my patch or what the code I'm removing is originally supposed to fix/prevent, but the patch solves the issue I described in the first comment.
Created attachment 165266 [details] [review] Bug 36663: Don't hide table elements if StaffDetailItemSelection is enabled Signed-off-by: David Nind <david@davidnind.com>
The purpose of those lines are to hide the pagination if the number of items to display is <= than the number of the number of total items (ie. all the items are displayed on the screen). The idea was to reduce the size of the table when it's not necessary to show the pagination. It was a requirement from testers from bug 33568 so I think we should keep it. However I agree that we could display the buttons however.
We could have that instead: container.find(".dt-info").remove(); container.find(".table_entries").remove(); container.find(".dataTables_filter").remove(); container.find(".dt_button_clear_filter").remove(); container.find(".bottom.pager").remove(); But then there is a CSS adjustment to provide, the "Columns" button is not on the right with the other 2 buttons.
Created attachment 165322 [details] [review] Bug 36663: Adjust datatable button selector This change makes the selector apply specifically to the 'clear filter' button, instead of whatever is the first button as 'clear filter' may or may not exist.
Created attachment 165323 [details] [review] Bug 36663: Update alignment of datatable buttons Pack items from the end
Created attachment 165324 [details] [review] 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
Doesn't apply now.
(In reply to Lucas Gass from comment #9) > Doesn't apply now. Meant to obsolete the original patch but forgot to.
Created attachment 165326 [details] [review] Bug 36663: Adjust datatable button selector This change makes the selector apply specifically to the 'clear filter' button, instead of whatever is the first button as 'clear filter' may or may not exist. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 165327 [details] [review] Bug 36663: Update alignment of datatable buttons Pack items from the end Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 165328 [details] [review] 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 <lucas@bywatersolutions.com>
Created attachment 165352 [details] [review] Bug 36663: Adjust datatable button selector This change makes the selector apply specifically to the 'clear filter' button, instead of whatever is the first button as 'clear filter' may or may not exist. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 165353 [details] [review] Bug 36663: Update alignment of datatable buttons Pack items from the end Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 165354 [details] [review] 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 <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed for 24.05! Well done everyone, thank you!
Depends on Bug 33568 not in 23.11.x