We should use datatables for the courses and course items tables. This will make the tables sortable and searchable from the client side.
Created attachment 19876 [details] [review] Bug 10632 - Enable datatables for courses and course details in the OPAC We should use datatables for the courses and course items tables. This will make the tables sortable and searchable from the client side. Test Plan: 1) Apply this patch 2) View the courses in the OPAC, try sorting and searching 3) View the course details for a course, try sorting and searching the items.
DataTables won't be styled correctly without changes to the CSS and the addition of DataTables-related images. That needs to be taken care of before this patch goes in.
Owen, what did I do here differently from bug 10634? Can you describe what I need to do? Is there an existing example in Koha I can use as a pattern? Thanks!
I can see a couple of things offhand which need to be addressed: - Apply to the Bootstrap theme - Use the new DataTables include file > DataTables won't be styled correctly without changes to the CSS and the > addition of DataTables-related images. That needs to be taken care of before > this patch goes in. This patch doesn't work properly for me anymore in master (missing datatables-strings.inc file), so I can't say for sure but it sounds like the existing CSS file in the OPAC doesn't (fully?) handle the pagination menu controls.
Created attachment 32103 [details] [review] Bug 10632 - Enable datatables for courses and course details in the OPAC We should use datatables for the courses and course items tables. This will make the tables sortable and searchable from the client side. Test Plan: 1) Apply this patch 2) View the courses in the OPAC, try sorting and searching 3) View the course details for a course, try sorting and searching the items.
Created attachment 32131 [details] [review] [SIGNED-OFF] Bug 10632 - Enable datatables for courses and course details in the OPAC We should use datatables for the courses and course items tables. This will make the tables sortable and searchable from the client side. Test Plan: 1) Apply this patch 2) View the courses in the OPAC, try sorting and searching 3) View the course details for a course, try sorting and searching the items. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signing off, but have a follow-up to address some missing stuff.
Created attachment 32132 [details] [review] Bug 10632 [Follow-up] Enable datatables for courses and course details in the OPAC This follow-up adds some style improvements and corrects some errors in the previous patch: - The path to datatables.css has been corrected - Unused CSS has been removed from datatables.css (particularly related to pagination controls, which are currently unused in the OPAC). - Style has been added to datatables.css to make the table search form look better. - The configuration of the course details table has been enhanced to include a title sort which ignores articles and date sorting according to the "title-string" method for date format agnostic sorting. - Unrelated: A message <div> has been modified to have the correct style for the Bootstrap theme. To test you should have multiple courses and at least one course with multiple reserves. Clear your browser cache if necessary and view the list of courses in the OPAC. All table sorting should work correctly, as should the table search form. View the details of a course which has multiple reserves. All sorting should work correctly, including title sort excluding articles. Sorting by date due should work correctly for any dateformat system preference setting. View the details of a course which has no reserves. You should see a "No reserves" message box with a style consistent with similar messages in the Bootstrap OPAC. View other sorted tables in the OPAC to confirm that the CSS changes have not negatively affected their appearance: opac-user.pl for instance, or opac-detail.pl.
Created attachment 32134 [details] [review] [SIGNED-OFF] Bug 10632 [Follow-up] Enable datatables for courses and course details in the OPAC This follow-up adds some style improvements and corrects some errors in the previous patch: - The path to datatables.css has been corrected - Unused CSS has been removed from datatables.css (particularly related to pagination controls, which are currently unused in the OPAC). - Style has been added to datatables.css to make the table search form look better. - The configuration of the course details table has been enhanced to include a title sort which ignores articles and date sorting according to the "title-string" method for date format agnostic sorting. - Unrelated: A message <div> has been modified to have the correct style for the Bootstrap theme. To test you should have multiple courses and at least one course with multiple reserves. Clear your browser cache if necessary and view the list of courses in the OPAC. All table sorting should work correctly, as should the table search form. View the details of a course which has multiple reserves. All sorting should work correctly, including title sort excluding articles. Sorting by date due should work correctly for any dateformat system preference setting. View the details of a course which has no reserves. You should see a "No reserves" message box with a style consistent with similar messages in the Bootstrap OPAC. View other sorted tables in the OPAC to confirm that the CSS changes have not negatively affected their appearance: opac-user.pl for instance, or opac-detail.pl. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 32250 [details] [review] Bug 10632 - Enable datatables for courses and course details in the OPAC We should use datatables for the courses and course items tables. This will make the tables sortable and searchable from the client side. Test Plan: 1) Apply this patch 2) View the courses in the OPAC, try sorting and searching 3) View the course details for a course, try sorting and searching the items. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signing off, but have a follow-up to address some missing stuff. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 32251 [details] [review] Bug 10632 [Follow-up] Enable datatables for courses and course details in the OPAC This follow-up adds some style improvements and corrects some errors in the previous patch: - The path to datatables.css has been corrected - Unused CSS has been removed from datatables.css (particularly related to pagination controls, which are currently unused in the OPAC). - Style has been added to datatables.css to make the table search form look better. - The configuration of the course details table has been enhanced to include a title sort which ignores articles and date sorting according to the "title-string" method for date format agnostic sorting. - Unrelated: A message <div> has been modified to have the correct style for the Bootstrap theme. To test you should have multiple courses and at least one course with multiple reserves. Clear your browser cache if necessary and view the list of courses in the OPAC. All table sorting should work correctly, as should the table search form. View the details of a course which has multiple reserves. All sorting should work correctly, including title sort excluding articles. Sorting by date due should work correctly for any dateformat system preference setting. View the details of a course which has no reserves. You should see a "No reserves" message box with a style consistent with similar messages in the Bootstrap OPAC. View other sorted tables in the OPAC to confirm that the CSS changes have not negatively affected their appearance: opac-user.pl for instance, or opac-detail.pl. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I am not sure about removing the "unused" code in the DT css file. This code is maybe used in the patch queue (NSO, SO, PQA), but I am not sure about that. Actually I think we need the same file for the OPAC and the intranet, to be maintained easily. But it's not a big deal, it could be reinserted late.
(In reply to Jonathan Druart from comment #11) > I am not sure about removing the "unused" code in the DT css file. I hesitated as well, but I think of it this way: Keeping the CSS to a minimum is something which may take extra effort on our part, but it benefits the users of Koha. We shouldn't maintain two identical CSS files in the OPAC and staff client just because it makes things easier for us as developers.
(In reply to Owen Leonard from comment #12) > We shouldn't maintain two identical CSS files in > the OPAC and staff client just because it makes things easier for us as > developers. Yes but... developers are lazy ;)
Created attachment 33465 [details] [review] Bug 10632 [Follow-up] Enable datatables for courses and course details in the OPAC This follow-up adds some style improvements and corrects some errors in the previous patch: - The path to datatables.css has been corrected - Unused CSS has been removed from datatables.css (particularly related to pagination controls, which are currently unused in the OPAC). - Style has been added to datatables.css to make the table search form look better. - The configuration of the course details table has been enhanced to include a title sort which ignores articles and date sorting according to the "title-string" method for date format agnostic sorting. - Unrelated: A message <div> has been modified to have the correct style for the Bootstrap theme. To test you should have multiple courses and at least one course with multiple reserves. Clear your browser cache if necessary and view the list of courses in the OPAC. All table sorting should work correctly, as should the table search form. View the details of a course which has multiple reserves. All sorting should work correctly, including title sort excluding articles. Sorting by date due should work correctly for any dateformat system preference setting. View the details of a course which has no reserves. You should see a "No reserves" message box with a style consistent with similar messages in the Bootstrap OPAC. View other sorted tables in the OPAC to confirm that the CSS changes have not negatively affected their appearance: opac-user.pl for instance, or opac-detail.pl. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Patches pushed to master. Thanks Kyle and Owen!