1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Advanced MARC Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
3 <!-- TMPL_INCLUDE NAME="menus.inc" -->
4 <!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
5 <h1>Catalog Search</h1>
6 <form name="f" method="post" action="search.pl">
7 <input type="hidden" name="op" value="do_search" />
8 <input type="hidden" name="type" value="intranet" />
9 <input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
12 <caption>Quick Search</caption>
14 <th><label for="keyword_main">Any word</label></th>
15 <td><input type="hidden" name="marclist" value="" />
16 <input type="hidden" name="and_or" value="and" />
17 <input type="hidden" name="excluding" value="" />
18 <input type="hidden" name="operator" value="contains" />
19 <input type="text" id="keyword_main" name="value" onchange="sql_update()" size="35" accesskey="w" /></td>
22 <th><label for="title">Title</label></th>
23 <td><input type="hidden" name="marclist" value="biblio.title" />
24 <input type="hidden" name="and_or" value="and" />
25 <input type="hidden" name="excluding" value="" />
26 <input type="hidden" name="operator" value="contains" />
27 <input type="text" id="title" name="value" onchange="sql_update()" size="35" accesskey="t" /> <a href="javascript:Dopop('dictionary.pl?marclist=biblio.title&type=intranet&index=1',1)">
32 <th><label for="author"><span class="accesskey" title="Access Key a">Author</label></th>
33 <td><input type="hidden" name="marclist" value="biblio.author" />
34 <input type="hidden" name="and_or" value="and" />
35 <input type="hidden" name="excluding" value="" />
36 <input type="hidden" name="operator" value="contains" />
37 <input type="text" id="author" name="value" onchange="sql_update()" size="35" accesskey="a" /> <a href="javascript:Dopop('dictionary.pl?marclist=biblio.author&type=intranet&index=2',2)">
42 <th><label for="subject">Subject</label></th>
43 <td><input type="hidden" name="marclist" value="bibliosubject.subject" />
44 <input type="hidden" name="and_or" value="and" />
45 <input type="hidden" name="excluding" value="" />
46 <input type="hidden" name="operator" value="contains" />
47 <input type="text" id="subject" name="value" onchange="sql_update()" size="35" accesskey="s" /> <a href="javascript:Dopop('dictionary.pl?marclist=bibliosubject.subject&type=intranet&index=3',3)">
51 <tr><th><label for="seriestitle">Series title</label></th><td>
52 <input type="hidden" name="marclist" value="biblio.seriestitle" />
53 <input type="hidden" name="and_or" value="and" />
54 <input type="hidden" name="excluding" value="" />
55 <input type="hidden" name="operator" value="contains" />
56 <input type="text" id="seriestitle" name="value" size="35"/></td></tr>
58 <th><label for="itemtype">Item Type</label></th>
59 <td><input type="hidden" name="marclist" value="biblioitems.itemtype" />
60 <input type="hidden" name="and_or" value="and" />
61 <input type="hidden" name="excluding" value="" />
62 <input type="hidden" name="operator" value="=" />
63 <!-- TMPL_VAR name="CGIitemtype" --></td>
66 <th><label for="branch">Branch</label></th>
67 <td><input type="hidden" name="marclist" value="items.homebranch" />
68 <input type="hidden" name="and_or" value="and" />
69 <input type="hidden" name="excluding" value="" />
70 <input type="hidden" name="operator" value="=" />
71 <!-- TMPL_VAR name="CGIbranch" --></td>
74 <th><label for="barcode">Item barcode</label></th>
75 <td><input type="hidden" name="marclist" value="items.barcode" />
76 <input type="hidden" name="and_or" value="and" />
77 <input type="hidden" name="excluding" value="" />
78 <input type="hidden" name="operator" value="start" />
79 <input type="text" id="barcode" name="value" onchange="sql_update()" size="14" maxlength="14" accesskey="b" /></td>
82 <th><label for="callno">Call Number</label></th>
83 <td><input type="hidden" name="marclist" value="items.itemcallnumber" />
84 <input type="hidden" name="and_or" value="and" />
85 <input type="hidden" name="excluding" value="" />
86 <input type="hidden" name="operator" value="start" />
87 <input type="text" id="callno" name="value" onchange="sql_update()" size="35" accesskey="c" /></td>
90 <th><label for="isbn">ISBN</label></th>
91 <td><input type="hidden" name="marclist" value="biblioitems.isbn" />
92 <input type="hidden" name="and_or" value="and" />
93 <input type="hidden" name="excluding" value="" />
94 <input type="hidden" name="operator" value="=" />
95 <input type="text" id="isbn" name="value" onchange="sql_update()" size="35" accesskey="n" /></td>
98 <th><label for="publisher">Publisher</label></th>
99 <td><input type="hidden" name="marclist" value="biblioitems.publishercode" />
100 <input type="hidden" name="and_or" value="and" />
101 <input type="hidden" name="excluding" value="" />
102 <input type="hidden" name="operator" value="contains" />
103 <input type="text" id="publisher" name="value" onchange="sql_update()" size="35" accesskey="p" /></td>
108 <caption>Add MARC Fields to Your Search</caption>
109 <!-- TMPL_LOOP NAME="statements" -->
111 <td><select name="and_or" size="1" onchange="sql_update()">
112 <option value="and">and</option>
113 <option <!-- TMPL_IF NAME="or" -->selected <!-- /TMPL_IF -->value="or">or</option>
115 <!-- TMPL_VAR NAME="marclist" -->
116 <select name="excluding" size="1" onchange="sql_update()">
117 <option value="0"> </option>
118 <option <!-- TMPL_IF NAME="not" -->selected <!-- /TMPL_IF -->value="1">not</option>
120 <select name="operator" size="1" onchange="sql_update()">
121 <option <!-- TMPL_IF NAME="contains" -->selected<!-- /TMPL_IF --> value="contains">Contains</option>
122 <option <!-- TMPL_IF NAME="eq" -->selected<!-- /TMPL_IF --> value="=">Is equal to</option>
123 <option <!-- TMPL_IF NAME="start" -->selected<!-- /TMPL_IF --> value="start">Starts with</option>
124 <option <!-- TMPL_IF NAME="gt" -->selected<!-- /TMPL_IF --> value=">">Is greater than</option>
125 <option <!-- TMPL_IF NAME="ge" -->selected<!-- /TMPL_IF --> value=">=">Is greater or equal to</option>
126 <option <!-- TMPL_IF NAME="lt" -->selected<!-- /TMPL_IF --> value="<">Is lower than</option>
127 <option <!-- TMPL_IF NAME="le" -->selected<!-- /TMPL_IF --> value="<=">Is lower or equal to</option>
129 <input type="text" name="value" onchange="sql_update();" <!-- TMPL_IF NAME="value" -->value="<!-- TMPL_VAR NAME="value" -->"<!-- /TMPL_IF -->></td>
133 <td><input type="button" value="Add criteria" onclick="AddStatement(); return false;">
134 Warning : the "contains" statement does NOT work if you enter 2 or less letters</td>
138 <textarea name="sql" rows="3" cols="55" disabled readonly></textarea>
142 <td>Results per page :<select align="right" name="resultsperpage" size="1">
143 <option value="20">20</option>
144 <option value="50">50</option>
145 <option value="100">100</option>
148 <select name="orderby" size="1">
149 <option value="biblio.title">Title</option>
150 <option value="biblio.author">Author</option>
151 <option value="biblioitems.dewey">Dewey</option>
152 <option value="biblioitems.publicationyear">Publication Year</option>
153 <option value="biblioitems.publishercode">Publisher</option>
155 <select name="desc_or_asc" size="1">
156 <option value="ASC">Ascending</option>
157 <option value="DESC">Descending</option>
162 <input type="submit" value="Start search" />
163 <input type="button" value="Suggest Search Term" onclick="PopupSuggestion(); return false;" />
168 <script language="javascript" type="text/javascript">
169 function sql_update() {
170 document.f.sql.value="";
171 for (i=0 ; i<document.f.marclist.length ; i++) {
172 if (document.f.value[i].value.length>0) {
173 document.f.sql.value = document.f.sql.value+
174 document.f.and_or[i].value + ' (' +
175 document.f.excluding[i].value + ' ' +
176 document.f.marclist[i].value + ' ' +
177 document.f.operator[i].value + ' ' +
178 '\''+document.f.value[i].value + '\') ';
183 function AddStatement() {
185 document.forms[0].op.value="AddStatement";
189 function Dopop(link,i) {
190 var searchstring=document.forms[4].value[i].value;
191 newin=window.open(link+'&search='+searchstring,"popup",'width=700,height=550,toolbar=false,scrollbars=yes');
194 function PopupSuggestion() {
196 for (i=0 ; i<document.f.marclist.length ; i++) {
197 if (document.f.value[i].value.length>0) {
198 strQuery += " "+document.f.value[i].value;
201 newin=window.open("suggest.pl?Q="+strQuery,"Suggestions",'width=500,height=400,toolbar=false,scrollbars=yes');
206 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->