1 <!-- Begin Bookfund Admin 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="bookfund_search" class="residentsearch">
48 <p class="tip">Search Book Funds:</p>
50 <form action="/cgi-bin/koha/admin/aqbookfund.pl" method="post">
51 <label for="filter_bookfundid">Code: </label><select name="filter_bookfundid" id="filter_bookfundid">
52 <option value="">----</option>
53 <!-- TMPL_LOOP name="filter_bookfundids" -->
54 <!-- TMPL_IF NAME="selected" -->
55 <option value="<!-- TMPL_VAR name="bookfundid" -->" selected="selected"><!-- TMPL_VAR name="bookfundid" --></option>
57 <option value="<!-- TMPL_VAR name="bookfundid" -->"><!-- TMPL_VAR name="bookfundid" --></option>
61 <label for="filter_bookfundname">Name: </label><input type="text" name="filter_bookfundname" id="filter_bookfundname" size="10" value="<!-- TMPL_VAR name="filter_bookfundname" -->" />
62 <label for="filter_branchcode">Library: </label><select name="filter_branchcode" id="filter_branchcode">
63 <option value="">----</option>
64 <!-- TMPL_LOOP name="filter_branches" -->
65 <!-- TMPL_IF NAME="selected" -->
66 <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="name" --></option>
68 <option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
72 <input type="submit" name="filter" value="Submit" />
76 <div id="circ_search" class="residentsearch">
77 <p class="tip">Enter patron card number or partial name:</p>
78 <form action="/cgi-bin/koha/circ/circulation.pl" method="post">
79 <!-- TMPL_IF NAME="CircAutocompl" -->
80 <div class="autocomplete">
81 <div id="borrowerautocomplete" class="autocomplete">
82 <input autocomplete="off" id="findborrower" name="findborrower" class="focus" type="text" />
83 <div id="yborrowercontainer"></div>
84 <input id="ysearchsubmit" type="submit" value="Submit" />
85 <input name="branch" value="<!-- TMPL_VAR name="branch" -->" type="hidden" />
86 <input name="printer" value="" type="hidden" />
90 <input id="findborrower" name="findborrower" size="40" class="focus" type="text" />
91 <input name="branch" value="<!-- TMPL_VAR name="branch" -->" type="hidden" />
92 <input name="printer" value="" type="hidden" />
93 <input value="Submit" type="submit" />
97 <div id="catalog_search" class="residentsearch">
98 <p class="tip">Enter search keywords:</p>
99 <form action="/cgi-bin/koha/catalogue/search.pl" method="get" id="cat-search-block">
100 <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="form-text" />
101 <input type="submit" value="Submit" class="form-submit" />
105 <li><a href="/cgi-bin/koha/admin/aqbookfund.pl#bookfund_search">Search Book Funds</a></li>
106 <li><a href="/cgi-bin/koha/circ/circulation.pl#circ_search">Check Out</a></li>
107 <li><a href="/cgi-bin/koha/catalogue/search.pl#catalog_search">Search the Catalog</a></li>
110 <!-- End Suggestions Resident Search Box -->