%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor" %> <% first_user_activity = user_activities.first.id unless user_activities.first.nil? %> <% 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,:first_user_activity =>first_user_activity,:page => page} %> <% when 'News' %> <%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %> <% when 'Message'%> <%= render :partial => 'course_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %> <% when 'Poll' %> <%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id,:first_user_activity =>first_user_activity,:page => page} %> <% 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,:first_user_activity =>first_user_activity,:page => page} %> <% when 'Message' %> <%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %> <% when 'ProjectCreateInfo'%> <%= render :partial => 'project_create', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %> <% end %> <% end %> <% when 'Principal' %> <% if act %> <% case user_activity.act_type.to_s %> <% when 'JournalsForMessage' %> <%= render :partial => 'user_journalsformessage', :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,:first_user_activity =>first_user_activity,:page => page} %> <% end %> <% end %> <% end %> <% if user_activities.count == 10%>