<%= content_for(:header_tags) do %> <%= import_ke(enable_at: true, prettify: false, init_activity: true) %> <%= javascript_include_tag 'blog' %> <% end %>
<%= link_to image_tag(url_to_avatar(@article.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@article.author) %>
<% if User.current && @article.author.id == User.current.id%>
    • 重设大纲
    • <%= link_to( '取消大纲', {:controller => 'blog_comments',:action => 'destroy',:user_id=>BlogComment.find(@course.outline).author_id,:blog_id=>BlogComment.find(@course.outline).blog_id, :id => @course.outline,:course_id=>@course.id}, :method => :delete, :data => {:confirm => '您确定要取消么?'}, :class => 'postOptionLink' ) if User.current && User.current.id == @article.author.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 %>)
<%@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) %>

<% end %>
<% end %>
<% if !@article.locked? && User.current.logged?%>
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@article.author_id), :alt => "用户头像" %>
<%= form_for 'blog_comment',:url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id},:method => "post",:html => {:multipart => true, :id => 'message_form'} do |f|%>

<% end%>
<% end %>