<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
<%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %> 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,:in_act => true), :class => "postGrey" %> <% if activity.locked%>       <% end%> <% if activity.sticky == 1%> 置顶 <% end%>
发布时间:<%= format_time(activity.created_on) %>
更新时间:<%= format_time(UserActivity.where("act_type='#{activity.class}' and act_id =#{activity.id}").first.updated_at) %>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.content} %>
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
<% all_comments = []%> <% all_replies = get_all_children(all_comments, activity) %> <% count = all_replies.count %>
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :homepage => 0} %> <% comments = all_replies[0..2] %> <% if count > 0 %>
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'BlogComment', :activity_id =>activity.id, :homepage => 0, :user_id => activity.author_id}%>
<% 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 => "用户头像" %>
<% if User.current.logged? %>
<%= 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%>
<% else %> <%= render :partial => "users/show_unlogged" %> <% end %>
<% end %>