<% if activity.author.id == User.current.id%>
-
-
<%= link_to(
l(:button_edit_homepage),
{:controller => 'blog_comments',:action => 'edit',:user_id=>activity.author_id,:blog_id=>activity.blog_id, :id => activity.id, :is_homepage => 1},
:class => 'postOptionLink'
) if User.current && User.current.id == activity.author.id %>
-
<%= link_to(
l(:button_delete_homepage),
{:controller => 'blog_comments',:action => 'destroy',:user_id=>activity.author_id,:blog_id=>activity.blog_id, :id => activity.id},
:method => :delete,
:data => {:confirm => l(:text_are_you_sure)},
:class => 'postOptionLink'
) if User.current && User.current.id == activity.author.id %>
-
<%= link_to(
l(:button_cancel_homepage),
{:controller => 'blogs',:action => 'cancel_homepage',:user_id=>activity.author_id,:id=>activity.blog_id, :article_id => activity.id},
:method => :post,
:class => 'postOptionLink'
) if User.current && User.current.id == activity.blog.author_id %>
<%end%>
<%= link_to activity.title.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author_id,
:blog_id=>activity.blog.id,:id=>activity), :class=> "postGrey", :style => 'text-align:center;' %>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.content} %>
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
<% comments = activity.children.reorder("created_on desc").limit(3) %>
<% if count > 0 %>
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
<% 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,:homepage=>1},:method => "post", :remote => true) do |f|%>
发送
<% end%>
<% else %>
<%= render :partial => "users/show_unlogged" %>
<% end %>
<% end %>