Commit eaa766f9102e78ef0ceb10efd5e94243fe4962d6
1 parent
59ae1c56
Exists in
master
and in
5 other branches
Show categories and tags only if they exists in software
Showing
1 changed file
with
16 additions
and
11 deletions
Show diff stats
views/blocks/categories_and_tags.html.erb
1 | -<h3 class="block-title"><span><%= _("Categories") %></span></h3> | 1 | +<% if block.owner.categories.count > 0 %> |
2 | + <h3 class="block-title"><span><%= _("Categories") %></span></h3> | ||
2 | 3 | ||
3 | -<div class="category_cloud"> | ||
4 | -<% block.owner.categories.each do |category| %> | ||
5 | - <%= link_to category.name , category.path, :id => "select-category-1-link", :class => "select-subcategory-link", :target => "_blank" %> | 4 | + <div class="category_cloud"> |
5 | + <% block.owner.categories.each do |category| %> | ||
6 | + <%= link_to category.name , category.path, :id => "select-category-1-link", :class => "select-subcategory-link", :target => "_blank" %> | ||
7 | + <% end %> | ||
8 | + </div><!-- end class='category_cloud' --> | ||
6 | <% end %> | 9 | <% end %> |
7 | -</div><!-- end class='category_cloud' --> | ||
8 | 10 | ||
9 | -<h3 class="block-title"><span><%= _("Tags") %></span></h3> | ||
10 | -<div class="tag_cloud"> | ||
11 | -<% block.owner.tag_list.each do |tag| %> | ||
12 | - <%= link_to tag , "#", :id => "select-category-1-link", :class => "select-subcategory-link"%> | ||
13 | -<% end %> | ||
14 | -</div> | ||
15 | \ No newline at end of file | 11 | \ No newline at end of file |
12 | +<% if block.owner.tag_list.count > 0 %> | ||
13 | + <h3 class="block-title"><span><%= _("Tags") %></span></h3> | ||
14 | + | ||
15 | + <div class="tag_cloud"> | ||
16 | + <% block.owner.tag_list.each do |tag| %> | ||
17 | + <%= link_to tag , "#", :id => "select-category-1-link", :class => "select-subcategory-link"%> | ||
18 | + <% end %> | ||
19 | + </div> | ||
20 | +<% end %> | ||
16 | \ No newline at end of file | 21 | \ No newline at end of file |