Bug 11718

Summary: Use new DataTables include in reports templates
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, jonathan.druart, sandboxes
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:
Circulation function:
Attachments: Bug 11718 - Use new DataTables include in reports templates
Bug 11718 - Use new DataTables include in reports templates
Bug 11718 - Use new DataTables include in reports templates
[PASSED QA] Bug 11718 - Use new DataTables include in reports templates
[PASSED QA] Bug 11718 - Use new DataTables include in reports templates

Description Owen Leonard 2014-02-07 19:42:29 UTC
Reports templates which use the DataTables plugin should be updated to use the new DataTables include file introduced by Bug 10649.
Comment 1 Owen Leonard 2014-02-10 15:10:47 UTC Comment hidden (obsolete)
Comment 2 Biblibre Sandboxes 2014-02-25 04:11:10 UTC
Patch tested with a sandbox, by Aleisha <aleishaamohia@hotmail.com>
Comment 3 Biblibre Sandboxes 2014-02-25 04:11:28 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2014-02-25 10:46:53 UTC
Comment on attachment 25599 [details] [review]
Bug 11718 - Use new DataTables include in reports templates

Review of attachment 25599 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
@@ +65,4 @@
>          'iDisplayLength': 20,
>          'aaSorting': [[ 1, "asc" ]],
>          'aoColumnDefs': [
> +            { 'bSortable': false, 'bSearchable':false, 'aTargets': [0, -1, -2, -3] },

What is expected here? You want to set unsortable "Public", "Cache expiry", "Saved results" and the actions columns?
Cache expiry could be sortable I think.
Moreover if "usecache" is disabled, the -4 is related to the creation date.
Comment 5 Owen Leonard 2014-02-25 20:25:19 UTC Comment hidden (obsolete)
Comment 6 Owen Leonard 2014-02-25 20:27:15 UTC
I've taken the liberty of re-attaching the signed-off patch with one minor edit. Saved reports now sorts all columns except the first (checkboxes) and last (menus):

 'bSortable': false, 'bSearchable':false, 'aTargets': [0, -1] },
Comment 7 Katrin Fischer 2014-03-12 08:55:26 UTC Comment hidden (obsolete)
Comment 8 Katrin Fischer 2014-03-12 08:56:03 UTC
Created attachment 26140 [details] [review]
[PASSED QA] Bug 11718 - Use new DataTables include in reports templates

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to all
circ-related pages which use DataTables.

Apply the patch and test the following pages to confirm that table
sorting works correctly:

- Reports -> Guided reports -> Use saved
  (reports/guided_reports.pl?phase=Use saved):
  "Creation date" sorting has been reconfigured to use the title-string
  method for sorting on an unformatted date. C4:Reports::Guided.pm has
  been modified to pass an unformatted date to the template. Sorting
  should work correctly for all settings of the dateformat system pref.

- Reports -> Catalog by item type
  (reports/manager.pl?report_name=itemtypes)

- Reports -> Serials statistics wizard (reports/serials_stats.pl):
  The subscription begin and subscription end columns have been modified
  to use the title-string filter for sorting. An unformatted date is now
  passed from reports/serials_stats.pl to the template, where the
  KohaDates filter is used for formatting. Sorting is based on the
  unformatted date. Sorting should work correctly for all settings of
  the dateformat system pref.

  - Sorting of titles should now exclude article from sorting.
  - Minor template improvements:
    - Vendor name now links to vendor details.
    - Subscription title now links to subscription details.
    - Library name is now shown instead of branchcode.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Checked all pages, no regressions or Javascript errors detected.
Comment 9 Galen Charlton 2014-03-12 18:03:29 UTC
Pushed to master.  Thanks, Owen!
Comment 10 Fridolin Somers 2014-06-12 07:17:02 UTC
Pushed to 3.14.x, will be in 3.14.08