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="#" onclick="$('#filters').toggle();$('.filteraction').toggle();">[-]</a></span>
11 <span class="filteraction" id="filteraction_on"> <a href="#" onclick="$('#filters').toggle();$('.filteraction').toggle();">[+]</a></span>
13 <label for="searchfieldstype">Search fields:</label>
14 <select name="searchfieldstype" id="searchfieldstype">
15 [% IF searchfieldstype == "standard" %]
16 <option selected="selected" value='standard'>Standard</option>
18 <option value='standard'>Standard</option>
20 [% IF searchfieldstype == "email" %]
21 <option selected="selected" value='email'>Email</option>
23 <option value='email'>Email</option>
25 [% IF searchfieldstype == "borrowernumber" %]
26 <option selected="selected" value='borrowernumber'>Borrower number</option>
28 <option value='borrowernumber'>Borrower number</option>
30 [% IF searchfieldstype == "phone" %]
31 <option selected="selected" value='phone'>Phone number</option>
33 <option value='phone'>Phone number</option>
35 [% IF searchfieldstype == "address" %]
36 <option selected="selected" value='address'>Street Address</option>
38 <option value='address'>Street Address</option>
40 [% IF searchfieldstype == "dateofbirth" %]
41 <option selected="selected" value='dateofbirth'>Date of birth</option>
43 <option value='dateofbirth'>Date of birth</option>
45 [% IF searchfieldstype == "sort1" %]
46 <option selected="selected" value='sort1'>Sort field 1</option>
48 <option value='sort1'>Sort field 1</option>
50 [% IF searchfieldstype == "sort2" %]
51 <option selected="selected" value='sort2'>Sort field 2</option>
53 <option value='sort2'>Sort field 2</option>
57 <script type="text/javascript">
58 [% SET dateformat = Koha.Preference('dateformat') %]
59 $("#searchfieldstype").change(function() {
60 if ( $(this).val() == 'dateofbirth' ) {
61 [% IF dateformat == 'us' %]
62 var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'MM/DD/YYYY'");
63 [% ELSIF dateformat == 'iso' %]
64 var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'YYYY-MM-DD'");
65 [% ELSIF dateformat == 'metric' %]
66 var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'DD/MM/YYYY'");
68 $('#searchmember').attr("title",MSG_DATE_FORMAT).tooltip('show');
70 $('#searchmember').tooltip('destroy');
76 <label for="searchtype">Search type:</label>
77 <select name="searchtype" id="searchtype">
78 [% IF searchtype != 'start_with' %]
79 <option value='start_with'>Starts with</option>
80 <option selected="selected" value='contain'>Contains</option>
82 <option selected="selected" value='start_with'>Starts with</option>
83 <option value='contain'>Contains</option>
87 <input value="Search" class="submit" type="submit" />
88 [% IF ( branchloop ) %]
89 <p id="filters"> <label for="branchcode">Library: </label>
90 <select name="branchcode" id="branchcode">
91 [% IF branchloop.size != 1 %]
92 <option value="">Any</option>
94 [% FOREACH branchloo IN branchloop %]
95 [% IF ( branchloo.selected ) %]
96 <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]
97 <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
99 <label for="categorycode">Category: </label><select name="categorycode" id="categorycode">
100 <option value="">Any</option>[% FOREACH categorie IN categories %]
101 [% IF ( categorie.selected ) %]
102 <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description |html_entity %]</option>[% ELSE %]
103 <option value="[% categorie.categorycode %]">[% categorie.description |html_entity %]</option>[% END %]
110 [% INCLUDE 'patron-search-box.inc' %]
112 [% IF ( CAN_user_catalogue ) %]
113 <div id="catalog_search" class="residentsearch">
114 <p class="tip">Enter search keywords:</p>
115 <form action="/cgi-bin/koha/catalogue/search.pl" method="get" id="cat-search-block">
116 <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="form-text" />
117 <input type="submit" name="op" id="opac-submit" value="Submit" class="submit" />
120 [% IF ( CAN_user_circulate ) %]
121 <div id="checkin_search" class="residentsearch">
122 <p class="tip">Scan a barcode to check in:</p>
123 <form method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off">
124 <input name="barcode" id="ret_barcode" size="40" accesskey="r" />
125 <input value="Submit" class="submit" type="submit" />
130 <li><a href="#patron_search">Search patrons</a></li>
131 [% IF ( CAN_user_circulate ) %]<li><a href="#circ_search">Check out</a></li>[% END %]
132 [% IF ( CAN_user_circulate ) %]<li><a href="#checkin_search">Check in</a></li>[% END %]
133 [% IF ( CAN_user_catalogue ) %]<li><a href="#catalog_search">Search the catalog</a></li>[% END %]
135 </div><!-- /header_search -->
136 </div><!-- /gradient -->
137 <script type="text/javascript">//<![CDATA[
138 $(document).ready(function() {
139 [% IF ( advsearch ) %]$("#filteraction_on").toggle();
140 [% ELSE %]$("#filters").toggle();
141 $("#filteraction_off").toggle();[% END %]
145 <!-- End Patrons Resident Search Box -->