Continuing reformatting of returns.tmpl; Correcting javascript error in request.tmpl.
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / checkin-search.inc
1
2 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl"><!-- TMPL_VAR NAME="LibraryName" --></a></h1><!-- Begin Circulation Resident Search Box -->
3
4 <!-- TMPL_IF NAME="CircAutocompl" --><script type="text/javascript">
5 //<![CDATA[
6 YAHOO.util.Event.onContentReady("header_search", function() {
7     new function() {
8         // Define a custom formatter function
9         this.fnCustomFormatter = function(oResultItem, sQuery) {
10             var name        = oResultItem[0];
11             var cardnumber  = oResultItem[1];
12             var address     = oResultItem[2];
13             var city        = oResultItem[3];
14             var zip         = oResultItem[4];
15             var aMarkup = [
16                 "<div class=\"sample-result\">",
17                 name,
18                 " (",
19                 cardnumber,
20                 ")<small> -- ",
21                 address,
22                 ", ",
23                 city,
24                 "</small>",
25                 "</div>"];
26             return (aMarkup.join(""));
27         };
28
29         // Instantiate one XHR DataSource and define schema as an array:
30         //     ["Record Delimiter",
31         //     "Field Delimiter"]
32         this.oACDS = new YAHOO.widget.DS_XHR("/cgi-bin/koha/circ/ysearch.pl", ["\n", "\t"]);
33         this.oACDS.responseType = YAHOO.widget.DS_XHR.TYPE_FLAT;
34         this.oACDS.maxCacheEntries = 60;
35         this.oACDS.queryMatchSubset = true;
36     
37         // Instantiate first AutoComplete
38         var myInput = document.getElementById('findborrower');
39         var myContainer = document.getElementById('yborrowercontainer');
40         this.oAutoComp = new YAHOO.widget.AutoComplete(myInput,myContainer,this.oACDS);
41         //this.oAutoComp.delimChar = ";";
42         //this.oAutoComp.queryDelay = 1;
43         this.oAutoComp.formatResult = this.fnCustomFormatter;
44 }
45 });    
46 //]]>
47 </script><!-- /TMPL_IF -->
48
49 <div id="header_search">
50
51 <div id="circ_search" class="residentsearch">
52     <p class="tip">Enter patron card number or partial name:</p>
53     <form action="/cgi-bin/koha/circ/circulation.pl" method="post">
54     <!-- TMPL_IF NAME="CircAutocompl" -->
55     <div class="autocomplete">
56             <div id="borrowerautocomplete" class="autocomplete">
57                 <input autocomplete="off" id="findborrower" name="findborrower" type="text" />
58                 <div id="yborrowercontainer"></div>
59                 <input id="ysearchsubmit" type="submit" value="Submit" />
60                 <input name="branch" value="<!-- TMPL_VAR name="branch" -->" type="hidden" />
61                 <input name="printer" value="" type="hidden" />
62             </div>
63         </div>
64         <!-- TMPL_ELSE -->
65             <input id="findborrower" name="findborrower" size="40" type="text" />
66             <input name="branch" value="<!-- TMPL_VAR name="branch" -->" type="hidden" />
67             <input name="printer" value="" type="hidden" />
68             <input value="Submit" type="submit" />
69         <!-- /TMPL_IF -->
70     </form>
71 </div>  
72
73 <div id="checkin_search" class="residentsearch">
74     <p class="tip">Scan a barcode to check in:</p>
75     <form method="post" action="/cgi-bin/koha/circ/returns.pl">
76         <input name="barcode" id="ret_barcode" size="40" maxlength="14" />
77         <input value="Submit" type="submit" />
78     </form>
79 </div>
80
81 <div id="catalog_search" class="residentsearch">
82     <p class="tip">Enter search keywords:</p>
83     <form action="/cgi-bin/koha/catalogue/search.pl"  method="get" id="cat-search-block">
84         <input type="text" name="q" id="search-form" size="40" />
85         <input type="submit" class="form-submit" value="Submit"/>
86     </form>
87 </div>
88
89 <ul>
90     <li><a href="/cgi-bin/koha/circ/circulation.pl#circ_search">Check Out</a></li>
91     <li><a href="/cgi-bin/koha/circ/returns.pl#checkin_search" class="tabs-selected">Check In</a></li>
92     <li><a href="/cgi-bin/koha/catalogue/search.pl#catalog_search">Search the Catalog</a></li>
93 </ul>   
94
95 </div>
96
97 <!-- End Circulation Resident Search Box -->