Koha/koha-tmpl/intranet-tmpl/default/en/search.marc/search.tmpl
tipaul b38997925f big commit, still breaking things...
* synch with rel_2_2. Probably the last non manual synch, as rel_2_2 should not be modified deeply.
* code cleaning (cleaning warnings from perl -w) continued
2005-10-26 09:11:02 +00:00

222 lines
9 KiB
Cheetah

<!-- TMPL_IF NAME="opac" -->
<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
<!-- TMPL_ELSE -->
<!-- TMPL_INCLUDE NAME="cat-top.inc" -->
<!-- /TMPL_IF -->
<div id="mainbloc">
<h1 class="catalogue">Catalogue search</h1>
<form name="f" method="post" action="/cgi-bin/koha/search.marc/search.pl">
<input type="hidden" name="op" value="do_search">
<input type="hidden" name="type" value="intranet">
<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->">
<div class="bloc25">
<h2 class="catalogue">Search on</h2>
<p>
<input type="hidden" name="op" value="do_search">
<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->">
<label for="keyword">Any word</label>
<input type="hidden" name="marclist" value="">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
<input type="hidden" name="operator" value="contains">
<input type="text" name="value" id="keyword" onchange="sql_update()" size="35">
</p>
<p>
<label for="title">Title</label>
<input type="hidden" name="marclist" value="biblio.title">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
<input type="hidden" name="operator" value="contains">
<input type="text" name="value" id="title" onchange="sql_update()" size="35">
<!-- TMPL_UNLESS Name="Disable_Dictionary" -->
<a href="javascript:Dopop('dictionary.pl?marclist=biblio.title&amp;type=intranet&amp;index=1',1)" class="button catalogue">
...
</a>
<!-- /TMPL_UNLESS -->
</p>
<p>
<label for="author">Author</label> <input type="hidden" name="marclist" value="biblio.author">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
<input type="hidden" name="operator" value="contains">
<input type="text" name="value" id="author" onchange="sql_update()" size="35">
<!-- TMPL_UNLESS Name="Disable_Dictionary" -->
<a href="javascript:Dopop('dictionary.pl?marclist=biblio.author&amp;type=intranet&amp;index=2',2)" class="button catalogue">
...
</a>
<!-- /TMPL_UNLESS -->
</p>
<p>
<label for="subject">Subject</label>
<input type="hidden" name="marclist" value="bibliosubject.subject">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
<input type="hidden" name="operator" value="contains">
<input type="text" name="value" id="subject" onchange="sql_update()" size="35">
<!-- TMPL_UNLESS Name="Disable_Dictionary" -->
<a href="javascript:Dopop('dictionary.pl?marclist=bibliosubject.subject&amp;type=intranet&amp;index=3',3)" class="button catalogue">
...
</a>
<!-- /TMPL_UNLESS -->
</p>
<p>
<label for="itemtype">Item Type</label>
<input type="hidden" name="marclist" value="biblioitems.itemtype">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
<input type="hidden" name="operator" value="=">
<!-- TMPL_VAR name="CGIitemtype" -->
</p>
<p>
<label for="branch">Branch</label>
<input type="hidden" name="marclist" value="items.holdingbranch">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
<input type="hidden" name="operator" value="=">
<select name="branch">
<option value="">Default</option>
<!-- TMPL_LOOP name="branchloop" -->
<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="branchname" --></option>
<!-- /TMPL_LOOP -->
</select>
</p>
</div>
<div class="bloc25">
<h2 class="catalogue">Other options</h2>
<p>
<label for="barcode">Item barcode</label>
<input type="hidden" name="marclist" value="items.barcode">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
<input type="hidden" name="operator" value="contains">
<input type="text" name="value" id="barcode" onchange="sql_update()">
</p>
<p>
<label for="callno">Call Number</label>
<input type="hidden" name="marclist" value="items.itemcallnumber">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
<input type="hidden" name="operator" value="start">
<input type="text" name="value" id="callno" onchange="sql_update()">
</p>
<p>
<label for="isbn">ISBN</label>
<input type="hidden" name="marclist" value="biblioitems.isbn">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
<input type="hidden" name="operator" value="=">
<input type="text" name="value" id="isbn" onchange="sql_update()">
</p>
<p>
<label for="publisher">Publisher</label>
<input type="hidden" name="marclist" value="biblioitems.publishercode">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
<input type="hidden" name="operator" value="contains">
<input type="text" name="value" id="publisher" onchange="sql_update()">
</p>
</div>
<div id="bloc100">
<h2 class="catalogue">More fields</h2>
<!-- TMPL_LOOP NAME="statements" -->
<p>
<select name="and_or" size="1" onchange="sql_update()">
<option value="and">and</option>
<option <!-- TMPL_IF NAME="or" -->selected <!-- /TMPL_IF -->value="or">or</option>
</select>
<!-- TMPL_VAR NAME="marclist" -->
<select name="excluding" size="1" onchange="sql_update()">
<option value="0"> </option>
<option <!-- TMPL_IF NAME="not" -->selected <!-- /TMPL_IF -->value="1">not</option>
</select>
<select name="operator" size="1" onchange="sql_update()">
<option <!-- TMPL_IF NAME="contains" -->selected<!-- /TMPL_IF --> value="contains">Contains</option>
<option <!-- TMPL_IF NAME="eq" -->selected<!-- /TMPL_IF --> value="=">Is equal to</option>
<option <!-- TMPL_IF NAME="start" -->selected<!-- /TMPL_IF --> value="start">Starts with</option>
<option <!-- TMPL_IF NAME="gt" -->selected<!-- /TMPL_IF --> value=">">Is greater than</option>
<option <!-- TMPL_IF NAME="ge" -->selected<!-- /TMPL_IF --> value=">=">Is greater or equal to</option>
<option <!-- TMPL_IF NAME="lt" -->selected<!-- /TMPL_IF --> value="<">Is lower than</option>
<option <!-- TMPL_IF NAME="le" -->selected<!-- /TMPL_IF --> value="<=">Is lower or equal to</option>
</select>
<input type="text" name="value" onChange="sql_update()" <!-- TMPL_IF NAME="value" -->value="<!-- TMPL_VAR NAME="value" -->"<!-- /TMPL_IF -->>
</p>
<!-- /TMPL_LOOP -->
<p>
<input type="button" value="Add criteria" onClick="AddStatement()" class="button catalogue">
Warning : the "contains" statement does NOT work if you enter 2 or less letters</p>
</div>
<div class="bloc25">
<p><textarea name="sql" rows="3" cols="70" disabled readonly></textarea></p>
<p>Results per page :
<select name="resultsperpage" size="1">
<option value="20">20</option>
<option value="50">50</option>
<option value="100">100</option>
</select>
Ordered by
<select name="orderby" size="1">
<option value="biblio.title">Title</option>
<option value="biblio.author">Author</option>
<option value="biblioitems.dewey">Dewey</option>
<option value="biblioitems.publicationyear">Publication Year</option>
<option value="biblioitems.publishercode">Publisher</option>
</select>
<select name="desc_or_asc" size="1">
<option value="ASC">Ascending</option>
<option value="DESC">Descending</option>
</select>
</p>
<p>
<input type="submit" value="Start search" class="button catalogue">
<a href="/cgi-bin/koha/search.marc/suggest.pl" onclick="PopupSuggestion(); return false;" class="button catalogue">Spelling suggestion</a>
</p>
</div>
</form>
<script language="javascript" type="text/javascript">
function sql_update() {
document.f.sql.value="";
for (i=0 ; i<document.f.marclist.length ; i++) {
if (document.f.value[i].value.length>0) {
document.f.sql.value = document.f.sql.value+
document.f.and_or[i].value + ' (' +
document.f.excluding[i].value + ' ' +
document.f.marclist[i].value + ' ' +
document.f.operator[i].value + ' ' +
'\''+document.f.value[i].value + '\') ';
}
}
}
function AddStatement() {
document.forms['f'].op.value="AddStatement";
document.f.submit();
}
function Dopop(link,i) {
var searchstring=document.forms['f'].value[i].value;
newin=window.open(link+'&amp;search='+searchstring,"popup",'width=700,height=550,toolbar=false,scrollbars=yes');
}
function PopupSuggestion() {
var strQuery="";
for (i=0 ; i<document.f.marclist.length ; i++) {
if (document.f.value[i].value.length>0) {
strQuery += " "+document.f.value[i].value;
}
}
newin=window.open("suggest.pl?Q="+strQuery,"Suggestions",'width=500,height=400,toolbar=false,scrollbars=yes');
}
</script>
</div>
<!-- TMPL_IF NAME="opac" -->
<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
<!-- TMPL_ELSE -->
<!-- TMPL_INCLUDE NAME="cat-bottom.inc" -->
<!-- /TMPL_IF -->