Bugzilla – Attachment 72505 Details for
Bug 20350
Add column configuration to table of saved reports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20350: Add column configuration to table of saved reports
Bug-20350-Add-column-configuration-to-table-of-sav.patch (text/plain), 5.06 KB, created by
Owen Leonard
on 2018-03-07 15:49:24 UTC
(
hide
)
Description:
Bug 20350: Add column configuration to table of saved reports
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-03-07 15:49:24 UTC
Size:
5.06 KB
patch
obsolete
>From dc8c74eb3125e4291714a6690ce5b133cc662efe Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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. >--- > 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 706e1d6..619eae4 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 -%] >@@ -168,7 +169,7 @@ canned reports and writing custom SQL reports.</p> > [% IF (usecache) %] <th>Cache expiry (seconds)</th> [% END %] > <th>Saved results</th> > [% IF has_obsolete_reports %]<th>Update</th>[% END %] >- <th> </th> >+ <th>Actions</th> > </tr> > </thead> > <tbody> >@@ -928,8 +929,9 @@ Sub report:<select name="subreport"> > [% INCLUDE 'calendar.inc' %] > [% IF ( saved1 ) %] > [% INCLUDE 'datatables.inc' %] >+ [% INCLUDE 'columns_settings.inc' %] > [% END %] >- <script type="text/javascript"> >+ <script> > var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this report? This cannot be undone."); > var group_subgroups = {}; > [% FOREACH group IN groups_with_subgroups %] >@@ -959,6 +961,7 @@ Sub report:<select name="subreport"> > } > > $(document).ready(function(){ >+ var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'saved-sql', 'table_reports', 'json' ) %]; > $('#limit').change(function() { > $('#limitselect').submit(); > }); >@@ -977,7 +980,7 @@ Sub report:<select name="subreport"> > }); > > [% IF (saved1) %] >- var rtable = $("#table_reports").dataTable($.extend(true, {}, dataTablesDefaults, { >+ var rtable = KohaTable("table_reports", { > 'iDisplayLength': [% Koha.Preference('NumSavedReports') %], > 'bAutoWidth': false, > 'sPaginationType': 'four_button', >@@ -990,8 +993,8 @@ Sub report:<select name="subreport"> > ], > 'oLanguage': { > 'sZeroRecords': _("No matching reports found") >- } >- })); >+ }, >+ }, columns_settings); > > var rtabs = $("#tabs").tabs(); > rtabs.on("tabsactivate", function(e, ui) { >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20350
:
72505
|
72652
|
73642
|
73673