Commit 28a22dbcbf16512c48277b15b9f4527e10d9aae8

Authored by Arthur Sturzbecher
Committed by Álvaro Fernando Matos de Souza
1 parent fd89c27d

Removing general bad smells in catalog html pages

removed class search-form from input
removed class formfield from span
removed useless divs
restructured filter options to ul li tags

Signed-off-by: ArthurJahn <stutrzbecher@gmail.com>
Signed-off-by: Alvaro Fernando <alvarofernandoms@gmail.com>
views/search/_catalog_filter.html.erb
@@ -9,22 +9,20 @@ @@ -9,22 +9,20 @@
9 9
10 <div id="filter-categories-catalog"><h4> <%= _("Categories") %> </h4></div> 10 <div id="filter-categories-catalog"><h4> <%= _("Categories") %> </h4></div>
11 <div id="group-categories"> 11 <div id="group-categories">
12 - <div id="group-catalog-01"> 12 + <ul>
13 <% @categories_groupe_one.each do |category| %> 13 <% @categories_groupe_one.each do |category| %>
14 - <label> 14 + <li>
15 <%= check_box_tag("selected_categories_id[]", category.id, @selected_categories_id.include?(category.id), :class => "categories-catalog", @enabled_check_box[category] => "true") %> 15 <%= check_box_tag("selected_categories_id[]", category.id, @selected_categories_id.include?(category.id), :class => "categories-catalog", @enabled_check_box[category] => "true") %>
16 <span><%= _("#{category.name}") %></span> 16 <span><%= _("#{category.name}") %></span>
17 - </label> <br> 17 + </li>
18 <% end %> 18 <% end %>
19 - </div>  
20 - <div id="group-catalog-02">  
21 <% @categories_groupe_two.each do |category| %> 19 <% @categories_groupe_two.each do |category| %>
22 - <label> 20 + <li>
23 <%= check_box_tag("selected_categories_id[]", category.id, @selected_categories_id.include?(category.id), :class => "categories-catalog", @enabled_check_box[category] => "true") %> 21 <%= check_box_tag("selected_categories_id[]", category.id, @selected_categories_id.include?(category.id), :class => "categories-catalog", @enabled_check_box[category] => "true") %>
24 <%= _("#{category.name}") %> 22 <%= _("#{category.name}") %>
25 - </label> <br> 23 + </li>
26 <% end %> 24 <% end %>
27 - </div> 25 + </ul>
28 </div> 26 </div>
29 27
30 <div class="project-software"> <%= _("Software Projects:") %> 28 <div class="project-software"> <%= _("Software Projects:") %>
@@ -34,9 +32,6 @@ @@ -34,9 +32,6 @@
34 </label> 32 </label>
35 <span class="doubts-catalog-software" title="<%= _('Include software development projects that are not yet officially Brazilian Public Software.') %>">?</span> 33 <span class="doubts-catalog-software" title="<%= _('Include software development projects that are not yet officially Brazilian Public Software.') %>">?</span>
36 </div> 34 </div>
37 -  
38 - <br />  
39 -  
40 <%= button_tag _("Clean up"), :id => "cleanup-filter-catalg", :type => "button" %> 35 <%= button_tag _("Clean up"), :id => "cleanup-filter-catalg", :type => "button" %>
41 <%= button_tag _("Close"), :id => "close-filter-catalog", :type => "button" %> 36 <%= button_tag _("Close"), :id => "close-filter-catalog", :type => "button" %>
42 </div> 37 </div>
views/search/_software_search_form.html.erb
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <h3> <%= _("Search Public Software Catalog") %> </h3> 3 <h3> <%= _("Search Public Software Catalog") %> </h3>
4 4
5 <%= form_tag( { :controller => 'search', :action => @asset ? @asset : 'index', :asset => nil, :category_path => ( @category ? @category.path : nil ) }, 5 <%= form_tag( { :controller => 'search', :action => @asset ? @asset : 'index', :asset => nil, :category_path => ( @category ? @category.path : nil ) },
6 - :method => 'get', :class => 'search_form' ) do %> 6 + :method => 'get') do %>
7 7
8 <div style="margin:0;padding:0;display:inline"> 8 <div style="margin:0;padding:0;display:inline">
9 <input name="utf8" type="hidden" value="&#x2713;" /> 9 <input name="utf8" type="hidden" value="&#x2713;" />
views/search/software_infos.html.erb
@@ -5,8 +5,6 @@ @@ -5,8 +5,6 @@
5 5
6 <%= render :partial => 'software_search_form', :locals => { :hint => _("Type words about the %s you're looking for") % @asset.to_s.singularize } %> 6 <%= render :partial => 'software_search_form', :locals => { :hint => _("Type words about the %s you're looking for") % @asset.to_s.singularize } %>
7 7
8 - <div style="clear: both"></div>  
9 -  
10 <% if @asset == :product %> 8 <% if @asset == :product %>
11 <%= javascript_tag do %> 9 <%= javascript_tag do %>
12 jQuery('.search-product-price-details').altBeautify(); 10 jQuery('.search-product-price-details').altBeautify();
@@ -20,4 +18,4 @@ @@ -20,4 +18,4 @@
20 <% if params[:display] != 'map' %> 18 <% if params[:display] != 'map' %>
21 <%= pagination_links @searches[@asset][:results] %> 19 <%= pagination_links @searches[@asset][:results] %>
22 <% end %> 20 <% end %>
23 -</div>  
24 \ No newline at end of file 21 \ No newline at end of file
  22 +</div>