7e300edd3ad446b39d9b44ab3df5bfcf828d8669
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / advanced / search.tt2
1 <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 "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 "opac/parts/coded_value_selector.tt2"
35                         attr=["mattype", "item_type"] multiple="multiple" size="4" %]
36             </td>
37             <td valign='top'>
38                 <strong>[% l("Language") %]</strong><br />
39                 [%  INCLUDE "opac/parts/coded_value_selector.tt2"
40                         attr="item_lang" multiple="multiple" size="4" %]
41             </td>
42             <td valign='top'>
43                 <strong>[% l("Audience") %]</strong><br />
44                     [% INCLUDE "opac/parts/coded_value_selector.tt2"
45                         attr=["audience_group", "audience"] multiple="multiple" size="4" %]
46                 </select>
47             </td>
48             <td valign='top'>
49             <strong>[% l("Sort Results") %]</strong>
50               <table class='adv_global_filter_sort'>
51                 <tr>
52                     <td align='center' width='100%'>
53                         [% INCLUDE "opac/parts/filtersort.tt2"
54                             value=CGI.param('sort') %]
55                     </td>
56                 </tr>
57               </table>
58             </td>
59           </tr></table>
60         </td>
61     </tr>
62     <tr>
63         <td colspan="2">
64             <table cellpadding='10' cellspacing='0' border='0'>
65                 <tbody>
66                     <tr>
67                         <td valign='top'>
68                             <strong>[% l("Search Library") %]</strong><br />
69                             [% PROCESS "opac/parts/org_selector.tt2";
70                                 PROCESS build_org_selector name='loc' value=loc %]
71                             <div style="position:relative;top:7px;">
72                                 <input type='checkbox' name="modifier"
73                                     value="available"[% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %]
74                                     id='opac.result.limit2avail' />
75                                 <label style="position:relative;top:-2px;"
76                                     for='opac.result.limit2avail'>
77                                     [% l("Limit to Available") %]</label>
78                             </div>
79                         </td>
80                         <td valign='top'>
81                             <strong>[% l("Publication Year") %]</strong><br />
82                             <select name='pubdate' onchange='
83                                 if(this.selectedIndex == 3)
84                                     unHideMe($("adv_global_pub_date_2_span"));
85                                 else
86                                     hideMe($("adv_global_pub_date_2_span"));'>
87                                     [%  FOR opt IN [
88                                             {"code" => "is", "label" => l("Is")},
89                                             {"code" => "before", "label" => l("Before")},
90                                             {"code" => "after", "label" => l("After")},
91                                             {"code" => "between", "label" => l("Between")}
92                                         ];
93                                             |l(opt.code, opt.label) %]
94                                         <option value="[_1]"[% CGI.param('pubdate') == opt.code ? ' selected="selected"' : '' %]>[_2]</option>
95                                     [%  END; END %]
96                             </select>    
97                             <div style='margin-top:5px;'>
98                                 <input name='date1' type='text' size='4' maxlength='4' value="[% CGI.param('date1') | html %]" />
99                                 <span id='adv_global_pub_date_2_span' class='[% CGI.param("pubdate") == "between" ? "" : "hide_me" %]'>
100                                    [% l("and") %] <input name='date2' type='text' size='4' maxlength='4' value="[% CGI.param('date2') | html %]" />
101                                 </span>
102                             </div>
103                         </td>
104                     </tr>
105                     <!-- TODO: Copy Location Filter -->
106                     <tr class='hide_me'>
107                         <td align='right'>[% l("Shelving Location") %]</td>
108                         <td align='left'>
109                             <select size='3' multiple='multiple'>
110                                 [%# TODO: add filter options... %]
111                             </select>
112                         </td>
113                     </tr>
114                 </tbody>
115             </table>
116         </td>
117     </tr>
118     <tr class='border_4_2'>
119         <td align="left" colspan='2'>
120             <input type="image" src="[% ctx.media_prefix %]/images/search_btn.gif"
121             alt="[% l('Search') %]" class='pointer' />
122             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
123             <a href="[% mkurl('', {}, 1) %]">[% l('Reset Form') %]</a>
124         </td>
125     </tr>
126 </table>
127 <input type="hidden" name="_adv" value="1" />
128 </form>