From ddf466c797883a8f7cef720df6c644dd242be243 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 --- admin/columns_settings.yml | 45 +++++++++++++++++++++- .../en/modules/reports/guided_reports_start.tt | 13 ++++--- 2 files changed, 52 insertions(+), 6 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index f56a745..2390364 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: @@ -401,7 +444,7 @@ modules: - columnname: title - - columnname: collection: + columnname: collection - columnname: document_type - 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 28e0c17..7f5d368 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: