Bug 9034

Summary: Add sorting and filtering on items table (catalogue/detail.pl)
Product: Koha Reporter: Julian Maurice <julian.maurice>
Component: CatalogingAssignee: Julian Maurice <julian.maurice>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, kyle, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 9034: Add sorting and filtering on items table (catalogue/detail.pl)
Bug 9034: Add CSS rule to reduce width of items table
[SIGNED-OFF] Bug 9034: Add sorting and filtering on items table (catalogue/detail.pl)
[SIGNED-OFF] Bug 9034: Add CSS rule to reduce width of items table
Bug 9034 [Follow-up] Add sorting and filtering on items table (catalogue/detail.pl)
[SIGNED-OFF] Bug 9034: Add sorting and filtering on items table (catalogue/detail.pl)
[SIGNED-OFF] Bug 9034: Add CSS rule to reduce width of items table
[SIGNED-OFF] Bug 9034 [Follow-up] Add sorting and filtering on items table (catalogue/detail.pl)
Bug 9034: Filters are disabled by default
[SIGNED-OFF] Bug 9034: Filters are disabled by default
Bug 9034: Add sorting and filtering on items table (catalogue/detail.pl)
Bug 9034: Add CSS rule to reduce width of items table
Bug 9034 [Follow-up] Add sorting and filtering on items table (catalogue/detail.pl)
Bug 9034: Filters are disabled by default

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 (khall) 2012-11-09 15:05:28 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall (khall) 2012-11-09 15:05:47 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall (khall) 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 (khall) 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.