回复
<%= @comments.count>0 ? "(#{@comments.count})" : "" %>▪
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>@news, :user_activity_id=>@news.id,:type=>"activity"}%>
<% unless @comments.empty? %>
<% @comments.each_with_index do |comment,i| %>
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
<% if !comment.content_detail.blank? %>
<%= link_to(
l(:button_reply),
{:controller => 'comments',:action => 'quote', :id => comment},
:remote => true,
:method => 'get',
:title => l(:button_reply))%>
<%= link_to(
l(:button_delete),
{:controller => 'comments',
:action => 'destroy', :id => @news,
:comment_id => comment},
:method => :delete,
:class => 'fr mr20',
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete)
) if @news.author == User.current %>
<% end %>
<% end %>
<% end %>