1 <!-- TMPL_IF NAME="opac" -->
2 <!-- TMPL_INCLUDE NAME="opac-top.inc" -->
4 <!-- TMPL_INCLUDE NAME="cat-top.inc" -->
8 <h1 class="catalogue">Catalogue search</h1>
10 <form name="f" method="post" action="/cgi-bin/koha/search.marc/search.pl">
11 <input type="hidden" name="op" value="do_search">
12 <input type="hidden" name="type" value="intranet">
13 <input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->">
15 <h2 class="catalogue">Search on</h2>
17 <input type="hidden" name="op" value="do_search">
18 <input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->">
19 <label for="keyword">Any word</label>
20 <input type="hidden" name="marclist" value="">
21 <input type="hidden" name="and_or" value="and">
22 <input type="hidden" name="excluding" value="">
23 <input type="hidden" name="operator" value="contains">
24 <input type="text" name="value" id="keyword" onchange="sql_update()" size="35">
27 <label for="title">Title</label>
28 <input type="hidden" name="marclist" value="biblio.title">
29 <input type="hidden" name="and_or" value="and">
30 <input type="hidden" name="excluding" value="">
31 <input type="hidden" name="operator" value="contains">
32 <input type="text" name="value" id="title" onchange="sql_update()" size="35">
33 <!-- TMPL_UNLESS Name="Disable_Dictionary" -->
34 <a href="javascript:Dopop('dictionary.pl?marclist=biblio.title&type=intranet&index=1',1)" class="button catalogue">
40 <label for="author">Author</label> <input type="hidden" name="marclist" value="biblio.author">
41 <input type="hidden" name="and_or" value="and">
42 <input type="hidden" name="excluding" value="">
43 <input type="hidden" name="operator" value="contains">
44 <input type="text" name="value" id="author" onchange="sql_update()" size="35">
45 <!-- TMPL_UNLESS Name="Disable_Dictionary" -->
46 <a href="javascript:Dopop('dictionary.pl?marclist=biblio.author&type=intranet&index=2',2)" class="button catalogue">
52 <label for="subject">Subject</label>
53 <input type="hidden" name="marclist" value="bibliosubject.subject">
54 <input type="hidden" name="and_or" value="and">
55 <input type="hidden" name="excluding" value="">
56 <input type="hidden" name="operator" value="contains">
57 <input type="text" name="value" id="subject" onchange="sql_update()" size="35">
58 <!-- TMPL_UNLESS Name="Disable_Dictionary" -->
59 <a href="javascript:Dopop('dictionary.pl?marclist=bibliosubject.subject&type=intranet&index=3',3)" class="button catalogue">
65 <label for="itemtype">Item Type</label>
66 <input type="hidden" name="marclist" value="biblioitems.itemtype">
67 <input type="hidden" name="and_or" value="and">
68 <input type="hidden" name="excluding" value="">
69 <input type="hidden" name="operator" value="=">
70 <!-- TMPL_VAR name="CGIitemtype" -->
73 <label for="branch">Branch</label>
74 <input type="hidden" name="marclist" value="items.holdingbranch">
75 <input type="hidden" name="and_or" value="and">
76 <input type="hidden" name="excluding" value="">
77 <input type="hidden" name="operator" value="=">
78 <select name="branch">
79 <option value="">Default</option>
80 <!-- TMPL_LOOP name="branchloop" -->
81 <option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="branchname" --></option>
87 <h2 class="catalogue">Other options</h2>
89 <label for="barcode">Item barcode</label>
90 <input type="hidden" name="marclist" value="items.barcode">
91 <input type="hidden" name="and_or" value="and">
92 <input type="hidden" name="excluding" value="">
93 <input type="hidden" name="operator" value="contains">
94 <input type="text" name="value" id="barcode" onchange="sql_update()">
97 <label for="callno">Call Number</label>
98 <input type="hidden" name="marclist" value="items.itemcallnumber">
99 <input type="hidden" name="and_or" value="and">
100 <input type="hidden" name="excluding" value="">
101 <input type="hidden" name="operator" value="start">
102 <input type="text" name="value" id="callno" onchange="sql_update()">
105 <label for="isbn">ISBN</label>
106 <input type="hidden" name="marclist" value="biblioitems.isbn">
107 <input type="hidden" name="and_or" value="and">
108 <input type="hidden" name="excluding" value="">
109 <input type="hidden" name="operator" value="=">
110 <input type="text" name="value" id="isbn" onchange="sql_update()">
113 <label for="publisher">Publisher</label>
114 <input type="hidden" name="marclist" value="biblioitems.publishercode">
115 <input type="hidden" name="and_or" value="and">
116 <input type="hidden" name="excluding" value="">
117 <input type="hidden" name="operator" value="contains">
118 <input type="text" name="value" id="publisher" onchange="sql_update()">
122 <h2 class="catalogue">More fields</h2>
123 <!-- TMPL_LOOP NAME="statements" -->
125 <select name="and_or" size="1" onchange="sql_update()">
126 <option value="and">and</option>
127 <option <!-- TMPL_IF NAME="or" -->selected <!-- /TMPL_IF -->value="or">or</option>
129 <!-- TMPL_VAR NAME="marclist" -->
130 <select name="excluding" size="1" onchange="sql_update()">
131 <option value="0"> </option>
132 <option <!-- TMPL_IF NAME="not" -->selected <!-- /TMPL_IF -->value="1">not</option>
134 <select name="operator" size="1" onchange="sql_update()">
135 <option <!-- TMPL_IF NAME="contains" -->selected<!-- /TMPL_IF --> value="contains">Contains</option>
136 <option <!-- TMPL_IF NAME="eq" -->selected<!-- /TMPL_IF --> value="=">Is equal to</option>
137 <option <!-- TMPL_IF NAME="start" -->selected<!-- /TMPL_IF --> value="start">Starts with</option>
138 <option <!-- TMPL_IF NAME="gt" -->selected<!-- /TMPL_IF --> value=">">Is greater than</option>
139 <option <!-- TMPL_IF NAME="ge" -->selected<!-- /TMPL_IF --> value=">=">Is greater or equal to</option>
140 <option <!-- TMPL_IF NAME="lt" -->selected<!-- /TMPL_IF --> value="<">Is lower than</option>
141 <option <!-- TMPL_IF NAME="le" -->selected<!-- /TMPL_IF --> value="<=">Is lower or equal to</option>
143 <input type="text" name="value" onChange="sql_update()" <!-- TMPL_IF NAME="value" -->value="<!-- TMPL_VAR NAME="value" -->"<!-- /TMPL_IF -->>
147 <input type="button" value="Add criteria" onClick="AddStatement()" class="button catalogue">
148 Warning : the "contains" statement does NOT work if you enter 2 or less letters</p>
151 <p><textarea name="sql" rows="3" cols="70" disabled readonly></textarea></p>
152 <p>Results per page :
153 <select name="resultsperpage" size="1">
154 <option value="20">20</option>
155 <option value="50">50</option>
156 <option value="100">100</option>
159 <select name="orderby" size="1">
160 <option value="biblio.title">Title</option>
161 <option value="biblio.author">Author</option>
162 <option value="biblioitems.dewey">Dewey</option>
163 <option value="biblioitems.publicationyear">Publication Year</option>
164 <option value="biblioitems.publishercode">Publisher</option>
166 <select name="desc_or_asc" size="1">
167 <option value="ASC">Ascending</option>
168 <option value="DESC">Descending</option>
172 <input type="submit" value="Start search" class="button catalogue">
173 <a href="/cgi-bin/koha/search.marc/suggest.pl" onclick="PopupSuggestion(); return false;" class="button catalogue">Spelling suggestion</a>
178 <script language="javascript" type="text/javascript">
179 function sql_update() {
180 document.f.sql.value="";
181 for (i=0 ; i<document.f.marclist.length ; i++) {
182 if (document.f.value[i].value.length>0) {
183 document.f.sql.value = document.f.sql.value+
184 document.f.and_or[i].value + ' (' +
185 document.f.excluding[i].value + ' ' +
186 document.f.marclist[i].value + ' ' +
187 document.f.operator[i].value + ' ' +
188 '\''+document.f.value[i].value + '\') ';
193 function AddStatement() {
195 document.forms['f'].op.value="AddStatement";
199 function Dopop(link,i) {
200 var searchstring=document.forms['f'].value[i].value;
201 newin=window.open(link+'&search='+searchstring,"popup",'width=700,height=550,toolbar=false,scrollbars=yes');
205 function PopupSuggestion() {
207 for (i=0 ; i<document.f.marclist.length ; i++) {
208 if (document.f.value[i].value.length>0) {
209 strQuery += " "+document.f.value[i].value;
212 newin=window.open("suggest.pl?Q="+strQuery,"Suggestions",'width=500,height=400,toolbar=false,scrollbars=yes');
217 <!-- TMPL_IF NAME="opac" -->
218 <!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
220 <!-- TMPL_INCLUDE NAME="cat-bottom.inc" -->