Bug 22888 - Use DataTables for Koha news table filtering
Summary: Use DataTables for Koha news table filtering
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 22811
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-10 16:03 UTC by Owen Leonard
Modified: 2019-07-24 07:13 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.11.00


Attachments
Bug 22888: Use DataTables for Koha news table filtering (10.43 KB, patch)
2019-05-13 13:35 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22888: Use DataTables for Koha news table filtering (10.48 KB, patch)
2019-05-24 19:38 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 22888: Use DataTables for Koha news table filtering (10.56 KB, patch)
2019-05-28 05:35 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2019-05-10 16:03:51 UTC
On the Koha news page we display all news items in the table (rather than using server-side pagination) so we can use DataTables' built-in column search/filter features instead of having to submit a form and reload the page.
Comment 1 Owen Leonard 2019-05-13 13:35:52 UTC
Created attachment 89658 [details] [review]
Bug 22888: Use DataTables for Koha news table filtering

This patch modifies the Koha news page so that filtering the table of
news is done using DataTables' built-in search functionality. This
allows for the table to be filtered without requiring a reload of the
page.

The patch also moves the table filter into a sidebar form and adds a
keyword field. A minor change has been made to the global CSS to improve
the display of the form in the sidebar.

To test, apply the patch and rebuild the staff client CSS.

 - Go to Tools -> News.
 - Test the various table filter options: keyword, display location, and
   library. Confirm that all work as expected.
   - Changes to the keyword search text should be reflected in the
     search field at the top of the table, and vice versa.
 - Changes to the sidebar filter should trigger the correct state of the
   "Clear filter" button at the top of the news table (enabled or
   disabled).
Comment 2 Maryse Simard 2019-05-24 19:38:54 UTC
Created attachment 90084 [details] [review]
Bug 22888: Use DataTables for Koha news table filtering

This patch modifies the Koha news page so that filtering the table of
news is done using DataTables' built-in search functionality. This
allows for the table to be filtered without requiring a reload of the
page.

The patch also moves the table filter into a sidebar form and adds a
keyword field. A minor change has been made to the global CSS to improve
the display of the form in the sidebar.

To test, apply the patch and rebuild the staff client CSS.

 - Go to Tools -> News.
 - Test the various table filter options: keyword, display location, and
   library. Confirm that all work as expected.
   - Changes to the keyword search text should be reflected in the
     search field at the top of the table, and vice versa.
 - Changes to the sidebar filter should trigger the correct state of the
   "Clear filter" button at the top of the news table (enabled or
   disabled).

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Comment 3 Katrin Fischer 2019-05-28 05:35:10 UTC
Created attachment 90135 [details] [review]
Bug 22888: Use DataTables for Koha news table filtering

This patch modifies the Koha news page so that filtering the table of
news is done using DataTables' built-in search functionality. This
allows for the table to be filtered without requiring a reload of the
page.

The patch also moves the table filter into a sidebar form and adds a
keyword field. A minor change has been made to the global CSS to improve
the display of the form in the sidebar.

To test, apply the patch and rebuild the staff client CSS.

 - Go to Tools -> News.
 - Test the various table filter options: keyword, display location, and
   library. Confirm that all work as expected.
   - Changes to the keyword search text should be reflected in the
     search field at the top of the table, and vice versa.
 - Changes to the sidebar filter should trigger the correct state of the
   "Clear filter" button at the top of the news table (enabled or
   disabled).

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2019-05-28 05:36:35 UTC
This works well and is a nice enhancement, just one thing: I am not sure if it's not a little confusing to have 2 keyword search options available that fill out the other, when typing in it. It's a new pattern at least :)
Comment 5 Martin Renvoize 2019-06-24 14:48:04 UTC
Nice work!

Pushed to master for 19.11.00
Comment 6 Martin Renvoize 2019-06-24 14:57:35 UTC
(In reply to Katrin Fischer from comment #4)
> This works well and is a nice enhancement, just one thing: I am not sure if
> it's not a little confusing to have 2 keyword search options available that
> fill out the other, when typing in it. It's a new pattern at least :)

I agree.. this feels a little odd but I'm not entirely sure how to tidy it up..  Lets handle it on it's own bug perhaps.
Comment 7 Fridolin SOMERS 2019-07-24 07:13:43 UTC
Enhancement not pushed to 19.05.x