3 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Patrons Resident Search Box -->
4 <div id="header_search">
5 <div id="patron_search" class="residentsearch">
6 <p class="tip">Enter patron card number or partial name:</p>
7 <form action="/cgi-bin/koha/members/member.pl" method="post">
8 <input id="searchmember" data-toggle="tooltip" size="25" class="focus" name="searchmember" type="text" value="[% searchmember %]"/>
9 <input type="hidden" name="quicksearch" value="1" />
10 <span class="filteraction" id="filteraction_off"> <a href="#">[-]</a></span>
11 <span class="filteraction" id="filteraction_on"> <a href="#">[+]</a></span>
13 <input value="Search" class="submit" type="submit" />
16 <p><label for="searchfieldstype">Search fields:</label>
17 <select name="searchfieldstype" id="searchfieldstype">
18 [% IF searchfieldstype == "standard" %]
19 <option selected="selected" value='standard'>Standard</option>
21 <option value='standard'>Standard</option>
23 [% IF searchfieldstype == "email" %]
24 <option selected="selected" value='email'>Email</option>
26 <option value='email'>Email</option>
28 [% IF searchfieldstype == "borrowernumber" %]
29 <option selected="selected" value='borrowernumber'>Borrower number</option>
31 <option value='borrowernumber'>Borrower number</option>
33 [% IF searchfieldstype == "phone" %]
34 <option selected="selected" value='phone'>Phone number</option>
36 <option value='phone'>Phone number</option>
38 [% IF searchfieldstype == "address" %]
39 <option selected="selected" value='address'>Street Address</option>
41 <option value='address'>Street Address</option>
43 [% IF searchfieldstype == "dateofbirth" %]
44 <option selected="selected" value='dateofbirth'>Date of birth</option>
46 <option value='dateofbirth'>Date of birth</option>
48 [% IF searchfieldstype == "sort1" %]
49 <option selected="selected" value='sort1'>Sort field 1</option>
51 <option value='sort1'>Sort field 1</option>
53 [% IF searchfieldstype == "sort2" %]
54 <option selected="selected" value='sort2'>Sort field 2</option>
56 <option value='sort2'>Sort field 2</option>
62 <label for="searchtype">Search type:</label>
63 <select name="searchtype" id="searchtype">
64 [% IF searchtype != 'start_with' %]
65 <option value='start_with'>Starts with</option>
66 <option selected="selected" value='contain'>Contains</option>
68 <option selected="selected" value='start_with'>Starts with</option>
69 <option value='contain'>Contains</option>
75 [% IF ( branchloop ) %]
76 <p> <label for="branchcode">Library: </label>
77 <select name="branchcode" id="branchcode">
78 [% IF branchloop.size != 1 %]
79 <option value="">Any</option>
81 [% FOREACH branchloo IN branchloop %]
82 [% IF ( branchloo.selected ) %]
83 <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]
84 <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
87 [% IF ( categories ) %]
89 <label for="categorycode">Category: </label><select name="categorycode" id="categorycode">
90 <option value="">Any</option>[% FOREACH categorie IN categories %]
91 [% IF ( categorie.selected ) %]
92 <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description %]</option>[% ELSE %]
93 <option value="[% categorie.categorycode %]">[% categorie.description %]</option>[% END %]
100 [% INCLUDE 'patron-search-box.inc' %]
102 [% IF ( CAN_user_catalogue ) %]
103 <div id="catalog_search" class="residentsearch">
104 <p class="tip">Enter search keywords:</p>
105 <form action="/cgi-bin/koha/catalogue/search.pl" method="get" id="cat-search-block">
106 <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="form-text" />
107 <input type="submit" name="op" id="opac-submit" value="Submit" class="submit" />
110 [% IF ( CAN_user_circulate ) %]
111 <div id="checkin_search" class="residentsearch">
112 <p class="tip">Scan a barcode to check in:</p>
113 <form method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off">
114 <input name="barcode" id="ret_barcode" size="40" accesskey="r" />
115 <input value="Submit" class="submit" type="submit" />
120 <li><a href="#patron_search">Search patrons</a></li>
121 [% IF ( CAN_user_circulate ) %]<li><a href="#circ_search">Check out</a></li>[% END %]
122 [% IF ( CAN_user_circulate ) %]<li><a href="#checkin_search">Check in</a></li>[% END %]
123 [% IF ( CAN_user_catalogue ) %]<li><a href="#catalog_search">Search the catalog</a></li>[% END %]
125 </div><!-- /header_search -->
126 </div><!-- /gradient -->
127 <script type="text/javascript">//<![CDATA[
128 $(document).ready(function() {
129 $("#filteraction_off, #filteraction_on").on('click', function(e) {
131 $('#filters').toggle();
132 $('.filteraction').toggle();
134 [% IF ( advsearch ) %]$("#filteraction_on").toggle();
135 [% ELSE %]$("#filters").toggle();
136 $("#filteraction_off").toggle();[% END %]
137 [% SET dateformat = Koha.Preference('dateformat') %]
138 $("#searchfieldstype").change(function() {
139 if ( $(this).val() == 'dateofbirth' ) {
140 [% IF dateformat == 'us' %]
141 var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'MM/DD/YYYY'");
142 [% ELSIF dateformat == 'iso' %]
143 var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'YYYY-MM-DD'");
144 [% ELSIF dateformat == 'metric' %]
145 var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'DD/MM/YYYY'");
147 $('#searchmember').attr("title",MSG_DATE_FORMAT).tooltip('show');
149 $('#searchmember').tooltip('destroy');
155 <!-- End Patrons Resident Search Box -->