Bug 5543 - Date ISO format wrong separator
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / patron-search.inc
1
2 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Patrons Resident Search Box -->
3 [% IF ( CAN_user_circulate ) %][% IF ( CircAutocompl ) %]<script type="text/javascript">
4 //<![CDATA[
5 YAHOO.util.Event.onContentReady("header_search", function() {
6     new function() {
7         // Define a custom formatter function
8         this.fnCustomFormatter = function(oResultItem, sQuery) {
9             var name        = oResultItem[0];
10             var cardnumber  = oResultItem[1];
11             var address     = oResultItem[2];
12             var city        = oResultItem[3];
13             var zip         = oResultItem[4];
14             var aMarkup = [
15                 "<div class=\"sample-result\">",
16                 name,
17                 " (",
18                 cardnumber,
19                 ")<small> -- ",
20                 address,
21                 ", ",
22                 city,
23                 "<\/small>",
24                 "<\/div>"];
25             return (aMarkup.join(""));
26         };
27
28         // Instantiate one XHR DataSource and define schema as an array:
29         //     ["Record Delimiter",
30         //     "Field Delimiter"]
31         this.oACDS = new YAHOO.widget.DS_XHR("/cgi-bin/koha/circ/ysearch.pl", ["\n", "\t"]);
32         this.oACDS.responseType = YAHOO.widget.DS_XHR.TYPE_FLAT;
33         this.oACDS.maxCacheEntries = 60;
34         this.oACDS.queryMatchSubset = true;
35
36         // Instantiate first AutoComplete
37         var myInput = document.getElementById('findborrower');
38         var myContainer = document.getElementById('yborrowercontainer');
39         this.oAutoComp = new YAHOO.widget.AutoComplete(myInput,myContainer,this.oACDS);
40         //this.oAutoComp.delimChar = ";";
41         //this.oAutoComp.queryDelay = 1;
42         this.oAutoComp.formatResult = this.fnCustomFormatter;
43 }
44 });
45 //]]>
46 </script>[% END %][% END %]
47 <div id="header_search">
48         <div id="patron_search" class="residentsearch">
49         <p class="tip">Enter patron card number or partial name:</p>
50         <form action="/cgi-bin/koha/members/member.pl" method="post">
51     <input id="searchmember" size="25" class="focus" name="member" type="text" value="[% member %]"/>
52         [% IF ( branchloop ) %]
53         <span class="filteraction" id="filteraction_off"> <a href="#" onclick="$('#filters').toggle();$('.filteraction').toggle();">[-]</a></span>
54         <span class="filteraction" id="filteraction_on"> <a href="#" onclick="$('#filters').toggle();$('.filteraction').toggle();">[+]</a></span>
55         [% END %]
56     order by:
57     <select name="orderby" id="searchorderby">
58     <option value="surname,0">Surname</option>
59     <option value="cardnumber,0">Cardnumber</option>
60     </select>
61     <input value="Search" class="submit" type="submit" />
62         [% IF ( branchloop ) %]
63         <p id="filters"> <label for="branchcode">Library: </label><select name="branchcode" id="branchcode">
64         <option value="">Any</option>[% FOREACH branchloo IN branchloop %]
65         [% IF ( branchloo.selected ) %]
66         <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]
67         <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
68       [% END %]</select>
69                  <label for="categorycode">Category: </label><select name="categorycode" id="categorycode">
70         <option value="">Any</option>[% FOREACH categorie IN categories %]
71         [% IF ( categorie.selected ) %]
72         <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description %]</option>[% ELSE %]
73         <option value="[% categorie.categorycode %]">[% categorie.description %]</option>[% END %]
74       [% END %]</select>
75         </p>
76         [% END %]
77 </form>
78         </div>
79         [% IF ( CAN_user_circulate ) %]
80         <div id="circ_search" class="residentsearch" style="display:none;">
81         <p class="tip">Enter patron card number or partial name:</p>
82     <form action="/cgi-bin/koha/circ/circulation.pl" method="post" autocomplete="off">
83     [% IF ( CircAutocompl ) %]
84     <div class="autocomplete">
85             <div id="borrowerautocomplete" class="autocomplete">
86                 <input autocomplete="off" id="findborrower" name="findborrower" type="text" />
87                 <div id="yborrowercontainer"></div>
88                 <input id="ysearchsubmit" type="submit" class="submit" value="Submit" />
89                 <input name="branch" value="[% branch %]" type="hidden" />
90                 <input name="printer" value="" type="hidden" />
91             </div>
92         </div>
93         [% ELSE %]
94             <input id="findborrower" name="findborrower" size="40" type="text" />
95             <input name="branch" value="[% branch %]" type="hidden" />
96             <input name="printer" value="" type="hidden" />
97             <input value="Submit" class="submit" type="submit" />
98         [% END %]
99     </form>
100         </div>[% END %]
101         [% IF ( CAN_user_catalogue ) %]
102         <div id="catalog_search" class="residentsearch" style="display:none;">
103         <p class="tip">Enter search keywords:</p>
104                 <form action="/cgi-bin/koha/catalogue/search.pl"  method="get" id="cat-search-block">
105                          <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="form-text" />
106                                 <input type="submit" name="op" id="opac-submit" value="Submit" class="submit" />
107                 </form>
108         </div>[% END %]
109     [% IF ( CAN_user_circulate ) %]
110     <div id="checkin_search" class="residentsearch" style="display:none;">
111     <p class="tip">Scan a barcode to check in:</p>
112     <form method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off">
113     <input name="barcode" id="ret_barcode" size="40" accesskey="r" />
114     <input value="Submit" class="submit" type="submit" />
115     </form>
116     </div>
117     [% END %]
118                         <ul>
119                         <li><a href="/cgi-bin/koha/members/members-home.pl#patron_search">Search Patrons</a></li>
120                         [% IF ( CAN_user_circulate ) %]<li><a href="/cgi-bin/koha/circ/circulation.pl#circ_search">Check Out</a></li>[% END %]
121     [% IF ( CAN_user_circulate ) %]<li><a href="/cgi-bin/koha/circ/returns.pl#checkin_search">Check In</a></li>[% END %]
122                         [% IF ( CAN_user_catalogue ) %]<li><a href="/cgi-bin/koha/catalogue/search.pl#catalog_search">Search the Catalog</a></li>[% END %]
123                         </ul>
124 </div>
125 <script type="text/javascript">//<![CDATA[
126 $(document).ready(function() {
127     [% IF ( advsearch ) %]$("#filteraction_on").toggle();
128     [% ELSE %]$("#filters").toggle();
129     $("#filteraction_off").toggle();[% END %]
130 });
131 //]]>
132 </script>
133 <!-- End Patrons Resident Search Box -->