<%= csrf_meta_tag %> <%= favicon %> <%= javascript_heads %> <%= heads_for_theme %> <%= stylesheet_link_tag 'org_new_style' %> <%= javascript_include_tag 'org' %> <%= javascript_include_tag 'attachments' %> <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%>
<%# 登录 %> <%= render :partial => 'organizations/org_logined_header' %>
<% @subfield_content.each do |field| %> <% if is_default_field?(field) %> <% case field.name %> <% when 'course' %>
<% if field.status == 0 %>

课程动态

course activities

<% if @course_acts.nil? %> <% else %>
    <% unless @course_acts_homework.nil? %>
  • <% @course_acts_homework.each do |act| %> <%= render :partial => 'org_new_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id, :course_activity => 0} %> <% end %>
  • <% end %> <% unless @course_acts_message.nil? %>
  • <% @course_acts_message.each do |act| %> <%= render :partial => 'org_new_course_message', :locals => {:activity => Message.find(act.org_act_id), :user_activity_id =>act.id} %> <% end %>
  • <% end %> <% unless @course_acts_news.nil? %>
  • <% @course_acts_news.each do |act| %> <%= render :partial => 'org_new_course_news', :locals => {:activity => News.find(act.org_act_id), :user_activity_id =>act.id} %> <% end %>
  • <% end %>
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<% else %>

课程动态

<% if @course_acts.nil? %> <% else %>
<%= render :partial => 'organizations/org_new_course_act_list', :locals =>{:activities => @course_acts, :field => field, :organization => @organization} %>
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<% end %>
<% when 'project' %> <% if field.status == 0 %>

项目动态

<% if @project_acts.nil? %> <% else %>
    <% unless @project_acts.nil? %> <%= render :partial => 'organizations/org_new_project_pic', :locals => {:activities => @project_acts} %> <% end %>
    <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<% else %>

<%= field.name %>

<% if @project_acts.nil? %> <% else %>
<%= render :partial => 'organizations/org_new_project_act_list', :locals =>{:activities => @project_acts, :field => field, :organization => @organization} %>
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<% end %> <% end %> <% else %> <% if field.field_type == "Post" %> <%# 讨论类型 %> <% message_ats = get_message_org(@organization.id, field.id) %> <% ids = field.org_document_comments.map{|o| o.id}.join(",") %>
<% if field.status == 0 %>

<%= field.name %>

<% if message_ats.nil? %> <% else %>
    <% message_ats.each do |act| %> <%= render :partial => 'organizations/org_new_forum_pic', :locals => {:activity => act, :field => field, :organization => @organization} %> <% end %>
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<% else %>

<%= field.name %>

<% if message_ats.nil? %> <% else %>
<% message_ats.each do |act| %> <%= render :partial => 'organizations/org_new_forum_list', :locals => {:activity => act, :field => field, :organization => @organization} %> <% end %>
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<% end %>
<% elsif field.field_type == "Resource" %> <% org_attachs = get_attach_org2(field) %>

<%= field.name %>

<% if org_attachs.nil? %> <% else %>
<%= render :partial => 'organizations/org_new_resource', :locals => {:org_attachs => org_attachs} %>
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %>
<% end %> <% end %> <% end %>
Top