Bugzilla – Attachment 84086 Details for
Bug 22145
Add a syspref to hide the 'rows per page' dropdown when running a report
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22145: Created syspref to hide/show 'rows per page' from reports print layout
Bug-22145-Created-syspref-to-hideshow-rows-per-pag.patch (text/plain), 4.89 KB, created by
Jasmine Amohia
on 2019-01-16 20:35:28 UTC
(
hide
)
Description:
Bug 22145: Created syspref to hide/show 'rows per page' from reports print layout
Filename:
MIME Type:
Creator:
Jasmine Amohia
Created:
2019-01-16 20:35:28 UTC
Size:
4.89 KB
patch
obsolete
>From 652edb08e2b9b9f62d6bd939754264bb649b33ec Mon Sep 17 00:00:00 2001 >From: Jasmine Amohia <jasmineamohia.student@wegc.school.nz> >Date: Wed, 16 Jan 2019 03:57:45 +0000 >Subject: [PATCH] Bug 22145: 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..7eff05fa93 >--- /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.</p> > <input type="hidden" name="param_name" value="[% n | html %]"/> > [% END %] > >- <label for="limit">Rows per page: </label> >- <select name="limit" id="limit"> >- [% limits = [ 10, 20, 50, 100, 200, 300, 400, 500, 1000 ] %] >- [% FOREACH l IN limits %] >- [% IF l == limit %] >- <option value="[% l | html %]" selected="selected">[% l | html %]</option> >- [% ELSE %] >- <option value="[% l | html %]">[% l | html %]</option> >- [% END %] >- [% END %] >- </select> >+ [% IF ( Koha.Preference('reportRowsPerPage') ) %] >+ <label for="limit">Rows per page: </label> >+ <select name="limit" id="limit"> >+ [% limits = [ 10, 20, 50, 100, 200, 300, 400, 500, 1000 ] %] >+ [% FOREACH l IN limits %] >+ [% IF l == limit %] >+ <option value="[% l | html %]" selected="selected">[% l | html %]</option> >+ [% ELSE %] >+ <option value="[% l | html %]">[% l | html %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ [% END %] >+ > </form> > > <div class="pages">[% pagination_bar | $raw %]</div> >-- >2.11.0
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 22145
: 84086 |
92837