Trying again on some changes that wouldn't patch earlier
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / bookfund-admin-search.inc
1
2 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl"><!-- TMPL_VAR NAME="LibraryName" --></a></h1><!-- Begin Fund Admin Resident Search Box -->
3 <!-- TMPL_IF NAME="CAN_user_circulate" --><!-- TMPL_IF NAME="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>  <!-- /TMPL_IF --><!-- /TMPL_IF -->
47 <div id="header_search">
48         <div id="bookfund_search" class="residentsearch">
49         <p class="tip">Search Funds:</p>
50
51         <form action="/cgi-bin/koha/admin/aqbookfund.pl" method="post">
52       <label for="filter_bookfundid">Code: </label><select name="filter_bookfundid" id="filter_bookfundid">
53         <option value="">----</option>
54     <!-- TMPL_LOOP name="filter_bookfundids" -->
55       <!-- TMPL_IF NAME="selected" -->
56         <option value="<!-- TMPL_VAR name="bookfundid" -->" selected="selected"><!-- TMPL_VAR name="bookfundid" --></option>
57       <!-- TMPL_ELSE -->
58         <option value="<!-- TMPL_VAR name="bookfundid" -->"><!-- TMPL_VAR name="bookfundid" --></option>
59       <!-- /TMPL_IF -->
60     <!-- /TMPL_LOOP -->
61       </select>
62       <label for="filter_bookfundname">Name: </label><input type="text" name="filter_bookfundname" id="filter_bookfundname" size="10" value="<!-- TMPL_VAR name="filter_bookfundname" -->" />
63       <label for="filter_branchcode">Library: </label><select name="filter_branchcode" id="filter_branchcode">
64         <option value="">----</option>
65     <!-- TMPL_LOOP name="filter_branches" -->
66       <!-- TMPL_IF NAME="selected" -->
67         <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="name" --></option>
68       <!-- TMPL_ELSE -->
69         <option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
70       <!-- /TMPL_IF -->
71     <!-- /TMPL_LOOP -->
72       </select>
73       <input type="submit" name="filter" value="Submit" />
74 </form>
75
76         </div>
77         <!-- TMPL_IF NAME="CAN_user_circulate" -->
78         <div id="circ_search" class="residentsearch">
79         <p class="tip">Enter patron card number or partial name:</p>
80     <form action="/cgi-bin/koha/circ/circulation.pl" method="post">
81     <!-- TMPL_IF NAME="CircAutocompl" -->
82     <div class="autocomplete">
83             <div id="borrowerautocomplete" class="autocomplete">
84                 <input autocomplete="off" id="findborrower" name="findborrower" class="focus" type="text" />
85                 <div id="yborrowercontainer"></div>
86                 <input id="ysearchsubmit" type="submit" value="Submit" />
87                 <input name="branch" value="<!-- TMPL_VAR name="branch" -->" type="hidden" />
88                 <input name="printer" value="" type="hidden" />
89             </div>
90         </div>
91         <!-- TMPL_ELSE -->
92             <input id="findborrower" name="findborrower" size="40" class="focus" type="text" />
93             <input name="branch" value="<!-- TMPL_VAR name="branch" -->" type="hidden" />
94             <input name="printer" value="" type="hidden" />
95             <input value="Submit" type="submit" />
96         <!-- /TMPL_IF -->
97     </form>
98         </div>  
99         <!-- /TMPL_IF -->
100         
101         <!-- TMPL_IF NAME="CAN_user_catalogue" -->
102         <div id="catalog_search" class="residentsearch">
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" value="Submit"  class="form-submit" />
107                 </form>
108         </div><!-- /TMPL_IF -->
109                         <ul>
110                         <li><a href="/cgi-bin/koha/admin/aqbookfund.pl#bookfund_search">Search Funds</a></li>
111                         <!-- TMPL_IF NAME="CAN_user_circulate" --><li><a href="/cgi-bin/koha/circ/circulation.pl#circ_search">Check Out</a></li><!-- /TMPL_IF -->
112                         <!-- TMPL_IF NAME="CAN_user_catalogue" --><li><a href="/cgi-bin/koha/catalogue/search.pl#catalog_search">Search the Catalog</a></li><!-- /TMPL_IF -->
113                         </ul>   
114 </div>
115 <!-- End Suggestions Resident Search Box -->