diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 56ef460a0..9b7888bf2 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -59,6 +59,19 @@ module ApplicationHelper end end + # 判断组织左侧展开或者隐藏 + def is_hide_org_left obj + if obj.nil? + return true + else + if obj.hide == 0 + return true + else + return false + end + end + end + # Time 2015-03-24 16:38:05 # Author lizanle # Description after save后需要进行资源记录的更新 diff --git a/app/views/organizations/_org_left_subfield_list.html.erb b/app/views/organizations/_org_left_subfield_list.html.erb index 8280a2be7..31d6925db 100644 --- a/app/views/organizations/_org_left_subfield_list.html.erb +++ b/app/views/organizations/_org_left_subfield_list.html.erb @@ -37,10 +37,10 @@ <% org_activity_field = organization.org_subfields.where('field_type="default" and name="activity" and field_type="default"').first %> <% org_course_field = organization.org_subfields.where('field_type="default" and name="course" and field_type="default"').first %> <% org_project_field = organization.org_subfields.where('field_type="default" and name="project" and field_type="default"').first %> -