]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/kpac/parts/searchbox.tt2
1d6e39e6ff87a6790ac16cbacc9a17b2db8e9d8d
[working/Evergreen.git] / Open-ILS / src / templates / kpac / parts / searchbox.tt2
1 <div class="sub_sidebar_header">[% l('New Search') %]</div>
2 <form action="[% ctx.kpac_root _ '/results' %]">
3     <div class="sub_sidebar_search_wrapper">
4         <input type="text" name='query' value="[% CGI.param('query') | html %]"
5             [% seed = l(' Enter Text... ') | html %]
6             class="sub_sidebar_search_box" style="color:#aaa;" value="[% seed %]"
7             onfocus="if(this.value=='[% seed %]'){this.value='';this.style.color='#424242';}" 
8             onblur="if(this.value==''){this.value='[% seed %]'; this.style.color='#aaa';}" />
9     </div>
10     <table cellpadding="0" cellspacing="0" border="0" class="sub_sidebar_search_st">
11         <tr>
12             [%  
13             types = [
14                 {keyword => l('Word')}, 
15                 {title => l('Title')}, 
16                 {author => l('Author')}
17             ];
18             FOR qtype_blob IN types;
19                 qtype = qtype_blob.keys.0 %]
20                 <td class="st_radio_btn">
21                     <input type="radio" name="qtype" value="[% qtype %]" id="st_[% qtype %]"
22                         [% IF (CGI.param('qtype') == qtype) OR 
23                             (!CGI.param('qtype') AND qtype == 'keyword') %]checked="checked"[% END %]/>
24                 </td>
25                 <td class="st_label"><label for="st_[% qtype %]">[% qtype_blob.$qtype | html %]</label></td>
26                 [% IF !loop.last %]
27                 <td class="st_radio_spacer"><div>&nbsp;</div></td>
28                 [% END %]
29             [% END %]
30         </tr>
31     </table>
32     <div class="hr">&nbsp;</div>
33     <div class="sub_search_category">
34         <!-- XXX TODO: QP Groups / saved searches -->
35         <select class="search_category" name="search_category">
36             <option>Children's Material</option>
37         </select>
38     </div>
39     <div class="hr">&nbsp;</div>
40     <div>
41         <input type="image" alt="search" src="[% ctx.media_prefix %]/images/kpac/search_btn_sub.png" />
42     </div>
43 </form>
44