<% if @topic.status == 1 %>
<%= image_tag("/images/trustie_logo1.png", width: "50px", height: "50px") %>
<% else %>
<%= link_to image_tag(url_to_avatar(@topic.author), :width => 50, :height => 50,:alt=>'图像' ), user_path(@topic.author) %>
<% end %>
<% if User.current.logged? %>
-
<% if @topic.author.id == User.current.id %>
-
<%= link_to(
l(:button_edit),
{:action => 'edit', :id => @topic},
:class => 'postOptionLink'
) if @message.course_editable_by?(User.current) %>
-
<%= link_to(
l(:button_delete),
{:action => 'destroy', :id => @topic},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:class => 'postOptionLink'
) if @message.course_destroyable_by?(User.current) %>
<% end %>
- <%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{@message.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %>
<%end%>
<% if @topic.status == 1 %>
确实团队
<% else %>
<% if @topic.try(:author).try(:realname) == ' ' %>
<%= link_to @topic.try(:author), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% else %>
<%= link_to @topic.try(:author).try(:realname), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% end %>
<% end %>
<%= format_time( @topic.created_on)%>
<%= @topic.content.html_safe%>
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @topic} %>