Bug 22195

Summary: Change default DataTables configuration to consolidate buttons
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Screen capture showing the new button style
Bug 22195: Change default DataTables configuration to consolidate buttons
Bug 22195: Change default DataTables configuration to consolidate buttons
Bug 22195: Change default DataTables configuration to consolidate buttons
Bug 22195: Change default DataTables configuration to consolidate buttons
Bug 22195: (follow-up) Add tooltip to buttons
Bug 22195: (follow-up) Add text labels to buttons if window is wide enough

Description Owen Leonard 2019-01-23 16:39:44 UTC
Created attachment 84336 [details]
Screen capture showing the new button style

DataTables gives us the option of more carefully controlling the arrangement and appearance of buttons like "Column visibility." I propose to change the default DataTables configuration so that tables with columns settings have two buttons: One to trigger a menu of columns show show/hide, and one to trigger a menu of export options. See attached screenshot.
Comment 1 Owen Leonard 2019-01-23 16:57:56 UTC Comment hidden (obsolete)
Comment 2 David Nind 2019-01-24 19:57:38 UTC Comment hidden (obsolete)
Comment 3 José-Mario Monteiro-Santos 2019-01-25 22:12:11 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2019-01-26 12:28:00 UTC
I like that it takes up less space, but I am a little worried about it being less self-explanatory. Could we get a tooltip showing when you leave the cursor on the icon?
Comment 5 Katrin Fischer 2019-01-26 12:28:41 UTC
Created attachment 84443 [details] [review]
Bug 22195: Change default DataTables configuration to consolidate buttons

This patch changes the default DataTables configuration provided by the
columns settings include file. It consolidates DataTables buttons into
to menus: One for column configuration and one for export options.

This change would not affect tables which aren't set up for column
configuration.

To test, apply the patch and view a page with columns configuration.

 Example: Tools -> Notices & slips
  - Confirm that the buttons appear as expected.
  - Confirm that each button menu performs its task correctly (column
    visiblity, export, print).
  - Test other pages with columns configuration. For instance:
    Acquisitions order search, Currencies administration, Holds queue

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Owen Leonard 2019-01-26 19:23:56 UTC
Created attachment 84450 [details] [review]
Bug 22195: (follow-up) Add tooltip to buttons

This patch adds title attributes and Bootstrap tooltips to the columns
configuration and export/print butttons.

To test, apply the patch and visit a page with columns configuration
buttons. Confirm that when you hover over each of the DataTable control
buttons a tooltip is shown.
Comment 7 Owen Leonard 2019-02-01 14:23:35 UTC
Created attachment 84629 [details] [review]
Bug 22195: (follow-up) Add text labels to buttons if window is wide enough

This patch adds responsive handling of text labels to the columns
configuration and export buttons.

To test, apply the patch and clear your browser cache if necessary.

 - View a page with column configuration, e.g. Administration -> Patron
   categories.
 - At wider browser widths the buttons should have text labels.
 - At narrower browser widths the labels should be hidden.
Comment 8 Nick Clemens 2019-02-04 17:46:41 UTC
Awesome work all!

Pushed to master for 19.05
Comment 9 Martin Renvoize 2019-02-11 13:49:41 UTC
Cosmetic enhancement, will not be backported.