<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
<% if @ctivity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <% end %> TO <%= link_to activity.author.name.to_s+" | 博客", user_blogs_path(:user_id=>activity.author_id), :class => "newsBlue ml15" %>
<%= link_to activity.title.to_s, user_blog_blog_comment_path(:user_id=>activity.author_id,:blog_id=>activity.blog_id,:id=>activity.id), :class => "postGrey" %>
<% if activity.sticky == 1%> 置顶 <% end%> <% if activity.locked%>        <% end%>
发布时间:<%= format_time(activity.created_on) %>
<%= activity.content.html_safe %>
<% count=activity.children.count %>
回复(<%= count %>)
<%#= format_date(activity.updated_on) %>
<%if count>3 %> <% end %>
<% replies_all_i = 0 %> <% if count > 0 %>
    <% activity.children.reorder("created_on desc").each do |comment| %> <% replies_all_i = replies_all_i + 1 %>
  • <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %>
    <% if comment.try(:author).try(:realname) == ' ' %> <%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> <% else %> <%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> <% end %> <%= format_time(comment.created_on) %>
    <%= comment.content.html_safe %>
  • <% end %>
<% end %> <% if activity.locked == false && User.current.logged?%>
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
<%= form_for('new_form',:url => {:controller => 'blog_comments', :action => 'reply', :user_id=>activity.author_id,:blog_id=>activity.blog_id,:id=>activity.id},:method => "post", :remote => true) do |f|%>

<% end%>
<% end %>