Bug 26085 - Add the copy, print and export DataTables buttons to lost items report
Summary: Add the copy, print and export DataTables buttons to lost items report
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 19282
  Show dependency treegraph
 
Reported: 2020-07-29 12:56 UTC by Owen Leonard
Modified: 2021-12-13 21:09 UTC (History)
6 users (show)

See Also:
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
Circulation function:


Attachments
Bug 26085: Add the copy, print and export DataTables buttons to lost items report (2.29 KB, patch)
2020-07-29 13:06 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26085: Add the copy, print and export DataTables buttons to lost items report (2.35 KB, patch)
2020-07-31 11:03 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 26085: Add the copy, print and export DataTables buttons to lost items report (2.41 KB, patch)
2020-07-31 16:19 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 (kidclamp) 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 (lukeg) 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