<%= content_for(:header_tags) do %> <%= import_ke(enable_at: false, prettify: false) %> <%#= javascript_include_tag "init_activity_KindEditor",'blog' %> <%= javascript_include_tag "create_kindeditor",'blog' %> <% end %>
<%= link_to image_tag(url_to_avatar(@article.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@article.author) %>
<% if @article.author.id == User.current.id || User.current.admin? %> <%end%>
<%= link_to @article.author.show_name, user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<%= format_time( @article.created_on)%>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>@article.id, :content=>@article.content} %>
<%#= link_to_attachments_course @topic, :author => false %> <% if @article.attachments.any?%> <% options = {:author => true, :deletable => false} %> <%= render :partial => 'blog_comments/attachments_links', :locals => {:attachments => @article.attachments, :options => options, :is_float => true} %> <% end %>
<% all_comments = []%> <% count=get_all_children(all_comments, @article).count %>
回复 <%= count>0 ? "(#{count})" : "" %> <%= render :partial => "praise_tread/praise", :locals => {:activity => @article, :user_activity_id => @article.id, :type => "activity"} %>
<% all_comments = []%> <% comments = get_all_children(all_comments, @article) %> <% if count > 0 %>
<% comments.each do |comment| %>
  • <%= 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/message_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 => 'blog_comments', :action => 'quote', :user_id => comment.author_id, :blog_id => comment.blog_id, :id => comment.id}, :remote => true, :method => 'get', :title => l(:button_reply)) if !@article.locked? %> <% if comment.author == User.current %> <%= link_to( l(:button_delete), {:controller => 'blog_comments', :action => 'destroy', :id => comment.id}, :method => :delete, :class => 'fr mr20', :data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_delete) ) %> <% end %>

    <% end %>
  • <% end %>
    <% end %>
    <% if !@article.locked? && User.current.logged?%>
    <%= form_for :blog_comment, :url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id}, :html => {:multipart => true, :id => 'message_form'} do |f| %> <%= render :partial => 'blog_comments/reply_form', :locals => {:f => f,:user=>@user,:article=>@article} %> <%= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'message_content_editor.html("");', :class => " grey_btn fr c_white mt10 mr5" %> <%= link_to l(:button_submit), "javascript:void(0)", :onclick => 'submit_message_replay();', :class => "blue_btn fr c_white mt10 mb10", :style => "margin-right: 5px;" %> <% end %>
    <% end %>