_software_search_form.html.erb
3.04 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<div>
<div class='search-form'>
<h3> <%= _("Search Software Catalog") %> </h3>
<%= form_tag( { :controller => 'search', :action => @asset ? @asset : 'index', :asset => nil, :category_path => ( @category ? @category.path : nil ) },
:method => 'get') do %>
<div style="margin:0;padding:0;display:inline">
<input name="utf8" type="hidden" value="✓" /></div>
<%= hidden_field_tag :display, params[:display] %>
<%= hidden_field_tag :filter, params[:filter] %>
<div class="radio-buttons">
<%= labelled_radio_button _('All'), :software_type, 'all', @all_selected, :id => "all_radio_button", :class => "project-software" %>
<span class="doubts-catalog-software" title="<%= _('Public softwares and softwares that meet the requirements of Art. 14 of IN 01/2011, government software.') %>">?</span>
<!-- Projetos incluídos no portal, conforme casos previstos na IN 01/2011. -->
<%= labelled_radio_button _('Public Software'), :software_type, 'public_software', @public_software_selected, :id => "public_software_radio_button", :class => "project-software" %>
<span class="doubts-catalog-software" title="<%= _('Softwares in accordance with the technical and legal requirements of IN 01/2011.') %>">?</span>
<!-- Projetos que passaram pelo processo do Avalia SPB de acordo com os requisitos da IN 01/2011. -->
</div>
<div class="search-field">
<span class="formfield">
<%= text_field_tag 'query', @query, :id => 'search-input', :size => 50, :placeholder=>_("Type words about the software you're looking for (the search begins after 3 characters)") %>
</span>
<%= submit_button(:search, _('Filter')) %>
</div>
<%= render :partial => 'search_form_extra_fields' %>
<%= render :partial => 'catalog_filter' %>
<div id="catalog-display-options">
<div id="catalog-display-options-count">
<strong id="software-count"><%= "#{@software_count} Software(s)" %></strong>
</div>
<div id="catalog-display-options-show-and-sort">
<div id="catalog-display-options-show">
<%= _('Show:') %>
<%= select_tag("software_display",
options_for_select(['15', '30', '90', 'All'], :selected=>params[:software_display])
) %>
</div>
<div id="catalog-display-options-sort">
<%= _('Sort by:') %>
<%= select_tag("sort",
options_for_select(
[
[_("Name A-Z"), 'asc'],
[_("Name Z-A"), 'desc'],
[_("Relevance"), 'relevance'],
[_("Rating"), 'rating']
], :selected=>params[:sort])
) %>
</div>
</div>
</div>
<% end %>
</div>
</div>
<% if @empty_query %>
<% hint = environment.search_hints[@asset] %>
<% if hint and !hint.blank? %>
<div class="search-hint"><%= hint %></div>
<% end %>
<% end %>
<%= hidden_field_tag :only_softwares_hidden, params[:only_softwares] %>