5 <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="patron_search" class="residentsearch">
8 <p class="tip">Enter patron card number or partial name:</p>
9 <form action="/cgi-bin/koha/members/member.pl" method="post">
10 <input id="searchmember" data-toggle="tooltip" size="25" class="head-searchbox focus" name="searchmember" type="text" value="[% searchmember %]"/>
11 <input type="hidden" name="quicksearch" value="1" />
12 <span class="filteraction" id="filteraction_off"> <a href="#">[-]</a></span>
13 <span class="filteraction" id="filteraction_on"> <a href="#">[+]</a></span>
15 <input value="Search" class="submit" type="submit" />
18 <p><label for="searchfieldstype">Search fields:</label>
19 <select name="searchfieldstype" id="searchfieldstype">
20 [% IF searchfieldstype == "standard" %]
21 <option selected="selected" value='standard'>Standard</option>
23 <option value='standard'>Standard</option>
25 [% IF searchfieldstype == "email" %]
26 <option selected="selected" value='email'>Email</option>
28 <option value='email'>Email</option>
30 [% IF searchfieldstype == "borrowernumber" %]
31 <option selected="selected" value='borrowernumber'>Borrower number</option>
33 <option value='borrowernumber'>Borrower number</option>
35 [% IF searchfieldstype == "userid" %]
36 <option selected="selected" value='userid'>Username</option>
38 <option value='userid'>Username</option>
40 [% IF searchfieldstype == "phone" %]
41 <option selected="selected" value='phone'>Phone number</option>
43 <option value='phone'>Phone number</option>
45 [% IF searchfieldstype == "address" %]
46 <option selected="selected" value='address'>Street Address</option>
48 <option value='address'>Street Address</option>
50 [% IF searchfieldstype == "dateofbirth" %]
51 <option selected="selected" value='dateofbirth'>Date of birth</option>
53 <option value='dateofbirth'>Date of birth</option>
55 [% IF searchfieldstype == "sort1" %]
56 <option selected="selected" value='sort1'>Sort field 1</option>
58 <option value='sort1'>Sort field 1</option>
60 [% IF searchfieldstype == "sort2" %]
61 <option selected="selected" value='sort2'>Sort field 2</option>
63 <option value='sort2'>Sort field 2</option>
69 <label for="searchtype">Search type:</label>
70 <select name="searchtype" id="searchtype">
71 [% IF searchtype != 'start_with' %]
72 <option value='start_with'>Starts with</option>
73 <option selected="selected" value='contain'>Contains</option>
75 <option selected="selected" value='start_with'>Starts with</option>
76 <option value='contain'>Contains</option>
82 <label for="branchcode">Library: </label>
83 [% SET branches = Branches.all( selected => branchcode_filter ) %]
84 <select name="branchcode_filter" id="branchcode">
85 [% IF branches.size != 1 %]
86 <option value="">Any</option>
88 [% FOREACH b IN branches %]
90 <option value="[% b.branchcode %]" selected="selected">[% b.branchname %]</option>
92 <option value="[% b.branchcode %]">[% b.branchname %]</option>
99 <label for="categorycode">Category: </label>
100 [% SET categories = Categories.all( selected => categorycode_filter ) %]
101 <select name="categorycode_filter" id="categorycode">
102 <option value="">Any</option>
103 [% FOREACH categorie IN categories %]
104 [% IF ( categorie.selected ) %]
105 <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description %]</option>
107 <option value="[% categorie.categorycode %]">[% categorie.description %]</option>
115 [% INCLUDE 'patron-search-box.inc' %]
117 [% IF ( CAN_user_circulate ) %]
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" />
122 <input value="Submit" class="submit" type="submit" />
127 [% IF ( CAN_user_catalogue ) %]
128 <div id="catalog_search" class="residentsearch">
129 <p class="tip">Enter search keywords:</p>
130 <form action="/cgi-bin/koha/catalogue/search.pl" method="get" id="cat-search-block">
131 <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" />
132 <input type="submit" name="op" id="opac-submit" value="Submit" class="submit" />
137 <li><a onclick="keep_text(0)" href="#patron_search">Search patrons</a></li>
138 [% IF ( CAN_user_circulate ) %]<li><a onclick="keep_text(1)" href="#circ_search">Check out</a></li>[% END %]
139 [% IF ( CAN_user_circulate ) %]<li><a onclick="keep_text(2)" href="#checkin_search">Check in</a></li>[% END %]
140 [% IF ( CAN_user_catalogue ) %]<li><a onclick="keep_text(3)" href="#catalog_search">Search the catalog</a></li>[% END %]
142 </div><!-- /header_search -->
143 </div><!-- /gradient -->
144 <script type="text/javascript">//<![CDATA[
145 $(document).ready(function() {
146 $("#filteraction_off, #filteraction_on").on('click', function(e) {
148 $('#filters').toggle();
149 $('.filteraction').toggle();
151 [% IF ( advsearch ) %]$("#filteraction_on").toggle();
152 [% ELSE %]$("#filters").toggle();
153 $("#filteraction_off").toggle();[% END %]
154 [% SET dateformat = Koha.Preference('dateformat') %]
155 $("#searchfieldstype").change(function() {
156 if ( $(this).val() == 'dateofbirth' ) {
157 [% IF dateformat == 'us' %]
158 var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'MM/DD/YYYY'");
159 [% ELSIF dateformat == 'iso' %]
160 var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'YYYY-MM-DD'");
161 [% ELSIF dateformat == 'metric' %]
162 var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'DD/MM/YYYY'");
164 $('#searchmember').attr("title",MSG_DATE_FORMAT).tooltip('show');
166 $('#searchmember').tooltip('destroy');
172 <!-- End Patrons Resident Search Box -->