<%= content_for(:header_tags) do %> <%= import_ke(enable_at: false, prettify: false) %> <%= javascript_include_tag "init_activity_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%> <%end%>
<% if @article.try(:author).try(:realname) == ' ' %> <%= link_to @article.try(:author), user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %> <% else %> <%= link_to @article.try(:author).try(:realname), user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %> <% end %>
<%= format_time( @article.created_on)%>
<%= @article.content.html_safe%>
<%#= 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 %>
<% count=0 %> <% if @article.parent %> <% count=@article.parent.children.count%> <% else %> <% count=@article.children.count%> <% end %>
<%# unless count == 0 %>
回复 <%= count>0 ? "(#{count})" : "" %> <% if @article.author == User.current %> <% else %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>@article, :user_activity_id=>@article.id,:type=>"activity"}%> <% end %>
<%@article.children.reorder('created_on desc').each_with_index do |reply,i| %>
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
<% if reply.try(:author).try(:realname) == ' ' %> <%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %> <% else %> <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %> <% end %>
<%= reply.content.html_safe%>
<%= format_time(reply.created_on) %> <% if reply.author == User.current %> <% else %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%> <% 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 %>