Commit 5cbcb27d4f407da2dd9f3b0578690d3644daa957
1 parent
2c5c5c82
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 | 14 | <p><%= _("Categories:") %></p> |
| 15 | 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 | 19 | <% end %> |
| 22 | 20 | </ul> |
| 23 | 21 | </div> | ... | ... |