<% unless org_activities.nil? %> <% org_activities.each do |act| %> <% if act.container_type == 'Organization' %> <% if act.org_act_type == 'CreateOrganization' %>
<%= image_tag(url_to_avatar(User.find(act.user_id)), :width => "45", :height => "45") %> <%= render :partial => 'users/show_detail_info', :locals => {:user => User.find(act.user_id)} %>
<%= link_to User.find(act.user_id), user_url_in_org(act.user_id) %>  创建了 <%= Organization.find(act.org_act_id).name %> | 组织
创建时间:<%= format_activity_day(act.created_at) %> <%= format_time(act.created_at, false) %>
<% end %> <% if act.org_act_type == 'OrgDocumentComment' %> <%= render :partial => 'show_org_document', :locals => {:document => act.org_act, :act => act, :flag => 2, :org_subfield_id => params[:org_subfield_id]} %> <% end %> <% end %> <% if act.container_type == 'Project' %> <% case act.org_act_type.to_s %> <% when 'Issue' %> <%= render :partial => 'organizations/org_project_issue', :locals => {:activity => Issue.find(act.org_act_id),:user_activity_id =>act.id} %> <% when 'Message' %> <%= render :partial => 'organizations/project_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %> <% when 'Project'%> <%= render :partial => 'organizations/project_create', :locals => {:activity => act,:user_activity_id =>act.id} %> <% end %> <% end %> <% if act.container_type == 'Course' %> <% case act.org_act_type.to_s %> <% when 'HomeworkCommon' %> <%= render :partial => 'org_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id,:course_activity => 0} %> <% when 'News' %> <%= render :partial => 'org_course_news', :locals => {:activity => News.find(act.org_act_id),:user_activity_id =>act.id} %> <% when 'Message'%> <%= render :partial => 'org_course_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %> <% when 'Poll' %> <%= render :partial => 'org_course_poll', :locals => {:activity => Poll.find(act.org_act_id), :user_activity_id => act.id} %> <% when 'Course'%> <%= render :partial => 'org_course_create', :locals => {:activity => Course.find(act.org_act_id), :user_activity_id => act.id} %> <% end %> <% end %> <% if act.container_type == 'OrgSubfield' %> <% if act.org_act_type == 'Message' and act.org_act_id and Message.where("id=#{act.org_act_id}").count > 0 %> <% message = Message.find(act.org_act_id) %> <% if !message.board.course_id.nil? %> <%= render :partial => 'org_course_message', :locals => {:activity => message,:user_activity_id =>act.id} %> <% elsif message.board.project_id != -1 %> <%= render :partial => 'organizations/project_message', :locals => {:activity => message,:user_activity_id =>act.id} %> <% elsif message.board.org_subfield_id %> <%= render :partial => 'organizations/org_subfield_message', :locals => {:activity => message, :user_activity_id => act.id} %> <% end %> <% end %> <% if act.org_act_type == 'News' and News.where("id=?", act.org_act_id).count > 0 %> <% news = News.find(act.org_act_id) %> <%= render :partial => 'organizations/org_subfield_news', :locals => {:activity => news, :user_activity_id => act.id} %> <% end %> <% end %> <% end %> <% end %> <% if org_act_count == 10 %> <%= link_to "点击展开更多",organization_path(org,:page => @page.to_i + 1, :show_homepage =>params[:show_homepage],:type => params[:type]),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%> <% end%>