模式二中添加课程定配

hjq_beidou
huang 9 years ago
parent e2848f4dec
commit 257165dbaf

@ -32,11 +32,11 @@ class OrgSubfieldsController < ApplicationController
when "Compstu" when "Compstu"
subfield.update_attribute(:status, 7) subfield.update_attribute(:status, 7)
when "Comppro" when "Comppro"
subfield.update_attribute(:status, 8) subfield.update_attribute(:status, 5)
when "Compcou" when "Compcou"
subfield.update_attribute(:status, 9) subfield.update_attribute(:status, 2)
when "Compact" when "Compact"
subfield.update_attribute(:status, 10) subfield.update_attribute(:status, 4)
end end
end end

@ -3105,7 +3105,7 @@ def named_attachment_url_without_domain(id, filename, option={})
end end
#判断是否为默认的组织栏目 #判断是否为默认的组织栏目
def is_default_field? field 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 end
def host_with_protocol def host_with_protocol

@ -119,6 +119,15 @@
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
<% when 'Compcou' %>
<% @excellent_courses.first(4).each do |course| %>
<div class="por_course_bar fl clear">
<%= 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"} %>
<a class=" por_course_time"><%= time_from_now course.updated_at %></a>
</div>
<% end %>
<% end %> <% end %>
<% else %> <% else %>
<% if field.field_type == "Post" %> <% if field.field_type == "Post" %>

@ -15,7 +15,7 @@
<% if field.status.to_i == 4 %> <% if field.status.to_i == 4 %>
<%= render :partial => 'organizations/org_custom_right1', :locals => {:field => field} %> <%= render :partial => 'organizations/org_custom_right1', :locals => {:field => field} %>
<% elsif field.status.to_i == 5 %> <% 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 %> <% elsif field.status.to_i == 6 %>
<%= render :partial => 'organizations/org_custom_right3', :locals => {:field => field} %> <%= render :partial => 'organizations/org_custom_right3', :locals => {:field => field} %>
<% end %> <% end %>

Loading…
Cancel
Save