<%= link_to image_tag(url_to_avatar(@news.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@news.author) %>
<% if User.current.logged? %>
-
- <%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{@news.id}','#{User.current.id}','news')") %>
-
<%= link_to(
l(:button_edit),
{:action => 'edit', :id => @news},
:class => 'postOptionLink'
) if @news.author == User.current %>
-
<%= delete_link(
news_path(@news),
:data => {:confirm => l(:text_are_you_sure)},
:class => 'postOptionLink'
) if @news.author == User.current %>
<%end%>
<% if @news.try(:author).try(:realname) == ' ' %>
<%= link_to @news.try(:author), user_path(@news.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% else %>
<%= link_to @news.try(:author).try(:realname), user_path(@news.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% end %>
<%= format_time( @news.created_on)%>
<%= @news.description.html_safe%>
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @news} %>