<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
<%= link_to activity.author.show_name, user_path(activity.author), :class => "newsBlue mr15" %> TO <% str = defined?(is_contest) && is_contest == 1 ? "竞赛通知" : "#{activity.contest.name.to_s} | 竞赛通知" %> <%= link_to str, contest_news_index_path(activity.contest), :class => "newsBlue ml15" %>
<% if activity.sticky == 1 %> 置顶 <% end%>
发布时间:<%= format_time(activity.created_on) %>
更新时间:<%= format_time(ContestActivity.where("contest_act_type='#{activity.class}' and contest_act_id =#{activity.id}").first.updated_at) %>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %>
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
<% if User.current.logged? %>
  • <% if User.current.logged? %>
    • <%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %>
    • <%= link_to( l(:button_edit), {controller:'news', :action => 'edit', :id => activity.id}, :class => 'postOptionLink' ) if User.current == activity.author || User.current.admin_of_contest?(activity.contest) || User.current.admin? %>
    • <%= delete_link( news_path(activity), :data => {:confirm => l(:text_are_you_sure)}, :class => 'postOptionLink' ) if User.current == activity.author || User.current.admin_of_contest?(activity.contest) || User.current.admin? %>
    <% end %>
<% end %>
<%=render :partial => 'users/course_news_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>