Bug 26085

Summary: Add the copy, print and export DataTables buttons to lost items report
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aleisha, caroline.cyr-la-rose, katrin.fischer, koha-bugs, lucas, sally.healey, testopia
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.03
Bug Depends on:    
Bug Blocks: 19282    
Attachments: Bug 26085: Add the copy, print and export DataTables buttons to lost items report
Bug 26085: Add the copy, print and export DataTables buttons to lost items report
Bug 26085: Add the copy, print and export DataTables buttons to lost items report

Description Owen Leonard 2020-07-29 12:56:26 UTC
The lost items report is already displayed as a DataTable. We should modify the configuration so that the standard DataTable controls are shown too.
Comment 1 Owen Leonard 2020-07-29 13:06:12 UTC
Created attachment 107497 [details] [review]
Bug 26085: Add the copy, print and export DataTables buttons to lost items report

This patch removes the in-page DataTables DOM configuration option so
that the default option is used. This will allow all the standard
controls to appear, including copy/print/export.

Since the default DataTables information includes the number of results
in the table, the template markup showing this information is removed.

To test, apply the patch and go to Reports.

- Run the "Items lost" report using parameters which will return
  multiple results.
- On the results page confirm that the standard controls are present:
  Result count, search form, columns filter, export buttons.
- Confirm that the "Activate filters" feature works, and that selecting
  results activates the option to download a CSV using a CSV export
  profile.

  Note that the "Activate filters" feature doesn't play well with hidden
  columns. However this issue predates the patch.
Comment 2 ByWater Sandboxes 2020-07-31 11:03:14 UTC
Created attachment 107636 [details] [review]
Bug 26085: Add the copy, print and export DataTables buttons to lost items report

This patch removes the in-page DataTables DOM configuration option so
that the default option is used. This will allow all the standard
controls to appear, including copy/print/export.

Since the default DataTables information includes the number of results
in the table, the template markup showing this information is removed.

To test, apply the patch and go to Reports.

- Run the "Items lost" report using parameters which will return
  multiple results.
- On the results page confirm that the standard controls are present:
  Result count, search form, columns filter, export buttons.
- Confirm that the "Activate filters" feature works, and that selecting
  results activates the option to download a CSV using a CSV export
  profile.

  Note that the "Activate filters" feature doesn't play well with hidden
  columns. However this issue predates the patch.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 3 Nick Clemens 2020-07-31 16:19:40 UTC
Created attachment 107652 [details] [review]
Bug 26085: Add the copy, print and export DataTables buttons to lost items report

This patch removes the in-page DataTables DOM configuration option so
that the default option is used. This will allow all the standard
controls to appear, including copy/print/export.

Since the default DataTables information includes the number of results
in the table, the template markup showing this information is removed.

To test, apply the patch and go to Reports.

- Run the "Items lost" report using parameters which will return
  multiple results.
- On the results page confirm that the standard controls are present:
  Result count, search form, columns filter, export buttons.
- Confirm that the "Activate filters" feature works, and that selecting
  results activates the option to download a CSV using a CSV export
  profile.

  Note that the "Activate filters" feature doesn't play well with hidden
  columns. However this issue predates the patch.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Jonathan Druart 2020-08-03 09:59:41 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 5 Lucas Gass 2020-08-13 17:37:02 UTC
backported to 20.05.x for 20.05.03
Comment 6 Aleisha Amohia 2020-08-16 21:24:16 UTC
enhancement, not backported to 19.11.x