The lost items report is already displayed as a DataTable. We should modify the configuration so that the standard DataTable controls are shown too.
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.
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>
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>
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.03
enhancement, not backported to 19.11.x