<% @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, :type => 'News', :user_activity_id => @news.id}%> <% if !comment.content_detail.blank? %>
    <%= comment.content_detail.html_safe %>
    <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> <%= 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, :id => "delete_reply_#{comment.id}", :class => 'fr mr20 undis', :data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_delete) ) if ((object.kind_of? Organization) ? User.current.allowed_to?(:manage_news, object) : (User.current.admin_of_org?(object) || User.current == comment.author)) %>

    <% end %>
  • <% end %> <% if @limit_count > @page * @limit + 10 %>
    <%= link_to '点击展开更多回复', news_path(@news, :page => @page), :remote=>true %>
    <% end %>