Changing barcode search type to 'start' instead of '=' (barcode search fails otherwise)
[koha.git] / koha-tmpl / opac-tmpl / npl / en / opac-search.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_VAR NAME="LibraryName" --> Catalog -- Advanced Search
2 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
3 <!--TMPL_INCLUDE NAME="masthead_adv.inc" -->
4 <!--TMPL_INCLUDE NAME="navigation.inc" -->
5
6 <!-- CONTENT -->
7 <div id="main">
8 <h1>Search the Catalog</h1>
9
10 <form name="f" method="post" action="/cgi-bin/koha/opac-search.pl">
11 <div class="form">
12 <table>
13 <tr><th><label for="keyword">Keyword</label></th><td><input type="hidden" name="op" value="do_search" />
14                         <input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
15                 <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" name="value" /></td></tr>
20 <tr><th><label for="title">Title</label></th><td><input type="hidden" name="marclist" value="biblio.title" />
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" id="title" name="value" /></td></tr>
25 <tr><th><label for="author">Author</label></th><td><input type="hidden" name="marclist" value="biblio.author" />
26                         <input type="hidden" name="and_or" value="and" />
27                         <input type="hidden" name="excluding" value="" />
28                         <input type="hidden" name="operator" value="contains" />
29                         <input type="text" id="author" name="value" /></td></tr>
30 <tr><th><label for="subject">Subject</label></th><td>                   
31                         <input type="hidden" name="marclist" value="bibliosubject.subject" />
32                         <input type="hidden" name="and_or" value="and" />
33                         <input type="hidden" name="excluding" value="" />
34                         <input type="hidden" name="operator" value="contains" />  
35                         <input type="text" id="subject" name="value" size="35" /></td></tr>
36 <tr><th><label for="seriestitle">Series title</label></th><td>                  
37                         <input type="hidden" name="marclist" value="biblio.seriestitle" />
38                         <input type="hidden" name="and_or" value="and" />
39                         <input type="hidden" name="excluding" value="" />
40                         <input type="hidden" name="operator" value="contains" />
41                         <input type="text" id="seriestitle" name="value" size="35"/></td></tr>
42
43 <tr><th><label for="itemtype">Format</label></th><td><input type="hidden" name="marclist" value="biblioitems.itemtype" />
44                         <input type="hidden" name="and_or" value="and" />
45                         <input type="hidden" name="excluding" value="" />
46                         <input type="hidden" name="operator" value="=" />
47                         <!-- TMPL_VAR name="CGIitemtype" --></td></tr>
48 <tr><th><label for="branch">Location</label></th><td><input type="hidden" name="marclist" value="items.holdingbranch" />
49                                 <input type="hidden" name="and_or" value="and" />
50                                 <input type="hidden" name="excluding" value="" />
51                                 <input type="hidden" name="operator" value="=" />  
52                                 <!-- TMPL_VAR name="CGIbranch" --></td></tr>
53 </table>
54 <input type="submit" value="Search" class="submit" />
55 <table>
56 <caption>Other options:</caption>
57 <tr><th><label for="barcode">Barcode</label></th><td>
58                                 <input type="hidden" name="marclist" value="items.barcode" />
59                                 <input type="hidden" name="and_or" value="and" />
60                                 <input type="hidden" name="excluding" value="" />
61                                 <input type="hidden" name="operator" value="start" />
62                                 <input type="text" id="barcode" name="value" size="14" maxlength="14" /></td></tr>
63 <tr><th><label for="dewey">Call Number</label></th><td><input type="hidden" name="marclist" value="biblioitems.dewey" />
64                         <input type="hidden" name="and_or" value="and" />
65                         <input type="hidden" name="excluding" value="" />
66                         <input type="hidden" name="operator" value="start" />
67                         <input type="text" id="dewey" name="value" /></td></tr>
68 <tr><th><label for="isbn">ISBN</label></th><td><input type="hidden" name="marclist" value="biblioitems.isbn" />
69                         <input type="hidden" name="and_or" value="and" />
70                         <input type="hidden" name="excluding" value="" />
71                         <input type="hidden" name="operator" value="start" />
72                         <input type="text" id="isbn" name="value" /></td></tr>
73 <tr><th><label for="publisher">Publisher</label></th><td><input type="hidden" name="marclist" value="biblioitems.publishercode" />
74                         <input type="hidden" name="and_or" value="and" />
75                         <input type="hidden" name="excluding" value="" />
76                         <input type="hidden" name="operator" value="contains" />
77                         <input type="text" id="publisher" name="value" /></td></tr>
78 <tr><th><label for="pubbetween">Published between</label></th><td><input type="hidden" name="marclist" value="biblioitems.publicationyear" />
79                         <input type="hidden" name="and_or" value="and" />
80                         <input type="hidden" name="excluding" value="" />
81                         <input type="hidden" name="operator" value=">=" />
82                         <input type="text" id="pubbetween" name="value" size="6" maxlength="4" /></td></tr>
83 <tr><th><label for="puband">...and</label></th><td><input type="hidden" name="marclist" value="biblioitems.publicationyear" />
84                         <input type="hidden" name="and_or" value="and" />
85                         <input type="hidden" name="excluding" value="" />
86                         <input type="hidden" name="operator" value="<=" />
87                         <input type="text" id="puband" name="value" size="6" maxlength="4" /></td></tr>
88 </table>
89                 <p>Results per page :
90                         <select name="resultsperpage" size="1">
91                                 <option value="20">20</option>
92                                 <option value="50">50</option>
93                                 <option value="100">100</option>
94                         </select>
95                 Ordered by
96                         <select name="orderby" size="1">
97                                 <option value="biblio.title">Title</option>
98                                 <option value="biblio.author">Author</option>
99                                 <option value="biblioitems.dewey">Dewey</option>
100                                 <option value="biblioitems.publicationyear">Publication Year</option>
101                                 <option value="biblioitems.publishercode">Publisher</option>
102                         </select>
103                 </p>
104                 <p>     <input type="submit" value="Search" class="submit" /></p>
105         </div>
106 </form>
107
108 <script type="text/javascript">
109 function sql_update() {
110 document.f.sql.value="";
111         for (i=0 ; i<document.f.marclist.length ; i++) {
112                 if (document.f.value[i].value.length>0) {
113                         document.f.sql.value = document.f.sql.value+
114                                                                                 document.f.and_or[i].value + ' (' +
115                                                                                 document.f.excluding[i].value + ' ' +
116                                                                                 document.f.marclist[i].value + ' ' +
117                                                                                 document.f.operator[i].value + ' ' +
118                                                                                 '\''+document.f.value[i].value + '\') ';
119                 }
120         }
121 }
122
123 function AddStatement() {
124
125         document.forms[0].op.value="AddStatement";
126         document.f.submit();
127 }
128
129 function PopupSuggestion() {
130     var strQuery="";
131         for (i=0 ; i<document.f.marclist.length ; i++) {
132                 if (document.f.value[i].value.length>0) {
133                     strQuery += " "+document.f.value[i].value;
134                 }
135         }
136         newin=window.open("suggest.pl?Q="+strQuery,"Suggestions",'width=500,height=400,toolbar=false,scrollbars=yes');
137 }
138
139 </script>
140
141
142 </div>
143 </body>
144 </html>