]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/default/opac/parts/advanced/search.tt2
Merge remote branch 'working/user/shadowspar/ttopac-altcleanup' into template-toolkit...
[Evergreen.git] / Open-ILS / src / templates / default / opac / parts / advanced / search.tt2
1 <form id="adv_search_form" action="[% ctx.opac_root %]/results" method="GET">
2 <table id='adv_global_search' class='data_grid data_grid_center' width='100%'>
3     <tr style='border-bottom: none;'>
4         <!-- Contains the user-addable(?) rows to define search class, containment and text -->
5         <td valign='top' class='adv_global_input_container'>
6             <table width='100%' id='adv_global_input_table'>
7                 <thead>
8                     <tr>
9                         <td>
10                             <div style="width:100%;" class="header_middle">
11                                 [% l("Search Input") %]
12                             </div>
13                         </td>
14                     </tr>
15                 </thead>
16                 <tbody id='adv_global_tbody'>
17                     [% INCLUDE "default/opac/parts/advanced/global_row.tt2" %]
18                     <!-- add a new row -->
19                     <tr id='adv_global_addrow'>
20                         <td align='left' style="padding-top:7px;">
21                             <a href="javascript:;" id="myopac_new_global_row" onclick='addSearchRow();'>[% l('Add Search Row') %]</a>
22                         </td>
23                     </tr>
24                 </tbody>
25             </table>
26         </td>
27     </tr>
28     <tr>
29         <td align='top'>
30           <div style="width:100%;" class="header_middle">[% l('Search Filters') %]</div>
31           <table cellpadding='10' cellspacing='0' border='0'><tr>
32             <td valign='top'>
33                 <strong>[% l("Item Type") %]</strong><br />
34                 [%  INCLUDE "default/opac/parts/coded_value_selector.tt2"
35                         attr=["mattype", "item_type"] multiple="multiple" size="4"
36                         id="adv_global_item_type_basic" %]
37             </td>
38             <td valign='top'>
39                 <strong>[% l("Language") %]</strong><br />
40                 [%  INCLUDE "default/opac/parts/coded_value_selector.tt2"
41                         attr="item_lang" multiple="multiple" size="4" %]
42             </td>
43             <td valign='top'>
44                 <strong>[% l("Audience") %]</strong><br />
45                     [% INCLUDE "default/opac/parts/coded_value_selector.tt2"
46                         attr="audience" id="adv_global_audience_basic" 
47                         multiple="multiple" size="4" %]
48                 </select>
49                     <!--<a id='adv_global_audience_link_adv' class='classic_link adv_adv_link'
50                         href='javascript:void(0);' onclick='
51                         hideMe($("adv_global_audience_basic"));
52                         unHideMe($("adv_global_audience"));
53                         hideMe(this);
54                         unHideMe($("adv_global_audience_link_basic"));
55                         '>[% l("Advanced") %]</a>
56                     <a id='adv_global_audience_link_basic' class='hide_me classic_link adv_adv_link'
57                         href='javascript:void(0);' onclick='
58                         unHideMe($("adv_global_audience_basic"));
59                         hideMe($("adv_global_audience"));
60                         unHideMe($("adv_global_audience_link_adv"));
61                         hideMe(this);'>[% l("Basic") %]</a>-->
62             </td>
63             <td valign='top'>
64             <strong>[% l("Sort Results") %]</strong>
65               <table class='adv_global_filter_sort'>
66                 <tr>
67                     <td align='center' width='100%'>
68                         [% INCLUDE "default/opac/parts/filtersort.tt2"
69                             value=CGI.param('sort') %]
70                     </td>
71                 </tr>
72               </table>
73             </td>
74           </tr></table>
75         </td>
76     </tr>
77     <tr>
78         <td colspan="2">
79             <table cellpadding='10' cellspacing='0' border='0'>
80                 <tbody>
81                     <tr>
82                         <td valign='top'>
83                             <strong>[% l("Search Library") %]</strong><br />
84                             [% PROCESS "default/opac/parts/org_selector.tt2";
85                                 PROCESS build_org_selector name='loc' value=loc %]
86                             <div style="position:relative;top:7px;">
87                                 <input type='checkbox' name="modifier"
88                                 value="available"[% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %]
89                                     id='opac.result.limit2avail' />
90                                 <label style="position:relative;top:-2px;"
91                                     for='opac.result.limit2avail'>
92                                     [% l("Limit to Available") %]</label>
93                             </div>
94                         </td>
95                         <td valign='top'>
96                             <strong>[% l("Publication Year") %]</strong><br />
97                             <select id='adv_global_pub_date_type' name='pubdate' onchange='
98                                 if(this.selectedIndex == 3)
99                                     unHideMe($("adv_global_pub_date_2_span"));
100                                 else
101                                     hideMe($("adv_global_pub_date_2_span"));'>
102                                     [%  FOR opt IN [
103                                             {"code" => "is", "label" => l("Is")},
104                                             {"code" => "before", "label" => l("Before")},
105                                             {"code" => "after", "label" => l("After")},
106                                             {"code" => "between", "label" => l("Between")}
107                                         ];
108                                             |l(opt.code, opt.label) %]
109                                         <option value="[_1]"[% CGI.param('pubdate') == opt.code ? ' selected="selected"' : '' %]>[_2]</option>
110                                     [%  END; END %]
111                             </select>    
112                             <div style='margin-top:5px;'>
113                                 <input id='adv_global_pub_date_1' name='date1' type='text' size='4' maxlength='4' value="[% CGI.param('date1') | html %]" />
114                                 <span id='adv_global_pub_date_2_span' class='[% CGI.param("pubdate") == "between" ? "" : "hide_me" %]'>
115                                    [% l("and") %] <input name='date2' id='adv_global_pub_date_2' type='text' size='4' maxlength='4' value="[% CGI.param('date2') | html %]" />
116                                 </span>
117                             </div>
118                         </td>
119                     </tr>
120                     <!-- copy location selector -->
121                     <tr id='adv_copy_location_filter_row' class='hide_me'>
122                         <td align='right'>[% l("Shelving Location") %]</td>
123                         <td align='left' id='adv_copy_location_filter_td'>
124                             <select size='3' id='adv_copy_location_filter_select' multiple='multiple'>
125                             </select>
126                         </td>
127                     </tr>
128                 </tbody>
129             </table>
130         </td>
131     </tr>
132     <tr class='border_4_2'>
133         <td align="left" colspan='2'>
134             <input type="image" src="[% ctx.media_prefix %]/images/search_btn.gif"
135             alt="[% l('Search') %]" class='pointer' />
136             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
137             <a href="javascript:document.getElementById('adv_search_form').reset();"
138                 id="adv_reset">[% l('Reset Form') %]</a>
139         </td>
140     </tr>
141 </table>
142 <input type="hidden" name="_adv" value="1" />
143 </form>
144 <div id='adv_quick_search_sidebar' class='sidebar_chunk hide_me'> 
145     <div id='adv_quick_search'>
146         <div class='adv_quick_search color_4'><b>[% l("Quick Search") %]</b></div>
147         <div style='margin-top: 8px;'>
148             <table><tbody><tr>
149                 <td>
150                     <select id='adv_quick_type'>
151                         <option value='isbn'>[% l("ISBN") %]</option>
152                         <option value='issn'>[% l("ISSN") %]</option>
153                         <option value='cn'>[% l("Call Number") %]</option>
154                         <option value='lccn'>[% l("LCCN") %]</option>
155                         <option value='tcn'>[% l("TCN") %]</option>
156                         <option value='barcode'>[% l("Item Barcode") %]</option>
157                     </select>
158                 </td><td>
159                     <input type='text' id='adv_quick_text' size='16' />
160                 </td>
161             </tr></tbody></table>
162         </div>
163
164         <div style='margin-top: 8px;' class='adv_quick_search_submit'>
165             <!-- XXX TODO make a real form, and make a real submitter (quick
166             submit, FKA advGenericSearch() -->
167             <img src="[% ctx.media_prefix %]/images/search_btn.gif"
168                 alt="[% l('Search') %]" id="adv_quick_submit" class='pointer' />
169         </div>
170     </div>
171 </div>
172
173
174 <div id='adv_marc_search_sidebar' class='sidebar_chunk hide_me'
175     style='width:400px; margin-top: 20px;'> 
176     <div class='adv_quick_search color_4'><b>[% l("MARC Expert Search") %]</b></div>
177     <table style='margin: 3px; width: 100%;' id='adv_sdbar_table'
178         class='border_4_3'>
179         <tbody>
180             <tr>
181                 <td align="right">[% l("Tag:") %]</td>
182                 <td align="left"><input name='advanced.marc.tag' maxlength='3' size='3' /></td>
183                 <td align="right">[% l("Subfield:") %]</td>
184                 <td align="left"><input name='advanced.marc.subfield' maxlength='1' size='1' /></td>
185             </tr>
186             <tr>
187                 <td align="right">[% l("Value:") %]</td>
188                 <td colspan='3' align="left"><input name='advanced.marc.value' size='18' /></td>
189             </tr>
190             <tr name='crow' class='hide_me'>
191                 <td colspan='4' align='center'>
192                     <a href='javascript:void(0);' class='classic_link'>[% l("close") %]</a>
193                 </td>
194             </tr>
195         </tbody>
196     </table>
197     <div id='adv_marc_submit' class='adv_quick_search_submit'>
198         <a style='margin-right: 4px; position:relative;top:-10px;'
199             class='classic_link' href='javascript:advAddMARC();'>[% l("Add Row") %]</a>
200         <!-- XXX TODO make a real form, and make a real submitter (FKA
201         advMARCRun()) -->
202         <img alt="Search" src="[% ctx.media_prefix %]/images/search_btn.gif" class='pointer' />
203     </div>
204 </div>