View | Details | Raw Unified | Return to bug 17374
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (-50 / +12 lines)
Lines 1-6 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Branches %]
2
[% USE Branches %]
3
[% USE Categories %]
3
[% USE Categories %]
4
[% PROCESS 'patronfields.inc' %]
4
<div class="gradient">
5
<div class="gradient">
5
<h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Patrons Resident Search Box -->
6
<h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Patrons Resident Search Box -->
6
<div id="header_search">
7
<div id="header_search">
Lines 14-75 Link Here
14
15
15
    <input value="Search" class="submit" type="submit" />
16
    <input value="Search" class="submit" type="submit" />
16
17
18
17
    <div id="filters">
19
    <div id="filters">
18
        <p><label for="searchfieldstype">Search fields:</label>
20
        <p><label for="searchfieldstype">Search fields:</label>
19
            <select name="searchfieldstype" id="searchfieldstype">
21
            <select name="searchfieldstype" id="searchfieldstype">
20
              [% IF searchfieldstype == "standard" %]
22
              [% pref_fields = Koha.Preference('DefaultPatronSearchFields').split(',') %]
21
                <option selected="selected" value='standard'>Standard</option>
23
              [% default_fields = [ 'standard', 'surname', 'email', 'borrowernumber', 'userid', 'phone', 'address', 'dateofbirth', 'sort1', 'sort2' ] %]
22
              [% ELSE %]
24
              [% search_options = default_fields.merge(pref_fields).unique %]
23
                <option value='standard'>Standard</option>
25
              [% FOREACH s_o IN search_options %]
24
              [% END %]
26
                  [% display_name = PROCESS patron_fields name=s_o %]
25
              [% IF searchfieldstype == "surname" %]
27
                  [% IF searchfieldstype == s_o %]
26
                <option selected="selected" value='surname'>Surname</option>
28
                      <option selected="selected" value=[% s_o %]>[% display_name %]</option>
27
              [% ELSE %]
29
                  [% ELSE %]
28
                <option value='surname'>Surname</option>
30
                      <option value=[% s_o %]>[% display_name %]</option>
29
              [% END %]
31
                  [% END %]
30
              [% IF searchfieldstype == "email" %]
31
                <option selected="selected" value='email'>Email</option>
32
              [% ELSE %]
33
                <option value='email'>Email</option>
34
              [% END %]
35
              [% IF searchfieldstype == "borrowernumber" %]
36
                <option selected="selected" value='borrowernumber'>Borrower number</option>
37
              [% ELSE %]
38
                <option value='borrowernumber'>Borrower number</option>
39
              [% END %]
40
              [% IF searchfieldstype == "userid" %]
41
                <option selected="selected" value='userid'>Username</option>
42
              [% ELSE %]
43
                <option value='userid'>Username</option>
44
              [% END %]
45
              [% IF searchfieldstype == "phone" %]
46
                <option selected="selected" value='phone'>Phone number</option>
47
              [% ELSE %]
48
                <option value='phone'>Phone number</option>
49
              [% END %]
50
              [% IF searchfieldstype == "address" %]
51
                <option selected="selected" value='address'>Street Address</option>
52
              [% ELSE %]
53
                <option value='address'>Street Address</option>
54
              [% END %]
55
              [% IF searchfieldstype == "dateofbirth" %]
56
                <option selected="selected" value='dateofbirth'>Date of birth</option>
57
              [% ELSE %]
58
                <option value='dateofbirth'>Date of birth</option>
59
              [% END %]
60
              [% IF searchfieldstype == "sort1" %]
61
                <option selected="selected" value='sort1'>Sort field 1</option>
62
              [% ELSE %]
63
                <option value='sort1'>Sort field 1</option>
64
              [% END %]
65
              [% IF searchfieldstype == "sort2" %]
66
                <option selected="selected" value='sort2'>Sort field 2</option>
67
              [% ELSE %]
68
                <option value='sort2'>Sort field 2</option>
69
              [% END %]
32
              [% END %]
70
            </select>
33
            </select>
71
        </p>
34
        </p>
72
73
        <p>
35
        <p>
74
            <label for="searchtype">Search type:</label>
36
            <label for="searchtype">Search type:</label>
75
            <select name="searchtype" id="searchtype">
37
            <select name="searchtype" id="searchtype">
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc (-1 / +74 lines)
Line 0 Link Here
0
- 
1
[% BLOCK patron_fields -%]
2
     [% SWITCH name %]
3
     [%- CASE 'standard' -%]Standard
4
     [%- CASE 'borrowernumber' -%]Borrower number
5
     [%- CASE 'cardnumber' -%]Card number
6
     [%- CASE 'surname' -%]Surname
7
     [%- CASE 'firstname' -%]First name
8
     [%- CASE 'title' -%]Title
9
     [%- CASE 'othernames' -%]Other names
10
     [%- CASE 'initials' -%]Initials
11
     [%- CASE 'streetnumber' -%]Street number
12
     [%- CASE 'streettype' -%]Street type
13
     [%- CASE 'address' -%]Address
14
     [%- CASE 'address2' -%]Address line 2
15
     [%- CASE 'city' -%]City
16
     [%- CASE 'state' -%]State
17
     [%- CASE 'zipcode' -%]Zip code
18
     [%- CASE 'country' -%]Country
19
     [%- CASE 'email' -%]Email
20
     [%- CASE 'phone' -%]Phone
21
     [%- CASE 'mobile' -%]Mobile phone
22
     [%- CASE 'fax' -%]Fax
23
     [%- CASE 'emailpro' -%]Secondary email
24
     [%- CASE 'phonepro' -%]Secondary phone
25
     [%- CASE 'B_streetnumber' -%]Alternate street number
26
     [%- CASE 'B_streettype' -%]Alternate street type
27
     [%- CASE 'B_address' -%]Alternate address
28
     [%- CASE 'B_address2' -%]Alternate address line 2
29
     [%- CASE 'B_city' -%]Alternate city
30
     [%- CASE 'B_state' -%]Alternate state
31
     [%- CASE 'B_zipcode' -%]Alternate zip code
32
     [%- CASE 'B_country' -%]Alternate Country
33
     [%- CASE 'B_email' -%]Alternate email
34
     [%- CASE 'B_phone' -%]Alternate phone
35
     [%- CASE 'dateofbirth' -%]Date of birth
36
     [%- CASE 'branchcode' -%]Branch code
37
     [%- CASE 'categorycode' -%]Category code
38
     [%- CASE 'dateenrolled' -%]Registration date
39
     [%- CASE 'dateexpiry' -%]Expiration date
40
     [%- CASE 'gonenoaddress' -%]Gone no address
41
     [%- CASE 'lost' -%]Lost card
42
     [%- CASE 'debarred' -%]Restricted
43
     [%- CASE 'debarredcomment' -%]Restriction reason
44
     [%- CASE 'contactname' -%]Guarantor surname
45
     [%- CASE 'contactfirstname' -%]Guarantor firstname
46
     [%- CASE 'contacttitle' -%]Guarantor title
47
     [%- CASE 'guarantorid' -%]Guarantor ID
48
     [%- CASE 'borrowernotes' -%]Circulation Note
49
     [%- CASE 'relationship' -%]Guarantor relationship
50
     [%- CASE 'sex' -%]Sex
51
     [%- CASE 'flags' -%]Permissions (code)
52
     [%- CASE 'userid' -%]User name
53
     [%- CASE 'opacnote' -%]OPAC note
54
     [%- CASE 'contactnote' -%]Contact note
55
     [%- CASE 'sort1' -%]Sort field 1
56
     [%- CASE 'sort2' -%]Sort field 2
57
     [%- CASE 'altcontactfirstname' -%]Alternate contact first name
58
     [%- CASE 'altcontactsurname' -%]Alternate contact surname
59
     [%- CASE 'altcontactaddress1' -%]Alternate contact address
60
     [%- CASE 'altcontactaddress2' -%]Alternate contact address line 2
61
     [%- CASE 'altcontactaddress3' -%]Alternate contact city
62
     [%- CASE 'altcontactstate' -%]Alternate contact state
63
     [%- CASE 'altcontactzipcode' -%]Alternate contact zip code
64
     [%- CASE 'altcontactcountry' -%]Alternate contact country
65
     [%- CASE 'altcontactphone' -%]Alternate contact phone
66
     [%- CASE 'smsalertnumber' -%]SMS alert number
67
     [%- CASE 'sms_provider_id' -%]SMS provider
68
     [%- CASE 'privacy' -%]Privacy (code)
69
     [%- CASE 'privacy_guarantor_checkouts' -%]Guarantor can view checkouts
70
     [%- CASE 'updated_on' -%]Last updated
71
     [%- CASE 'lastseen' -%]Last seen
72
     [%- CASE 'checkprevcheckout' -%]Check previous checkout
73
     [%- END -%]
74
[%- END -%]

Return to bug 17374