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