Bugzilla – Attachment 138195 Details for
Bug 28864
The patron search results in the patron card creator doesn't seem to use PatronsPerPage syspref
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28864: Have patron search use PatronsPerPage better.
Bug-28864-Have-patron-search-use-PatronsPerPage-be.patch (text/plain), 3.12 KB, created by
ByWater Sandboxes
on 2022-07-28 08:41:40 UTC
(
hide
)
Description:
Bug 28864: Have patron search use PatronsPerPage better.
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2022-07-28 08:41:40 UTC
Size:
3.12 KB
patch
obsolete
>From 1ee6d8cfbb909d085b7020b1a27f6c6439f0f4ce Mon Sep 17 00:00:00 2001 >From: Michael Hafen <michael.hafen@washk12.org> >Date: Fri, 13 Aug 2021 15:52:52 -0600 >Subject: [PATCH] Bug 28864: Have patron search use PatronsPerPage better. > >Add pageLength to members/member.tt >Add aLengthMenu and pageLength to > patroncards/add_user_search (common/patron_search.tt). >Add aLengthMenu, pageLength, and iDisplayLength to patroncards/edit-batch > >Test plan: >1. Set the PatronsPerPage system preference to any integer other than 20. > >2. Go to the Patrons page and search for patrons. >3. Observe that the per page drop down defaults to 20. > >4. Go to Tools -> Patron card creator. >5. Start a new Card Batch. >6. Click the 'Add patron(s)' button to open the patron search window. >7. Do a search. >8. Observe that the per page drop down defaults to 20. >8b. If the PatronsPerPage was set to a value other than 10, 20, 50, or 100 > observe that that value is not in the per page drop down. >9. Close patron search window. > >10. Apply patch. >11. Click the 'Add patron(s)' button again to open the patron search window. >12. Do a search. >13. Observe that the per page drop down includes the value of PatronsPerPage > and that value is selected by default. > >14. Go back to the Patrons page and search for patrons. >15. Observe that the per page drop down defaults to the value of the > PatronsPerPage system preference. > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> >--- > .../prog/en/modules/patroncards/edit-batch.tt | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt >index 554342bed3..d4b3edaf9a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt >@@ -250,6 +250,21 @@ > }; > > $(document).ready(function() { >+ // Prepare DataTables settings >+ var aLengthMenu = [10, 20, 50, 100, -1]; >+ var aLengthMenuLabel = [10, 20, 50, 100, _("All")]; >+ var patronsPerPage = [% Koha.Preference('PatronsPerPage') | html %]; >+ for ( var i = 0; i < aLengthMenu.length; i++ ) { >+ if ( aLengthMenu[i] == patronsPerPage ) { >+ break; >+ } >+ if ( aLengthMenu[i] > patronsPerPage || aLengthMenu[i] == -1 ) { >+ aLengthMenu.splice(i, 0, patronsPerPage); >+ aLengthMenuLabel.splice(i, 0, patronsPerPage); >+ break; >+ } >+ } >+ > [% IF table_loop %] > $("#description").show(); > [% ELSE %] >@@ -261,6 +276,8 @@ > ], > "aaSorting": [[ 0, "asc" ]], > "sPaginationType": "full", >+ "aLengthMenu": [aLengthMenu, aLengthMenuLabel], >+ "pageLength": patronsPerPage, > "autoWidth": false > })); > $("#additems").click(function(){ >-- >2.30.2
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 28864
:
123848
|
124787
|
134004
|
138194
|
138195
|
138196
|
138197
|
138379
|
138388