Commit a961f7a90842f109dae589cbc0ab81cdd15af11f
1 parent
40a891fb
Exists in
master
and in
5 other branches
Remove depency with 'Software' categorie from categories_software view
Showing
1 changed file
with
6 additions
and
3 deletions
Show diff stats
views/blocks/categories_software.html.erb
@@ -8,9 +8,12 @@ | @@ -8,9 +8,12 @@ | ||
8 | <p><%= _("Categories:") %></p> | 8 | <p><%= _("Categories:") %></p> |
9 | <ul class="categories-mais-software"> | 9 | <ul class="categories-mais-software"> |
10 | 10 | ||
11 | - <% Category.where(:name => "Software").first.children.each do |category| %> | ||
12 | - <% unless category.software_infos.count < 1 %> | ||
13 | - <li><%= link_to _("#{category.name}") + " (#{category.software_infos.count})", {:controller => :search, :action => :software_infos, :selected_categories_id => [category.id]} %></li> | 11 | + <% categories = Category.where(:name => "Software") %> |
12 | + <% unless categories.blank? %> | ||
13 | + <% categories.first.children.each do |category| %> | ||
14 | + <% unless category.software_infos.count < 1 %> | ||
15 | + <li><%= link_to _("#{category.name}") + " (#{category.software_infos.count})", {:controller => :search, :action => :software_infos, :selected_categories_id => [category.id]} %></li> | ||
16 | + <% end %> | ||
14 | <% end %> | 17 | <% end %> |
15 | <% end %> | 18 | <% end %> |
16 | </ul> | 19 | </ul> |