From 0ddece26c60da17b63090633c19e8a2e3a93fc40 Mon Sep 17 00:00:00 2001 From: Jasmine Amohia Date: Wed, 16 Jan 2019 03:57:45 +0000 Subject: [PATCH] Bug 20679: Created syspref to hide/show 'rows per page' from reports print layout Test Plan: 1. Update the database 2. Find reportRowsPerPage syspref and confirm it is set to Show by default 3. In another tab, make a new report to run or run an existing report 4. Confirm that rows per page dropdown shows 5. Change syspref to Don't show 6. Refresh report tab and confirm that rows per page dropdown doesn't show. --- .../bug_20679_-_add_reportRowsPerPage_syspref.sql | 1 + installer/data/mysql/sysprefs.sql | 1 + .../en/modules/admin/preferences/web_services.pref | 6 ++++++ .../en/modules/reports/guided_reports_start.tt | 25 ++++++++++++---------- 4 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_20679_-_add_reportRowsPerPage_syspref.sql diff --git a/installer/data/mysql/atomicupdate/bug_20679_-_add_reportRowsPerPage_syspref.sql b/installer/data/mysql/atomicupdate/bug_20679_-_add_reportRowsPerPage_syspref.sql new file mode 100644 index 0000000000..7d9904b886 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_20679_-_add_reportRowsPerPage_syspref.sql @@ -0,0 +1 @@ +INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('reportRowsPerPage', '1', NULL, 'Show/hide the rows per page dropdown when running a report', 'YesNo'); diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 6298acd4e9..0165b4c2e9 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -480,6 +480,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('RentalsInNoissuesCharge','1',NULL,'Rental charges block checkouts (added to noissuescharge).','YesNo'), ('ReplyToDefault','',NULL,'Use this email address as the replyto in emails','Free'), ('ReportsLog','0',NULL,'If ON, log information about reports.','YesNo'), +('reportRowsPerPage', '1', NULL, 'Show/hide the rows per page dropdown when running a report', 'YesNo'); ('RequestOnOpac','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'), ('RequireStrongPassword','1','','Require a strong login password for staff and patrons','YesNo'), ('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref index 6b415f212c..0bbafdd82e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref @@ -65,6 +65,12 @@ Web services: - pref: SvcMaxReportRows class: integer - rows of a report requested via the reports web service. + - + - pref: reportRowsPerPage + choices: + yes: Show + no: "Don't show" + - rows per page option when running a report. IdRef: - - pref: IdRef 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 18410c2be1..91040f8ecc 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 @@ -714,17 +714,20 @@ canned reports and writing custom SQL reports.

[% END %] - - + [% IF ( Koha.Preference('reportRowsPerPage') ) %] + + + [% END %] +
[% pagination_bar | $raw %]
-- 2.11.0