Bug 9034 - Add sorting and filtering on items table (catalogue/detail.pl)
Summary: Add sorting and filtering on items table (catalogue/detail.pl)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Julian Maurice
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-08 15:37 UTC by Julian Maurice
Modified: 2014-05-26 21:04 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 9034: Add sorting and filtering on items table (catalogue/detail.pl) (34.23 KB, patch)
2012-11-08 16:00 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 9034: Add CSS rule to reduce width of items table (767 bytes, patch)
2012-11-09 08:04 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9034: Add sorting and filtering on items table (catalogue/detail.pl) (34.25 KB, patch)
2012-11-09 15:05 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9034: Add CSS rule to reduce width of items table (880 bytes, patch)
2012-11-09 15:05 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9034 [Follow-up] Add sorting and filtering on items table (catalogue/detail.pl) (1.99 KB, patch)
2012-11-09 19:52 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9034: Add sorting and filtering on items table (catalogue/detail.pl) (35.75 KB, patch)
2013-01-09 14:05 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9034: Add CSS rule to reduce width of items table (838 bytes, patch)
2013-01-09 14:05 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9034 [Follow-up] Add sorting and filtering on items table (catalogue/detail.pl) (2.04 KB, patch)
2013-01-09 14:06 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 9034: Filters are disabled by default (5.65 KB, patch)
2013-01-09 14:06 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9034: Filters are disabled by default (5.71 KB, patch)
2013-01-22 13:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9034: Add sorting and filtering on items table (catalogue/detail.pl) (35.81 KB, patch)
2013-02-07 14:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9034: Add CSS rule to reduce width of items table (885 bytes, patch)
2013-02-07 14:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9034 [Follow-up] Add sorting and filtering on items table (catalogue/detail.pl) (2.12 KB, patch)
2013-02-07 14:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9034: Filters are disabled by default (5.83 KB, patch)
2013-02-07 14:26 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2012-11-08 15:37:23 UTC

    
Comment 1 Julian Maurice 2012-11-08 16:00:00 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2012-11-08 16:14:17 UTC
After applying this patch the detail page has a horizontal scroll bar if my browser windows is below 1800px. Is there a way to accomplish the goal of this patch without compromising the compactness and flexibility of the current layout?
Comment 3 Julian Maurice 2012-11-09 08:04:43 UTC Comment hidden (obsolete)
Comment 4 Julian Maurice 2012-11-09 08:05:41 UTC
I tested it with a browser window width reduced to 1280px
Comment 5 Kyle M Hall 2012-11-09 15:05:28 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall 2012-11-09 15:05:47 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall 2012-11-09 15:06:53 UTC
Tested, looks good. I don't know if everyone is going to want the column filters. Maybe there should be a threshold number of items a bib needs for it to kick in?
Comment 8 Owen Leonard 2012-11-09 19:52:22 UTC Comment hidden (obsolete)
Comment 9 Owen Leonard 2012-11-09 19:56:37 UTC
I offer an alternative to the "CSS rule" patch for consideration.

I agree with Kyle in thinking that probably not everyone is going to want column filters. My first thought was also to define a threshold to control it.

Was this feature requested based on a collection with a large number of items per bib? Perhaps if we understood the motivation for wanting this feature we could better understand how to make it work for everyone.
Comment 10 Julian Maurice 2012-11-12 08:24:21 UTC
> - Make the filter inputs' width 100% instead of fixed
I always had problems with this (input overflow the cell), but if it works i prefer this solution ;-)

The initial need was only to filter on "serial info" column for biblios linked to a subscription (so a large number of items), and then go to batch modification/deletion.
I separated this into two bugs: this one and bug 9044 which allow to select items and go to batch modification/deletion.
Comment 11 Julian Maurice 2013-01-09 14:05:23 UTC Comment hidden (obsolete)
Comment 12 Julian Maurice 2013-01-09 14:05:47 UTC Comment hidden (obsolete)
Comment 13 Julian Maurice 2013-01-09 14:06:14 UTC Comment hidden (obsolete)
Comment 14 Julian Maurice 2013-01-09 14:06:28 UTC Comment hidden (obsolete)
Comment 15 Julian Maurice 2013-01-09 14:07:39 UTC
The last patch disable the filtering feature and provide a link to enable it
Comment 16 Kyle M Hall 2013-01-22 13:32:37 UTC Comment hidden (obsolete)
Comment 17 Jonathan Druart 2013-02-07 14:25:43 UTC
QA comment:

To test it, go on a catalogue detail page and play with the items list.
This patch adds datatable on the items table and an elegant filter method.

Code is clean and the 2 datatable features (sort + filter) work great.

Marked as Passed QA.
Comment 18 Jonathan Druart 2013-02-07 14:26:17 UTC
Created attachment 15137 [details] [review]
Bug 9034: Add sorting and filtering on items table (catalogue/detail.pl)

This patch introduces a new javascript plugin for dataTables
(columnFilter).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 19 Jonathan Druart 2013-02-07 14:26:23 UTC
Created attachment 15138 [details] [review]
Bug 9034: Add CSS rule to reduce width of items table

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 20 Jonathan Druart 2013-02-07 14:26:28 UTC
Created attachment 15139 [details] [review]
Bug 9034 [Follow-up] Add sorting and filtering on items table (catalogue/detail.pl)

This follow-up to the original patch offers an alternative method
to handle the width of the table and form fields:

- Reduce the font size of the filter input fields
- Make the filter inputs' width 100% instead of fixed
- Add "'bAutoWidth': false" to the datatables initialization
  to prevent the table width from being set to the browser window
  width on load. This allows the browser to be re-sized and have
  the table re-flow with it.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 21 Jonathan Druart 2013-02-07 14:26:33 UTC
Created attachment 15140 [details] [review]
Bug 9034: Filters are disabled by default

A small link above the table allow to enable this feature.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Replace single quote strings with double quote strings
Comment 22 Jared Camins-Esakov 2013-02-08 00:36:36 UTC
This patch has been pushed to master.