diff --git a/app/controllers/org_subfields_controller.rb b/app/controllers/org_subfields_controller.rb index 78049e545..159648f34 100644 --- a/app/controllers/org_subfields_controller.rb +++ b/app/controllers/org_subfields_controller.rb @@ -32,11 +32,11 @@ class OrgSubfieldsController < ApplicationController when "Compstu" subfield.update_attribute(:status, 7) when "Comppro" - subfield.update_attribute(:status, 8) + subfield.update_attribute(:status, 5) when "Compcou" - subfield.update_attribute(:status, 9) + subfield.update_attribute(:status, 2) when "Compact" - subfield.update_attribute(:status, 10) + subfield.update_attribute(:status, 4) end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a2285a678..42a033bee 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -3105,7 +3105,7 @@ def named_attachment_url_without_domain(id, filename, option={}) end #判断是否为默认的组织栏目 def is_default_field? field - (field.name == 'activity' || field.name == 'course' || field.name == 'project') && field.field_type == 'default' + (field.name == 'activity' || field.name == 'course' || field.name == 'project' || field.name == "Comppro" || field.name == "Comppro" || field.name == "Compact") && field.field_type == 'default' end def host_with_protocol diff --git a/app/views/organizations/_org_custom_left2.html.erb b/app/views/organizations/_org_custom_left2.html.erb index ee9530d32..83d9dea17 100644 --- a/app/views/organizations/_org_custom_left2.html.erb +++ b/app/views/organizations/_org_custom_left2.html.erb @@ -119,6 +119,15 @@ <% end %> <% end %> <% end %> + <% when 'Compcou' %> + <% @excellent_courses.first(4).each do |course| %> +
+ <%= link_to course.name, course_path(course.id), :target => '_blank', :class => "por_course_title", :title => course.name %> + <%= link_to image_tag(url_to_avatar(course),:width => "140", :height => "100"), user_path(attach.author), :target => "_blank", :class => "fl" %> + <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => course.id, :content=> course.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %> + <%= time_from_now course.updated_at %> +
+ <% end %> <% end %> <% else %> <% if field.field_type == "Post" %> diff --git a/app/views/organizations/_show_custom.html.erb b/app/views/organizations/_show_custom.html.erb index a7d7f4f78..ad77f4286 100644 --- a/app/views/organizations/_show_custom.html.erb +++ b/app/views/organizations/_show_custom.html.erb @@ -15,7 +15,7 @@ <% if field.status.to_i == 4 %> <%= render :partial => 'organizations/org_custom_right1', :locals => {:field => field} %> <% elsif field.status.to_i == 5 %> - <%= render :partial => 'organizations/org_custom_right2', :locals => {:field => field} %> + <%= render :partial => 'organizations/org_custom_right2', :locals => {:field => field, :containers => @excellent_projects} %> <% elsif field.status.to_i == 6 %> <%= render :partial => 'organizations/org_custom_right3', :locals => {:field => field} %> <% end %>