diff --git a/app/views/tags/_tag_name.html.erb b/app/views/tags/_tag_name.html.erb index 88f5a16a..abdff2a6 100644 --- a/app/views/tags/_tag_name.html.erb +++ b/app/views/tags/_tag_name.html.erb @@ -4,34 +4,42 @@ <% if non_list_all and (@tags.size > 0) %> -<% if @tags.size > Setting.show_tags_length.to_i then %> -<% i = 0 %> -<% until i>Setting.show_tags_length.to_i do %> -
- <%= link_to @tags[i], :controller => "tags",:action => "index",:q => @tags[i],:object_flag => object_flag,:obj_id => obj.id %> -
-<% i += 1%> -<% end %> -<%= link_to l(:label_more_tags),:action => "show",:id => obj.id %> + <% if @tags.size > Setting.show_tags_length.to_i then %> + <% i = 0 %> + + <% until i>Setting.show_tags_length.to_i do %> +
+ <%= link_to @tags[i], :controller => "tags",:action => "index",:q => @tags[i],:object_flag => object_flag,:obj_id => obj.id %> +
+ <% i += 1%> + <% end %> + + <%= link_to l(:label_more_tags),:action => "show",:id => obj.id %> + + <% else %> + + <% @tags.each do |tag| %> +
+ <%= link_to tag,:controller => "tags",:action => "index",:q=>tag,:object_flag => object_flag,:obj_id => obj.id %> +
+ <% end %> + + <% end %> <% else %> -<% @tags.each do |tag| %> -
- <%= link_to tag,:controller => "tags",:action => "index",:q=>tag,:object_flag => object_flag,:obj_id => obj.id -%> -
-<% end %> -<% end %> -<% else %> -<% if @tags.size > 0 %> -<% @tags.each do |tag| %> -
- <%= link_to tag,:controller => "tags",:action => "index",:q=>tag ,:object_flag => object_flag,:obj_id => obj.id %> -
-<% end %> -<% end %> + <% if @tags.size > 0 %> + <% @tags.each do |tag| %> +
+ <%= link_to tag,:controller => "tags",:action => "index",:q=>tag ,:object_flag => object_flag,:obj_id => obj.id %> +
+ <% end %> + <% else %> +
暂无标签!
+ <% end %> + + <% end %> \ No newline at end of file