Bug 39761

Summary: OPAC DataTables responsive table controls style broken by Bug 39600
Product: Koha Reporter: Owen Leonard <oleonard>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: Needs documenting --- QA Contact: Jonathan Druart <jonathan.druart>
Severity: major    
Priority: P5 - low CC: david, fridolin.somers
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39698
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Bug Depends on: 39762    
Bug Blocks:    
Attachments: Bug 39761: OPAC DataTables responsive table controls style broken by Bug 39600
Bug 39761: OPAC DataTables responsive table controls style broken by Bug 39600
Bug 39761: OPAC DataTables responsive table controls style broken by Bug 39600

Description Owen Leonard 2025-04-28 12:13:58 UTC
Bug 39600 added global inclusion of datatables.min.css to the OPAC's doc-head-close.inc after our opac.css, meaning it overrides our CSS instead of vice versa.

Previously datatables.min.css wasn't included globally in the OPAC because so few tables use DataTables. The styling we need is in _tables.scss. I'm not sure what CSS was missing when 39600 was implemented, but we need to either add the required CSS to _tables.scss or rework our implementation of DataTables CSS.
Comment 1 Owen Leonard 2025-04-28 15:49:03 UTC
(In reply to Owen Leonard from comment #0)

> Previously datatables.min.css wasn't included globally in the OPAC because
> so few tables use DataTables. The styling we need is in _tables.scss.

To expand on that a little: Because we needed to style so few DataTables controls it was easier to add a little bit of custom CSS to ours instead of needing to add a lot of CSS in order to customize *and* override the default DataTables styling.
Comment 2 Katrin Fischer 2025-04-28 15:51:45 UTC
Could you provide a patch? Trying to get the lose ends in order that seem to pop up everywhere...
Comment 3 Owen Leonard 2025-04-29 12:11:42 UTC
Created attachment 181647 [details] [review]
Bug 39761: OPAC DataTables responsive table controls style broken by Bug 39600

This patch copies and adapts some CSS from the default DataTables CSS in
order to add to the OPAC the required styles for new features added by
the updated ILL request page: Paging, table information, and the
"Processing" message shown while the table loads.

To test, apply the patch and rebuild the OPAC CSS. You should have
ILL enabled and configured.

- Log in to the OPAC as a user who has submitted multiple ILL requests.
- From the user summary page, click "Interlibrary loan requests" in the
  left-hand sidebar.
- The table of ILL requests should look correct with legible information
  and controls.
- All the DataTable features should work: Paging, showing different
  numbers of entries per page, sorting.
- Go to the user summary page and confirm that the tables on that page
  still display correctly: Checkouts, overdues, holds, etc.

Sponsored-by: Athens County Public Libraries
Comment 4 David Nind 2025-04-29 13:34:51 UTC
Created attachment 181659 [details] [review]
Bug 39761: OPAC DataTables responsive table controls style broken by Bug 39600

This patch copies and adapts some CSS from the default DataTables CSS in
order to add to the OPAC the required styles for new features added by
the updated ILL request page: Paging, table information, and the
"Processing" message shown while the table loads.

To test, apply the patch and rebuild the OPAC CSS. You should have
ILL enabled and configured.

- Log in to the OPAC as a user who has submitted multiple ILL requests.
- From the user summary page, click "Interlibrary loan requests" in the
  left-hand sidebar.
- The table of ILL requests should look correct with legible information
  and controls.
- All the DataTable features should work: Paging, showing different
  numbers of entries per page, sorting.
- Go to the user summary page and confirm that the tables on that page
  still display correctly: Checkouts, overdues, holds, etc.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Jonathan Druart 2025-04-29 14:03:28 UTC
Created attachment 181662 [details] [review]
Bug 39761: OPAC DataTables responsive table controls style broken by Bug 39600

This patch copies and adapts some CSS from the default DataTables CSS in
order to add to the OPAC the required styles for new features added by
the updated ILL request page: Paging, table information, and the
"Processing" message shown while the table loads.

To test, apply the patch and rebuild the OPAC CSS. You should have
ILL enabled and configured.

- Log in to the OPAC as a user who has submitted multiple ILL requests.
- From the user summary page, click "Interlibrary loan requests" in the
  left-hand sidebar.
- The table of ILL requests should look correct with legible information
  and controls.
- All the DataTable features should work: Paging, showing different
  numbers of entries per page, sorting.
- Go to the user summary page and confirm that the tables on that page
  still display correctly: Checkouts, overdues, holds, etc.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Katrin Fischer 2025-04-29 15:26:13 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 7 Fridolin Somers 2025-06-19 10:38:29 UTC
Depends on Bug 39762 not in 24.11.x