From b100754b9632ca9d49fb5be38b72c3ca1c338c32 Mon Sep 17 00:00:00 2001 From: huangjingquan Date: Tue, 20 Aug 2013 20:20:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E2=80=9C=E6=A0=87=E7=AD=BE=E2=80=9D?= =?UTF-8?q?=E6=97=B6=E6=98=BE=E7=A4=BA=E2=80=9C=E6=9A=82=E6=97=A0=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/tags/_tag_name.html.erb | 56 ++++++++++++++++++------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/app/views/tags/_tag_name.html.erb b/app/views/tags/_tag_name.html.erb index 88f5a16a4..abdff2a62 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 %> -<% else %> + <% 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 %> -<% @tags.each do |tag| %> -
- <%= link_to tag,:controller => "tags",:action => "index",:q=>tag,:object_flag => object_flag,:obj_id => obj.id -%> -
-<% end %> -<% 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