Bugzilla – Attachment 56921 Details for
Bug 17374
Make use of fields from syspref 'DefaultPatronSearchFields' in patron search fields dropdown
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17374 - Make use of fields from syspref 'DefaultPatronSearchFields' in patron search fields dropdown
Bug-17374---Make-use-of-fields-from-syspref-Defaul.patch (text/plain), 8.88 KB, created by
Nick Clemens (kidclamp)
on 2016-10-27 14:24:22 UTC
(
hide
)
Description:
Bug 17374 - Make use of fields from syspref 'DefaultPatronSearchFields' in patron search fields dropdown
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2016-10-27 14:24:22 UTC
Size:
8.88 KB
patch
obsolete
>From 9fa6b4256cb005b9672b803a594a1dece2f7ee9f Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 27 Oct 2016 14:21:02 +0000 >Subject: [PATCH] Bug 17374 - Make use of fields from syspref > 'DefaultPatronSearchFields' in patron search fields dropdown > >This patch preserves the current dropdown choices for patron search and adds fields from >the DefaultPatronSearchFields system preference > >To test: >1 - View the regular patron search and note fields in dropdown >2 - Apply patch, ensure dropdown has not changed >3 - Add fields to DefaultPatronSearchFields, note they are available in >dropdown >4 - Ensure existing and new fields search properly >--- > .../prog/en/includes/patron-search.inc | 131 +++++++++++++-------- > 1 file changed, 82 insertions(+), 49 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >index 337f550..d829cac 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -17,55 +17,88 @@ > <div id="filters"> > <p><label for="searchfieldstype">Search fields:</label> > <select name="searchfieldstype" id="searchfieldstype"> >- [% IF searchfieldstype == "standard" %] >- <option selected="selected" value='standard'>Standard</option> >- [% ELSE %] >- <option value='standard'>Standard</option> >- [% END %] >- [% IF searchfieldstype == "surname" %] >- <option selected="selected" value='surname'>Surname</option> >- [% ELSE %] >- <option value='surname'>Surname</option> >- [% END %] >- [% IF searchfieldstype == "email" %] >- <option selected="selected" value='email'>Email</option> >- [% ELSE %] >- <option value='email'>Email</option> >- [% END %] >- [% IF searchfieldstype == "borrowernumber" %] >- <option selected="selected" value='borrowernumber'>Borrower number</option> >- [% ELSE %] >- <option value='borrowernumber'>Borrower number</option> >- [% END %] >- [% IF searchfieldstype == "userid" %] >- <option selected="selected" value='userid'>Username</option> >- [% ELSE %] >- <option value='userid'>Username</option> >- [% END %] >- [% IF searchfieldstype == "phone" %] >- <option selected="selected" value='phone'>Phone number</option> >- [% ELSE %] >- <option value='phone'>Phone number</option> >- [% END %] >- [% IF searchfieldstype == "address" %] >- <option selected="selected" value='address'>Street Address</option> >- [% ELSE %] >- <option value='address'>Street Address</option> >- [% END %] >- [% IF searchfieldstype == "dateofbirth" %] >- <option selected="selected" value='dateofbirth'>Date of birth</option> >- [% ELSE %] >- <option value='dateofbirth'>Date of birth</option> >- [% END %] >- [% IF searchfieldstype == "sort1" %] >- <option selected="selected" value='sort1'>Sort field 1</option> >- [% ELSE %] >- <option value='sort1'>Sort field 1</option> >- [% END %] >- [% IF searchfieldstype == "sort2" %] >- <option selected="selected" value='sort2'>Sort field 2</option> >- [% ELSE %] >- <option value='sort2'>Sort field 2</option> >+ [% pref_fields = Koha.Preference('DefaultPatronSearchFields').split(',') %] >+ [% default_fields = [ 'standard', 'surname', 'email', 'borrowernumber', 'userid', 'phone', 'address', 'dateofborth', 'sort1', 'sort2' ] %] >+ [% >+ patron_fields.borrowernumber => 'Borrower number' >+ patron_fields.cardnumber => 'Card number' >+ patron_fields.surname => 'Surname' >+ patron_fields.firstname => 'First name' >+ patron_fields.title => 'Title' >+ patron_fields.othernames => 'Other names' >+ patron_fields.initials => 'Initials' >+ patron_fields.streetnumber => 'Street number' >+ patron_fields.streettype => 'Street type' >+ patron_fields.address => 'Address' >+ patron_fields.address2 => 'Address line 2' >+ patron_fields.city => 'City' >+ patron_fields.state => 'State' >+ patron_fields.zipcode => 'Zip code' >+ patron_fields.country => 'Country' >+ patron_fields.email => 'Email' >+ patron_fields.phone => 'Phone' >+ patron_fields.mobile => 'Mobile phone' >+ patron_fields.fax => 'Fax' >+ patron_fields.emailpro => 'Secondary email' >+ patron_fields.phonepro => 'Secondary phone' >+ patron_fields.B_streetnumber => 'Alternate street number' >+ patron_fields.B_streettype => 'Alternate street type' >+ patron_fields.B_address => 'Alternate address' >+ patron_fields.B_address2 => 'Alternate address line 2' >+ patron_fields.B_city => 'Alternate city' >+ patron_fields.B_state => 'Alternate state' >+ patron_fields.B_zipcode => 'Alternate zip code' >+ patron_fields.B_country => 'Alternate Country' >+ patron_fields.B_email => 'Alternate email' >+ patron_fields.B_phone => 'Alternate phone' >+ patron_fields.dateofbirth => 'Date of birth' >+ patron_fields.branchcode => 'Branch code' >+ patron_fields.categorycode => 'Category code' >+ patron_fields.dateenrolled => 'Registration date' >+ patron_fields.dateexpiry => 'Expiration date' >+ patron_fields.gonenoaddress => 'Gone no address' >+ patron_fields.lost => 'Lost card' >+ patron_fields.debarred => 'Restricted' >+ patron_fields.debarredcomment => 'Restriction reason' >+ patron_fields.contactname => 'Guarantor surname' >+ patron_fields.contactfirstname => 'Guarantor firstname' >+ patron_fields.contacttitle => 'Guarantor title' >+ patron_fields.guarantorid => 'Guarantor ID' >+ patron_fields.borrowernotes => 'Circulation Note' >+ patron_fields.relationship => 'Guarantor relationship' >+ patron_fields.sex => 'Sex' >+ patron_fields.flags => 'Permissions (code)' >+ patron_fields.userid => 'User name' >+ patron_fields.opacnote => 'OPAC note' >+ patron_fields.contactnote => 'Contact note' >+ patron_fields.sort1 => 'Sort field 1' >+ patron_fields.sort2 => 'Sort field 2' >+ patron_fields.altcontactfirstname => 'Alternate contact first name' >+ patron_fields.altcontactsurname => 'Alternate contact surname' >+ patron_fields.altcontactaddress1 => 'Alternate contact address' >+ patron_fields.altcontactaddress2 => 'Alternate contact address line 2' >+ patron_fields.altcontactaddress3 => 'Alternate contact city' >+ patron_fields.altcontactstate => 'Alternate contact state' >+ patron_fields.altcontactzipcode => 'Alternate contact zip code' >+ patron_fields.altcontactcountry => 'Alternate contact country' >+ patron_fields.altcontactphone => 'Alternate contact phone' >+ patron_fields.smsalertnumber => 'SMS alert number' >+ patron_fields.sms_provider_id => 'SMS provider' >+ patron_fields.privacy => 'Privacy (code)' >+ patron_fields.privacy_guarantor_checkouts => 'Guarantor can view checkouts' >+ patron_fields.updated_on => 'Last updated' >+ patron_fields.lastseen => 'Last seen' >+ patron_fields.checkprevcheckout => 'Check previous checkout' >+ %] >+ [% search_options = default_fields.merge(pref_fields).unique %] >+ [% FOREACH s_o IN search_options %] >+ [% IF patron_fields.$s_o %] >+ [% IF searchfieldstype == s_o %] >+ <option selected="selected" value=[% s_o %]>[% patron_fields.$s_o %]</option> >+ [% ELSE %] >+ <option value=[% s_o %]>[% patron_fields.$s_o %]</option> >+ [% END %] >+ [% END %] > [% END %] > </select> > </p> >-- >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 17374
:
56921
|
56931
|
56958
|
58239
|
66400
|
70226
|
71536
|
71597
|
71598
|
71599
|
71600
|
74828
|
93226
|
94831
|
94876
|
94890
|
94891
|
94892
|
96341
|
96342
|
96343
|
96679
|
98106
|
98478
|
100436
|
100437
|
100438
|
100439