Bug 26262

Summary: Paging on course reserves tables in OPAC is broken
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: OPACAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, lucas, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00
Bug Depends on: 25287    
Bug Blocks: 25775    
Attachments: Bug 26262: Remove wrong dom setting in course reserves (OPAC)
Bug 26262: Remove wrong dom setting in course reserves (OPAC)
Bug 26262: (follow-up) Fix course details page, default configuration
Bug 26262: (follow-up) Fix course details page, default configuration
Bug 26262: Remove wrong dom setting in course reserves (OPAC)
Bug 26262: (follow-up) Fix course details page, default configuration
Bug 26262: Remove wrong dom setting in course reserves (OPAC)
Bug 26262: (follow-up) Fix course details page, default configuration

Description Katrin Fischer 2020-08-20 22:29:44 UTC
The styling on the paging options for the course reserves tables in OPAC is broken.
Comment 1 Jonathan Druart 2020-08-21 13:42:50 UTC
Caused by bug 25287.
Comment 2 Tomás Cohen Arazi 2020-08-21 13:59:18 UTC
(In reply to Jonathan Druart from comment #1)
> Caused by bug 25287.

How is that?
Comment 3 Jonathan Druart 2020-08-21 14:17:24 UTC
I don't know, git bisect.
Certainly the changes to datatables.js
Comment 4 Tomás Cohen Arazi 2020-08-25 13:39:32 UTC
Ok, I've checked and we don't do pagination in the OPAC, neither on course reserves or items/holds. So this is purely styling issue (i.e. we added the elements but we shouldn't have).
Comment 5 Tomás Cohen Arazi 2020-08-26 15:45:52 UTC Comment hidden (obsolete)
Comment 6 Owen Leonard 2020-08-31 12:43:15 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2020-08-31 12:43:18 UTC Comment hidden (obsolete)
Comment 8 Alexis Ripetti 2020-09-04 15:54:48 UTC Comment hidden (obsolete)
Comment 9 Owen Leonard 2020-09-09 18:45:14 UTC
Created attachment 109831 [details] [review]
Bug 26262: Remove wrong dom setting in course reserves (OPAC)

The current setting required pagination to be displayed. This was hidden
probably as a side effect of styling settings. But the docs are clear on
the fact that p and l are intended for displaying pagination controls
and table rows lenght information [1]

As the course reserves datatable is not paginated, this needs to be
fixed properly by removing those controls in the configuration. This
patch does so.

To test:
1. Have some course reserves
2. See them in the OPAC
=> FAIL: Some funky, misaligned pagination artifacts are displayed
3. Apply this patch and reload
=> SUCCESS: Things are back to normal!
4. Sign off :-D

[1] https://datatables.net/examples/basic_init/dom.html

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 10 Owen Leonard 2020-09-09 18:45:18 UTC
Created attachment 109832 [details] [review]
Bug 26262: (follow-up) Fix course details page, default configuration

Bug 25287 changed the default DataTable configuration in the OPAC so
that tables are paginated by default. This is inconsistent with the way
we currently use DataTables in the OPAC, and the change was probably
unintentional. This patch returns the default pagination configuration
to what it was before: Off.

The patch also updates opac-course-details.tt with the same DOM
configuration as opac-course-reserves.tt.

To test, apply the patch and view the list of course reserves and the
list of titles attached to a course. In both cases there should be no
pagination controls, and the tables should show all results.

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Comment 11 Katrin Fischer 2020-09-12 18:10:15 UTC
Created attachment 109989 [details] [review]
Bug 26262: Remove wrong dom setting in course reserves (OPAC)

The current setting required pagination to be displayed. This was hidden
probably as a side effect of styling settings. But the docs are clear on
the fact that p and l are intended for displaying pagination controls
and table rows lenght information [1]

As the course reserves datatable is not paginated, this needs to be
fixed properly by removing those controls in the configuration. This
patch does so.

To test:
1. Have some course reserves
2. See them in the OPAC
=> FAIL: Some funky, misaligned pagination artifacts are displayed
3. Apply this patch and reload
=> SUCCESS: Things are back to normal!
4. Sign off :-D

[1] https://datatables.net/examples/basic_init/dom.html

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2020-09-12 18:10:20 UTC
Created attachment 109990 [details] [review]
Bug 26262: (follow-up) Fix course details page, default configuration

Bug 25287 changed the default DataTable configuration in the OPAC so
that tables are paginated by default. This is inconsistent with the way
we currently use DataTables in the OPAC, and the change was probably
unintentional. This patch returns the default pagination configuration
to what it was before: Off.

The patch also updates opac-course-details.tt with the same DOM
configuration as opac-course-reserves.tt.

To test, apply the patch and view the list of course reserves and the
list of titles attached to a course. In both cases there should be no
pagination controls, and the tables should show all results.

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Jonathan Druart 2020-09-18 09:53:53 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 14 Lucas Gass 2020-10-16 13:49:18 UTC
missing dependencies for 20.05.x, no backport