popup.rhtml
1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<div id="search-popup">
<h2><%= _('Search %s') % @environment.name %></h2>
<% form_tag({:action => 'index', :category_path => (@category ? @category.explode_path : [])}, :method => 'get') do%>
<div class="search-field">
<span class="formfield">
<%= text_field_tag 'query', '', :id => 'popup-search-input', :size => 50 %>
<%= javascript_tag '$("popup-search-input").focus()' %>
</span>
<%= submit_button(:search, _('Search')) %>
</div>
<% if @category %>
<h3><%= _('Search in:') %></h3>
<ul>
<li>
<%= radio_button_tag :search_whole_site, 'no', true %>
<span><%= _('Only in %{category}') % { :category => @category.full_name } %></span>
</li>
<li>
<%= radio_button_tag :search_whole_site, 'yes' %>
<span><%= _('Whole site') %></span>
</li>
</ul>
<% end %>
<div class="search-options">
<h3><%= _('Search for:') %></h3>
<ul>
<% @search_in.map { |t,n| [t,gettext(n)] } .
sort_by(&:last).each do |thing, name| %>
<li>
<%= check_box_tag 'find_in[]', thing.to_s, true %>
<span><%= name %></span>
</li>
<% end %>
</ul>
<br style="clear:both" />
</div><!-- fim class="search-options" -->
<% button_bar do %>
<%= submit_button(:search, _('Search')) %>
<%= lightbox_close_button(_('Close')) %>
<% end %>
<% end %>
<script type='text/javascript'>
$('query').focus();
</script>
</div><!-- fim id="search-popup" -->