1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Simple Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
3 <!-- TMPL_INCLUDE NAME="menus.inc" -->
4 <!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
6 <h1>Catalogue Search</h1>
7 <table align ="center" >
10 <input id="searchType1" type="button" value="Zoom Search" onclick="changeSearch1()" <!-- TMPL_IF name="zoom_search" -->style="background-color:orange"<!-- TMPL_ELSE -->style="background-color:yellow"<!-- /TMPL_IF -->>
13 <input id="searchType2" type="button" value="SQL search" onclick="changeSearch2()" <!-- TMPL_IF name="sql_search" -->style="background-color:orange"<!-- TMPL_ELSE -->style="background-color:yellow"<!-- /TMPL_IF --> background-color="orange">
17 <form name="zoom_form" id="zoom_form" action="/cgi-bin/koha/catalogue/catalogue-search.pl" method='post' <!-- TMPL_IF name="zoom_search" -->style="display:inline;"<!-- TMPL_ELSE -->style="display:none;"<!-- /TMPL_IF -->>
18 <input type="hidden" name="op" value="do_search">
19 <input type="hidden" name="search_type" value="zoom">
20 <input type="hidden" name="startfrom" value="0">
21 <input type="hidden" name="zoom" value="1">
22 <table style="border:0" align="center">
24 <tr><td><b>Format to display</b></td><td>MARC<input type="radio" name="MARC" value="1" checked=1>Brief<input type="radio" name="MARC" value="0"></td><td><b>Display per page:</b><input type text name="number_of_results" value="10" size="3"/></td></tr>
26 <tr> <td>Search on:</td><td><select size="1" name="kohafield" style="width:170px">
27 <!-- TMPL_LOOP name="kohafields" -->
28 <option value="<!-- TMPL_VAR name="marctokoha" -->" <!-- TMPL_IF name="sel" -->selected<!-- /TMPL_IF --> ><!-- TMPL_VAR name="liblibrarian" --></option>
29 <!-- /TMPL_LOOP --></select></td><td><input type="text" size="25" name="value" value="<!-- TMPL_VAR name="value" -->" ></td>
30 <td>With</td><td><Select type="text" name="relation">
31 <option value=" " <!-- TMPL_IF name="blank" -->selected<!-- /TMPL_IF --> >
33 <option value="@attr 5=1 " <!-- TMPL_IF name="@attr 5=1 " -->selected<!-- /TMPL_IF --> >* wildcard anywhere
35 <option value="@attr 5=100 " <!-- TMPL_IF name="@attr 5=100 " -->selected<!-- /TMPL_IF --> >No truncation
37 <option value="@attr 5=102 " <!-- TMPL_IF name="@attr 5=102 " -->selected<!-- /TMPL_IF --> >Mistakes allowed
39 <option value="@attr 5=1 @attr 6=3 " <!-- TMPL_IF name="@attr 5=1 @attr 6=3 " -->selected<!-- /TMPL_IF --> >Starts with
41 <option value="@attr 2=1 " <!-- TMPL_IF name="@attr 2=1 " -->selected<!-- /TMPL_IF --> >Less than
43 <option value="@attr 2=2 " <!-- TMPL_IF name="@attr 2=2 " -->selected<!-- /TMPL_IF --> >Less than & equal
45 <option value="@attr 2=5 " <!-- TMPL_IF name="@attr 2=5 " -->selected<!-- /TMPL_IF --> >Greater than
47 <option value="@attr 2=4 " <!-- TMPL_IF name="@attr 2=4 " -->selected<!-- /TMPL_IF --> >Greater than & equal
51 <Select type="text" name="and_or">
52 <option value="@and" <!-- TMPL_IF name="and" -->selected<!-- /TMPL_IF --> >AND
54 <option value="@or" <!-- TMPL_IF name="or" -->selected<!-- /TMPL_IF --> >OR
56 <option value="@not" <!-- TMPL_IF name="not" -->selected<!-- /TMPL_IF --> >NOT
59 <tr> <td>Search on:</td><td><select size="1" name="kohafield" style="width:170px">
60 <option value="">All</option>
61 <!-- TMPL_LOOP name="kohafields" -->
62 <option value="<!-- TMPL_VAR name="marctokoha" -->" <!-- TMPL_IF name="sel" -->selected<!-- /TMPL_IF --> ><!-- TMPL_VAR name="liblibrarian" --></option>
63 <!-- /TMPL_LOOP --></select></td><td><input type="text" size="25" name="value" value="<!-- TMPL_VAR name="value" -->" ></td>
64 <td>With</td><td><Select type="text" name="relation">
65 <option value=" " <!-- TMPL_IF name="blank" -->selected<!-- /TMPL_IF --> >
67 <option value="@attr 5=1 " <!-- TMPL_IF name="@attr 5=1 " -->selected<!-- /TMPL_IF --> >* wildcard anywhere
69 <option value="@attr 5=100 " <!-- TMPL_IF name="@attr 5=100 " -->selected<!-- /TMPL_IF --> >No truncation
71 <option value="@attr 5=102 " <!-- TMPL_IF name="@attr 5=102 " -->selected<!-- /TMPL_IF --> >Mistakes allowed
73 <option value="@attr 5=1 @attr 6=3 " <!-- TMPL_IF name="@attr 5=1 @attr 6=3 " -->selected<!-- /TMPL_IF --> >Starts with
75 <option value="@attr 2=1 " <!-- TMPL_IF name="@attr 2=1 " -->selected<!-- /TMPL_IF --> >Less than
77 <option value="@attr 2=2 " <!-- TMPL_IF name="@attr 2=2 " -->selected<!-- /TMPL_IF --> >Less than & equal
79 <option value="@attr 2=5 " <!-- TMPL_IF name="@attr 2=5 " -->selected<!-- /TMPL_IF --> >Greater than
81 <option value="@attr 2=4 " <!-- TMPL_IF name="@attr 2=4 " -->selected<!-- /TMPL_IF --> >Greater than & equal
85 <td colspan=2><b>Sort on:</b><select size="1" name="order" style="width:170px">
86 <option value="">System Ranked</option>
87 <!-- TMPL_LOOP name="sorts" -->
88 <option value="<!-- TMPL_VAR name="marctokoha" -->" <!-- TMPL_IF name="sel" -->selected<!-- /TMPL_IF --> ><!-- TMPL_VAR name="liblibrarian" --></option>
89 <!-- /TMPL_LOOP --></select>
90 <select size="1" name="asc" style="width:100px">
91 <option value="1">Ascending</option>
92 <option value="2">Descending</option>
94 </tr><tr><td colspan=2><input class = "button" type="submit" value="Start search"></td></tr>
97 <form onSubmit="return checkSQLSearch()" name="precise_form" id="sql_form" action="/cgi-bin/koha/catalogue/catalogue-search.pl" method='post' <!-- TMPL_IF name="sql_search" -->style="display:inline;"<!-- TMPL_ELSE -->style="display:none;"<!-- /TMPL_IF -->>
99 <input type="hidden" name = "op" value="do_search">
100 <input type="hidden" name = "search_type" value="sql">
101 <input type="hidden" name="zoom" value="0">
102 <table style="border:0" align="center">
104 <td><b>Format to display</b></td><td>MARC<input type="radio" name="MARC" value="1" checked=1>Brief<input type="radio" name="MARC" value="0"></td>
107 <td colspan="1"><input type="text" size="15" name="barcode" value="<!-- TMPL_VAR name="barcode" -->" onchange="if(this.value != '') {this.form.itemnumber.value = ''; this.form.biblionumber.value = ''}"></td>
109 <td colspan="1"><input type="text" size="15" name="itemnumber" value="<!-- TMPL_VAR name="itemnumber" -->" onchange="if(this.value != '') {this.form.biblionumber.value = ''; this.form.barcode.value = ''} "></td>
111 <td>Biblio Number</td>
112 <td colspan="1"><input type="text" size="15" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" onchange="if(this.value != '') {this.form.barcode.value = ''; this.form.itemnumber.value = ''} "></td>
116 <td colspan = "4" align = "center">
118 <input class = "button" type="submit" value="Start search">
125 <script language="JavaScript" type="text/javascript">
126 function hideSearchsTypes() {
127 document.getElementById('zoom_form').style.display = 'none';
128 document.getElementById('sql_form').style.display = 'none';
132 function resetButtonsColors() {
133 document.getElementById('searchType1').style.backgroundColor = 'yellow';
134 document.getElementById('searchType2').style.backgroundColor = 'yellow';
139 function changeSearch1() {
140 resetButtonsColors();
141 document.getElementById('searchType1').style.backgroundColor = 'orange';
143 document.getElementById('zoom_form').style.display = 'inline';
146 function changeSearch2() {
147 resetButtonsColors();
148 document.getElementById('searchType2').style.backgroundColor = 'orange';
150 document.getElementById('sql_form').style.display = 'inline';
152 function checkSQLSearch() {
153 if ( (document.sql_form.barcode.value == '') &&
154 (document.sql_form.itemnumber.value == '') && (document.sql_form.biblionumber.value == '') ) {
155 alert("Enter a barcode or itemnumber or biblionumber to start searching.");
162 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->