%= content_for(:header_tags) do %>
<%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
<% end %>
<% contest_activities.includes(:contest_act).each do |activity| if contest_activities %>
<% if activity && activity.contest_act %>
<% act = activity.contest_act %>
<% case activity.contest_act_type.to_s %>
<% when 'Work' %>
<%= render :partial => 'users/contest_work', :locals => {:activity => act, :user_activity_id => activity.id, :hw_status => 2} %>
<% when 'News' %>
<%= render :partial => 'users/contest_news', :locals => {:activity => act, :user_activity_id => activity.id, :is_contest => 1} %>
<% when 'Message' %>
<%= render :partial => 'users/contest_message', :locals => {:activity => act, :user_activity_id => activity.id,:is_course=>1,:is_board=>0} %>
<% when 'Poll' %>
<%#= render :partial => 'users/contest_poll', :locals => {:activity => act, :user_activity_id => activity.id, :is_course => 1} %>
<% when 'JournalsForMessage' %>
<%= render :partial => 'users/contest_journalsformessage', :locals => {:activity => act, :user_activity_id => activity.id, :is_contest => 1} %>
<% when 'Attachment' %>
<%#= render :partial => 'users/contest_attachment', :locals => {:activity => act, :user_activity_id => activity.id} %>
<% when 'Contest' %>
<%= render :partial => 'users/contest_create', :locals => {:activity => act, :user_activity_id => activity.id, :is_contest => 1} %>
<% end %>
<% end %>
<% end %>
<% end %>
<% if contest_activities.count + page * 10 < @contest_activities_count %>
<%= link_to "点击展开更多",contest_path(@contest.id, :type => type, :page => page),:id => "show_more_course_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
<% end %>