From 754994a90b0050539174e83c065080dd10a53bbd Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 7 Mar 2018 15:39:49 +0000 Subject: [PATCH] Bug 20350: Add column configuration to table of saved reports This patch makes changes to the saved reports template to enable a columns configuration button. Settings for the table have been added to columns_settings.yml. To test, apply the patch and go to Reports -> Use saved. - Confirm that there is a "Column visibility" button in the table's pagination toolbar. - Confirm that showing and hiding columns via the button is working correctly. - Confirm that the first, second, and last columns cannot be toggled. Go to Administration -> Columns settings. - Expand the "Reports" section. - Find "id=table_reports." - Make some selections to configure default settings of the reports table. - Return to reports and confirm that these defaults are applied. Signed-off-by: Jesse Maseto Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- admin/columns_settings.yml | 43 +++++++++++++++++++ .../modules/reports/guided_reports_start.tt | 13 +++--- 2 files changed, 51 insertions(+), 5 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index f56a745eb5..d1a5920afd 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -317,6 +317,49 @@ modules: - columnname: notes + saved-sql: + table_reports: + - + columnname: selection + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: report_id + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: report_name + - + columnname: type + - + columnname: group + - + columnname: subgroup + - + columnname: notes + - + columnname: author + - + columnname: creation_date + - + columnname: last_edit + - + columnname: last_run + - + columnname: public + - + columnname: json_url + - + columnname: cache_expiry + - + columnname: saved_results + - + columnname: update + - + columnname: actions + cannot_be_toggled: 1 + cannot_be_modified: 1 + circ: circulation: issues-table: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 28e0c17626..7f5d368eeb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -1,5 +1,6 @@ [% USE KohaDates %] [% USE Koha %] +[% USE ColumnsSettings %] [% SET footerjs = 1 %] [%- BLOCK area_name -%] [%- SWITCH area -%] @@ -178,7 +179,7 @@ canned reports and writing custom SQL reports.

[% IF (usecache) %] Cache expiry (seconds) [% END %] Saved results [% IF has_obsolete_reports %]Update[% END %] -   + Actions @@ -953,8 +954,9 @@ Sub report: