回复 <%= @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? %>
    <%= 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, :class => 'fr mr20', :data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_delete) ) if @news.author == User.current %>

    <% end %>
  • <% end %>
    <% end %>
    <% if @news.commentable? %>
    <%= form_for @comment, :url=>{:controller => 'comments', :action => 'create', :id => @news}, :html => {:multipart => true, :id => 'add_comment_form'} do |f| %>
    <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> <%= f.kindeditor :comments, :editor_id => 'comment_editor', :owner_id => @comment.nil? ? 0: @comment.id, :owner_type => OwnerTypeHelper::COMMENT, :width => '99%', :height => 100, :minHeight=>100, :input_html => { :id => 'comment_content', :class => 'talk_text fl', :maxlength => 5000 }%>

    <%= l(:label_cancel_with_space) %> <%= l(:label_comment_with_space) %>

    <% end %>
    <% end %>