Compare View

switch
from
...
to
 
Commits (2)
src/noosfero-spb/software_communities/features/software_catalog.feature
... ... @@ -28,6 +28,10 @@ Feature: Search software
28 28 Then I should see "Software One"
29 29 Then I should see "Software Two"
30 30  
  31 + Scenario: Show all "public_software" softwares when open search page
  32 + Given I go to /search/software_infos
  33 + Then the "all_radio_button" checkbox should be checked
  34 +
31 35 Scenario: Show all "public_software" softwares when search software
32 36 Given I go to /search/software_infos
33 37 And I fill in "search-input" with "Software"
... ...
src/noosfero-spb/software_communities/lib/ext/search_controller.rb
... ... @@ -151,7 +151,7 @@ class SearchController
151 151 @selected_categories_id = params[:selected_categories_id]
152 152 @selected_categories_id ||= []
153 153 @selected_categories_id = @selected_categories_id.map(&:to_i)
154   - @all_selected = params[:software_type] == "all"
  154 + @all_selected = params[:software_type] == "all" || params[:software_type].blank?
155 155 @public_software_selected = !@all_selected
156 156 @per_page = prepare_per_page
157 157 end
... ...
src/noosfero-spb/software_communities/views/search/_software_search_form.html.erb
... ... @@ -12,13 +12,13 @@
12 12 <%= hidden_field_tag :filter, params[:filter] %>
13 13  
14 14 <div class="radio-buttons">
15   - <%= labelled_radio_button _('Public Software'), :software_type, 'public_software', @public_software_selected, :id => "public_software_radio_button", :class => "project-software" %>
16   - <span class="doubts-catalog-software" title="<%= _('Softwares in accordance with the technical and legal requirements of IN 01/2011.') %>">?</span>
17   - <!-- Projetos que passaram pelo processo do Avalia SPB de acordo com os requisitos da IN 01/2011. -->
18   -
19 15 <%= labelled_radio_button _('All'), :software_type, 'all', @all_selected, :id => "all_radio_button", :class => "project-software" %>
20 16 <span class="doubts-catalog-software" title="<%= _('Public softwares and softwares that meet the requirements of Art. 14 of IN 01/2011, government software.') %>">?</span>
21 17 <!-- Projetos incluídos no portal, conforme casos previstos na IN 01/2011. -->
  18 +
  19 + <%= labelled_radio_button _('Public Software'), :software_type, 'public_software', @public_software_selected, :id => "public_software_radio_button", :class => "project-software" %>
  20 + <span class="doubts-catalog-software" title="<%= _('Softwares in accordance with the technical and legal requirements of IN 01/2011.') %>">?</span>
  21 + <!-- Projetos que passaram pelo processo do Avalia SPB de acordo com os requisitos da IN 01/2011. -->
22 22 </div>
23 23  
24 24 <div class="search-field">
... ...