1 <!-- Begin Suggestions Resident Search Box -->
2 <!-- TMPL_IF NAME="CircAutocompl" --><script type="text/javascript">
3 YAHOO.util.Event.onContentReady("header_search", function() {
5 // Define a custom formatter function
6 this.fnCustomFormatter = function(oResultItem, sQuery) {
7 var name = oResultItem[0];
8 var cardnumber = oResultItem[1];
9 var address = oResultItem[2];
10 var city = oResultItem[3];
11 var zip = oResultItem[4];
13 "<div class=\"sample-result\">",
23 return (aMarkup.join(""));
26 // Instantiate one XHR DataSource and define schema as an array:
27 // ["Record Delimiter",
29 this.oACDS = new YAHOO.widget.DS_XHR("/cgi-bin/koha/circ/ysearch.pl", ["\n", "\t"]);
30 this.oACDS.responseType = YAHOO.widget.DS_XHR.TYPE_FLAT;
31 this.oACDS.maxCacheEntries = 60;
32 this.oACDS.queryMatchSubset = true;
34 // Instantiate first AutoComplete
35 var myInput = document.getElementById('findborrower');
36 var myContainer = document.getElementById('yborrowercontainer');
37 this.oAutoComp = new YAHOO.widget.AutoComplete(myInput,myContainer,this.oACDS);
38 //this.oAutoComp.delimChar = ";";
39 //this.oAutoComp.queryDelay = 1;
40 this.oAutoComp.formatResult = this.fnCustomFormatter;
43 </script><!-- /TMPL_IF -->
44 <div id="header_search">
45 <div id="suggestions_search" class="residentsearch">
46 <p class="tip">Suggestions Search:</p>
47 <form action="/cgi-bin/koha/acqui/newordersuggestion.pl" method="get">
48 <label for="searchtitle">Title:</label> <input type="text" id="searchtitle" name="title" value="<!-- TMPL_VAR NAME="title"-->" />
49 <label for="searchauthor">Author:</label> <input type="text" id="searchauthor" name="author" value="<!-- TMPL_VAR NAME="author" -->" />
50 <label for="searchpublishercode">Publisher:</label> <input type="text" id="searchpublishercode" name="publishercode" value="<!-- TMPL_VAR NAME="publishercode"-->" />
51 <input type="submit" class="button" value="Search Suggestions" />
54 <div id="circ_search" class="residentsearch">
55 <p class="tip">Enter patron card number or partial name:</p>
56 <form action="/cgi-bin/koha/circ/circulation.pl" method="post">
57 <!-- TMPL_IF NAME="CircAutocompl" -->
58 <div class="autocomplete">
59 <div id="borrowerautocomplete" class="autocomplete">
60 <input autocomplete="off" id="findborrower" name="findborrower" class="focus" type="text" />
61 <div id="yborrowercontainer"></div>
62 <input id="ysearchsubmit" type="submit" value="Submit" />
63 <input name="branch" value="<!-- TMPL_VAR name="branch" -->" type="hidden" />
64 <input name="printer" value="" type="hidden" />
68 <input id="findborrower" name="findborrower" size="40" class="focus" type="text" />
69 <input name="branch" value="<!-- TMPL_VAR name="branch" -->" type="hidden" />
70 <input name="printer" value="" type="hidden" />
71 <input value="Submit" type="submit" />
75 <div id="catalog_search" class="residentsearch">
76 <p class="tip">Enter search keywords:</p>
77 <form action="/cgi-bin/koha/catalogue/search.pl" method="get" id="cat-search-block">
78 <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="form-text" />
79 <input type="submit" value="Submit" class="form-submit" />
83 <li><a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=<!-- TMPL_VAR NAME="supplierid" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->#suggestions_search">Search Printers</a></li>
84 <li><a href="/cgi-bin/koha/circ/circulation.pl#circ_search">Check Out</a></li>
85 <li><a href="/cgi-bin/koha/catalogue/search.pl#catalog_search">Search the Catalog</a></li>
88 <!-- End Suggestions Resident Search Box -->