%= content_for(:header_tags) do %>
<%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
<% end %>
<% user_activities.each do |user_activity|
if user_activities %>
<% unless user_activity.act_type == "ProjectCreateInfo" %>
<% act= user_activity.act %>
<% case user_activity.container_type.to_s %>
<% when 'Course' %>
<% if act %>
<% case user_activity.act_type.to_s %>
<% when 'HomeworkCommon' %>
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity_id =>user_activity.id,:course_activity => 0} %>
<% when 'News' %>
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
<% when 'Message'%>
<%= render :partial => 'course_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_course=>0,:is_board=>0} %>
<% when 'Poll' %>
<%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id} %>
<% when 'Course'%>
<%= render :partial => 'users/course_create', :locals => {:activity => act, :user_activity_id => act.id} %>
<% end %>
<% end %>
<% when 'Project' %>
<% if act %>
<% case user_activity.act_type.to_s %>
<% when 'Issue' %>
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id, :user_id => user_id} %>
<% when 'Message' %>
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_course=>0,:is_board=>0} %>
<% when 'ProjectCreateInfo'%>
<%= render :partial => 'project_create', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
<% end %>
<% end %>
<% when 'Principal' %>
<% if act %>
<% case user_activity.act_type.to_s %>
<% when 'JournalsForMessage' %>
<% unless act.private == 1 && (!User.current || (User.current && act.jour_id != User.current.id && act.user_id != User.current.id)) %>
<%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_activity=>1} %>
<% end %>
<% end %>
<% end %>
<% when 'Blog'%>
<%if act %>
<% case user_activity.act_type.to_s %>
<% when 'BlogComment' %>
<%= render :partial => 'user_blog', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
<% end %>
<% end %>
<% end %>
<% else %>
<%= render :partial => 'project_create', :locals => {:activity => user_activity,:user_activity_id =>user_activity.id} %>
<% end %>
<% end %>
<% end %>
<% if user_activities.count == 10%>
<%= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
<% end%>