TPac: more template scrubbing and cleaning
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / searchbar.tt2
1 [% PROCESS "opac/parts/org_selector.tt2" %]
2 <div id="search-box">    
3     [% UNLESS took_care_of_form -%]
4     <form action="[% ctx.opac_root %]/results" method="GET">
5     [%- END %]
6     <table cellpadding="0" cellspacing="10" border="0">
7         <tr>
8             <td colspan="3">
9                 <span class="search_catalog_lbl">[% l('Search the Catalog') %]</span>
10                 <a href="[% ctx.opac_root %]/advanced"
11                     id="home_adv_search_link"><span
12                     class="adv_search_font">[% l('Advanced Search') %]</span></a>
13             </td>
14         </tr>
15         <tr>
16             [% IF is_advanced || is_special %]
17             <td colspan="2">
18                 <input type="hidden" name="_adv" value="1" />
19             [% ELSE %]
20             <td>
21             [% INCLUDE "opac/parts/qtype_selector.tt2" %]
22             </td>
23             [% END %]
24             [% IF ctx.processed_search_query OR (NOT is_advanced AND NOT is_special) %]
25             <td>
26                 <div id="search_box_wrapper">
27                     <!-- Note: when common browsers support HTML5 placeholder text, we can remove the JS -->
28                     <input type="text" id="search_box" name="query" value="[% is_advanced ? ctx.processed_search_query : CGI.param('query') || l("Search Keyword") | html %]"
29                         [% IF is_advanced %]style="width: 450px"[% END %]
30                         onfocus="if (this.value=='[% l("Search Keyword") %]'){this.value='';this.style.color='#000';}"
31                         onblur="if (this.value==''){this.value='[% l("Search Keyword") %]';this.style.color='#999';}"
32                         x-webkit-speech />
33                 </div>
34                 <input name='page' type='hidden' value="0" />
35             </td>
36             <td valign="top">
37                 <div class="pos-abs">
38                     <div class="opac-auto-143">
39                         <input id='search-submit-go' type="image" alt="[% l('Search') %]" src="[% ctx.media_prefix %]/images/go-btn.png"
40                             onmouseover="this.src='[% ctx.media_prefix %]/images/go-btn-hover.png';"
41                             onmouseout="this.src='[% ctx.media_prefix %]/images/go-btn.png';" 
42                             onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
43                         <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden' alt=''/>
44                     </div>
45                 </div>
46             </td>
47             [% END %]
48         </tr>
49         [% UNLESS is_advanced OR is_special %]
50         <tr>
51             <td>
52                 [% INCLUDE "opac/parts/coded_value_selector.tt2" attr=["mattype", "item_type"] none_ok=1 none_label=l('All Formats') %]
53             </td>
54             <td>
55                 <span>
56                     [% PROCESS build_org_selector name='loc' value=CGI.param('loc') %]
57                 </span>
58             </td>
59         </tr>
60         [% END %]
61     </table>
62     [% UNLESS took_care_of_form %]</form>[% END %]
63     [% IF (is_advanced AND NOT is_special) AND CGI.param('qtype') %]
64     <div class="opac-auto-102">
65         [ <a href="[% mkurl(ctx.opac_root _ '/advanced') %]">[%
66             l('Click to Refine Your Original Search')
67         %]</a> ]
68     </div>
69     [% END %]
70     <div id="breadcrumb">
71         <a href="[% ctx.opac_root %]/home">[% l('Catalog Home') %]</a> &gt;
72     </div>
73     <div class="clear-both"></div>
74 </div>