Commit eec0d80bc894bd584d442cb14776651787d3d305
1 parent
1912f11a
Exists in
master
and in
5 other branches
Restrict software categories block to show only software categories
Signed-off-by: Arthur Del Esposte <arthurmde@gmail.com> Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Showing
1 changed file
with
2 additions
and
4 deletions
Show diff stats
views/blocks/categories_software.html.erb
@@ -14,10 +14,8 @@ | @@ -14,10 +14,8 @@ | ||
14 | <p><%= _("Categories:") %></p> | 14 | <p><%= _("Categories:") %></p> |
15 | <ul class="categories-mais-software"> | 15 | <ul class="categories-mais-software"> |
16 | 16 | ||
17 | - <% Category.all.each do |category| %> | ||
18 | - <% if category.name != "Software" %> | ||
19 | - <li><%= link_to category.name + " (#{category.software_infos.count})", {:controller => :search, :action => :software_infos, :filter => category.id} %></li> | ||
20 | - <% end %> | 17 | + <% Category.where(:name => "Software").first.children.each do |category| %> |
18 | + <li><%= link_to category.name + " (#{category.software_infos.count})", {:controller => :search, :action => :software_infos, :filter => category.id} %></li> | ||
21 | <% end %> | 19 | <% end %> |
22 | </ul> | 20 | </ul> |
23 | </div> | 21 | </div> |