Bug 22521: Update UI to use accountlines.status
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / patron-search.inc
1 [% USE Koha %]
2 [% USE Branches %]
3 [% USE Categories %]
4 [% PROCESS 'html_helpers.inc' %]
5 <div class="gradient">
6 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName | html %]</a></h1><!-- Begin Patrons Resident Search Box -->
7 <div id="header_search">
8     <div id="patron_search" class="residentsearch">
9     <p class="tip">Enter patron card number or partial name:</p>
10     <form action="/cgi-bin/koha/members/member.pl" method="post">
11     <input id="searchmember" data-toggle="tooltip" size="25" class="head-searchbox focus" name="searchmember" type="text" value="[% searchmember | html %]" autocomplete="off" />
12     <input type="hidden" name="quicksearch" value="1" />
13     <span class="filteraction" id="filteraction_off"> <a href="#">[-]</a></span>
14     <span class="filteraction" id="filteraction_on"> <a href="#">[+]</a></span>
15
16     <input value="Search" class="submit" type="submit" />
17
18     <div id="filters">
19         <p><label for="searchfieldstype">Search fields:</label>
20             <select name="searchfieldstype" id="searchfieldstype">
21               [% IF searchfieldstype == "standard" %]
22                 <option selected="selected" value='standard'>Standard</option>
23               [% ELSE %]
24                 <option value='standard'>Standard</option>
25               [% END %]
26               [% IF searchfieldstype == "surname" %]
27                 <option selected="selected" value='surname'>Surname</option>
28               [% ELSE %]
29                 <option value='surname'>Surname</option>
30               [% END %]
31               [% IF searchfieldstype == "email" %]
32                 <option selected="selected" value='email'>Email</option>
33               [% ELSE %]
34                 <option value='email'>Email</option>
35               [% END %]
36               [% IF searchfieldstype == "borrowernumber" %]
37                 <option selected="selected" value='borrowernumber'>Borrower number</option>
38               [% ELSE %]
39                 <option value='borrowernumber'>Borrower number</option>
40               [% END %]
41               [% IF searchfieldstype == "userid" %]
42                 <option selected="selected" value='userid'>Username</option>
43               [% ELSE %]
44                 <option value='userid'>Username</option>
45               [% END %]
46               [% IF searchfieldstype == "phone" %]
47                 <option selected="selected" value='phone'>Phone number</option>
48               [% ELSE %]
49                 <option value='phone'>Phone number</option>
50               [% END %]
51               [% IF searchfieldstype == "address" %]
52                 <option selected="selected" value='address'>Street address</option>
53               [% ELSE %]
54                 <option value='address'>Street address</option>
55               [% END %]
56               [% IF searchfieldstype == "dateofbirth" %]
57                 <option selected="selected" value='dateofbirth'>Date of birth</option>
58               [% ELSE %]
59                 <option value='dateofbirth'>Date of birth</option>
60               [% END %]
61               [% IF searchfieldstype == "sort1" %]
62                 <option selected="selected" value='sort1'>Sort field 1</option>
63               [% ELSE %]
64                 <option value='sort1'>Sort field 1</option>
65               [% END %]
66               [% IF searchfieldstype == "sort2" %]
67                 <option selected="selected" value='sort2'>Sort field 2</option>
68               [% ELSE %]
69                 <option value='sort2'>Sort field 2</option>
70               [% END %]
71             </select>
72         </p>
73
74         <p>
75             <label for="searchtype">Search type:</label>
76             <select name="searchtype" id="searchtype">
77               [% IF searchtype == 'start_with' %]
78                   <option selected="selected" value='start_with'>Starts with</option>
79                   <option value='contain'>Contains</option>
80               [% ELSE %]
81                   <option value='start_with'>Starts with</option>
82                   <option selected="selected" value='contain'>Contains</option>
83               [% END %]
84             </select>
85         </p>
86
87         <p>
88             <label for="branchcode">Library: </label>
89             [% SET branches = Branches.all( selected => branchcode_filter, only_from_group => 1 ) %]
90             <select name="branchcode_filter" id="branchcode">
91                 [% IF branches.size != 1 %]
92                   <option value="">Any</option>
93                 [% END %]
94                 [% PROCESS options_for_libraries libraries => branches %]
95             </select>
96         </p>
97
98         <p>
99             <label for="categorycode">Category: </label>
100             [% SET categories = Categories.all() %]
101             <select name="categorycode_filter" id="categorycode">
102                 <option value="">Any</option>
103                 [% FOREACH category IN categories %]
104                     [% IF category.categorycode == categorycode_filter %]
105                         <option value="[% category.categorycode | html %]" selected="selected">[% category.description | html %]</option>
106                     [% ELSE %]
107                         <option value="[% category.categorycode | html %]">[% category.description | html %]</option>
108                     [% END %]
109                 [% END %]
110             </select>
111         </p>
112     </div>
113     </form>
114 </div>
115     [% INCLUDE 'patron-search-box.inc' %]
116
117     [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
118     <div id="checkin_search" class="residentsearch">
119     <p class="tip">Scan a barcode to check in:</p>
120     <form method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off">
121     <input class="head-searchbox" name="barcode" id="ret_barcode" size="40" accesskey="r" type="text" />
122     <input value="Submit" class="submit" type="submit" />
123     </form>
124     </div>
125         <div id="renew_search" class="residentsearch">
126         <p class="tip">Scan a barcode to renew:</p>
127             <form method="post" action="/cgi-bin/koha/circ/renew.pl" autocomplete="off">
128                 <input class="head-searchbox" name="barcode" id="ren_barcode" size="40" type="text" />
129                 <input value="Submit" class="submit" type="submit" />
130             </form>
131         </div>
132     [% END %]
133
134     [% IF ( CAN_user_catalogue ) %]
135     <div id="catalog_search" class="residentsearch">
136     <p class="tip">Enter search keywords:</p>
137         <form action="/cgi-bin/koha/catalogue/search.pl"  method="get" id="cat-search-block">
138              [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
139              <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
140              <input type="submit" name="op" id="opac-submit" value="Submit" class="submit" />
141         </form>
142     </div>[% END %]
143
144     <ul>
145         <li><a class="keep_text" href="#patron_search">Search patrons</a></li>
146         [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]<li><a class="keep_text" href="#circ_search">Check out</a></li>[% END %]
147         [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]<li><a class="keep_text" href="#checkin_search">Check in</a></li>[% END %]
148         [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]<li><a class="keep_text" href="#renew_search">Renew</a></li>[% END %]
149         [% IF ( CAN_user_catalogue ) %]<li><a class="keep_text" href="#catalog_search">Search the catalog</a></li>[% END %]
150     </ul>
151 </div><!-- /header_search -->
152 </div><!-- /gradient -->
153 <!-- End Patrons Resident Search Box -->