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 == "phone" %]
36 <option selected="selected" value='phone'>Phone number</option>
38 <option value='phone'>Phone number</option>
40 [% IF searchfieldstype == "address" %]
41 <option selected="selected" value='address'>Street Address</option>
43 <option value='address'>Street Address</option>
45 [% IF searchfieldstype == "dateofbirth" %]
46 <option selected="selected" value='dateofbirth'>Date of birth</option>
48 <option value='dateofbirth'>Date of birth</option>
50 [% IF searchfieldstype == "sort1" %]
51 <option selected="selected" value='sort1'>Sort field 1</option>
53 <option value='sort1'>Sort field 1</option>
55 [% IF searchfieldstype == "sort2" %]
56 <option selected="selected" value='sort2'>Sort field 2</option>
58 <option value='sort2'>Sort field 2</option>
64 <label for="searchtype">Search type:</label>
65 <select name="searchtype" id="searchtype">
66 [% IF searchtype != 'start_with' %]
67 <option value='start_with'>Starts with</option>
68 <option selected="selected" value='contain'>Contains</option>
70 <option selected="selected" value='start_with'>Starts with</option>
71 <option value='contain'>Contains</option>
77 <label for="branchcode">Library: </label>
78 [% SET branches = Branches.all( selected => branchcode_filter ) %]
79 <select name="branchcode_filter" id="branchcode">
80 [% IF branches.size != 1 %]
81 <option value="">Any</option>
83 [% FOREACH b IN branches %]
85 <option value="[% b.branchcode %]" selected="selected">[% b.branchname %]</option>
87 <option value="[% b.branchcode %]">[% b.branchname %]</option>
94 <label for="categorycode">Category: </label>
95 [% SET categories = Categories.all( selected => categorycode_filter ) %]
96 <select name="categorycode_filter" id="categorycode">
97 <option value="">Any</option>
98 [% FOREACH categorie IN categories %]
99 [% IF ( categorie.selected ) %]
100 <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description %]</option>
102 <option value="[% categorie.categorycode %]">[% categorie.description %]</option>
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="head-searchbox 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 class="head-searchbox" name="barcode" id="ret_barcode" size="40" accesskey="r" />
125 <input value="Submit" class="submit" type="submit" />
130 <li><a onclick="keep_text(0)" href="#patron_search">Search patrons</a></li>
131 [% IF ( CAN_user_circulate ) %]<li><a onclick="keep_text(1)" href="#circ_search">Check out</a></li>[% END %]
132 [% IF ( CAN_user_circulate ) %]<li><a onclick="keep_text(2)" href="#checkin_search">Check in</a></li>[% END %]
133 [% IF ( CAN_user_catalogue ) %]<li><a onclick="keep_text(3)" 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 $("#filteraction_off, #filteraction_on").on('click', function(e) {
141 $('#filters').toggle();
142 $('.filteraction').toggle();
144 [% IF ( advsearch ) %]$("#filteraction_on").toggle();
145 [% ELSE %]$("#filters").toggle();
146 $("#filteraction_off").toggle();[% END %]
147 [% SET dateformat = Koha.Preference('dateformat') %]
148 $("#searchfieldstype").change(function() {
149 if ( $(this).val() == 'dateofbirth' ) {
150 [% IF dateformat == 'us' %]
151 var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'MM/DD/YYYY'");
152 [% ELSIF dateformat == 'iso' %]
153 var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'YYYY-MM-DD'");
154 [% ELSIF dateformat == 'metric' %]
155 var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'DD/MM/YYYY'");
157 $('#searchmember').attr("title",MSG_DATE_FORMAT).tooltip('show');
159 $('#searchmember').tooltip('destroy');
165 <!-- End Patrons Resident Search Box -->