无“标签”时显示“暂无标签”
This commit is contained in:
parent
68240c6f8f
commit
b100754b96
|
@ -4,34 +4,42 @@
|
||||||
|
|
||||||
<% if non_list_all and (@tags.size > 0) %>
|
<% if non_list_all and (@tags.size > 0) %>
|
||||||
<!-- 这里是显示的非主页的tag 所以当tag数量较多时 不必全部显示 用“更多”代替 -->
|
<!-- 这里是显示的非主页的tag 所以当tag数量较多时 不必全部显示 用“更多”代替 -->
|
||||||
<% if @tags.size > Setting.show_tags_length.to_i then %>
|
<% if @tags.size > Setting.show_tags_length.to_i then %>
|
||||||
<% i = 0 %>
|
<% i = 0 %>
|
||||||
<% until i>Setting.show_tags_length.to_i do %>
|
|
||||||
<div id="tag">
|
<% 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 %>
|
<div id="tag">
|
||||||
</div>
|
<%= link_to @tags[i], :controller => "tags",:action => "index",:q => @tags[i],:object_flag => object_flag,:obj_id => obj.id %>
|
||||||
<% i += 1%>
|
</div>
|
||||||
<% end %>
|
<% i += 1%>
|
||||||
<%= link_to l(:label_more_tags),:action => "show",:id => obj.id %>
|
<% end %>
|
||||||
|
|
||||||
|
<%= link_to l(:label_more_tags),:action => "show",:id => obj.id %>
|
||||||
|
|
||||||
|
<% else %>
|
||||||
|
|
||||||
|
<% @tags.each do |tag| %>
|
||||||
|
<div id="tag">
|
||||||
|
<%= link_to tag,:controller => "tags",:action => "index",:q=>tag,:object_flag => object_flag,:obj_id => obj.id %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
||||||
<% @tags.each do |tag| %>
|
|
||||||
<div id="tag">
|
|
||||||
<%= link_to tag,:controller => "tags",:action => "index",:q=>tag,:object_flag => object_flag,:obj_id => obj.id
|
|
||||||
%>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% else %>
|
|
||||||
<!-- 用来显示三大对象的主页中的tag 故是全部显示 -->
|
<!-- 用来显示三大对象的主页中的tag 故是全部显示 -->
|
||||||
<% if @tags.size > 0 %>
|
<% if @tags.size > 0 %>
|
||||||
<% @tags.each do |tag| %>
|
<% @tags.each do |tag| %>
|
||||||
<div id="tag">
|
<div id="tag">
|
||||||
<%= link_to tag,:controller => "tags",:action => "index",:q=>tag ,:object_flag => object_flag,:obj_id => obj.id %>
|
<%= link_to tag,:controller => "tags",:action => "index",:q=>tag ,:object_flag => object_flag,:obj_id => obj.id %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% else %>
|
||||||
|
<div id="tag">暂无标签!</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
Loading…
Reference in New Issue