修改组织500问题
This commit is contained in:
parent
5d68d185d5
commit
8c10ce6fee
|
@ -59,6 +59,19 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
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
|
# Time 2015-03-24 16:38:05
|
||||||
# Author lizanle
|
# Author lizanle
|
||||||
# Description after save后需要进行资源记录的更新
|
# Description after save后需要进行资源记录的更新
|
||||||
|
|
|
@ -37,10 +37,10 @@
|
||||||
<% org_activity_field = organization.org_subfields.where('field_type="default" and name="activity" and field_type="default"').first %>
|
<% 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_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 %>
|
<% org_project_field = organization.org_subfields.where('field_type="default" and name="project" and field_type="default"').first %>
|
||||||
<div class="homepageLeftMenuBlock" style="display:<%= org_activity_field.hide == 0?'block':'none' %>;" id="org_subfield_<%= org_activity_field.id %>">
|
<div class="homepageLeftMenuBlock" style="display:<%= is_hide_org_left(org_activity_field) ? 'block':'none' %>;" id="org_subfield_<%= org_activity_field.id %>">
|
||||||
<%= link_to "动态",organization_path(organization), :class => "homepageMenuText" %>
|
<%= link_to "动态",organization_path(organization), :class => "homepageMenuText" %>
|
||||||
</div>
|
</div>
|
||||||
<div style="display:<%= org_project_field.hide == 0?'block':'none' %>;" id="org_subfield_<%= org_project_field.id %>">
|
<div style="display:<%= is_hide_org_left(org_project_field) ? 'block':'none' %>;" id="org_subfield_<%= org_project_field.id %>">
|
||||||
<div class="homepageLeftMenuBlock">
|
<div class="homepageLeftMenuBlock">
|
||||||
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuProjects').slideToggle();">项目</a>
|
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuProjects').slideToggle();">项目</a>
|
||||||
<% if User.current.logged? and User.current.admin_of_org?(organization) %>
|
<% if User.current.logged? and User.current.admin_of_org?(organization) %>
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="display:<%= org_course_field.hide == 0?'block':'none' %>;" id="org_subfield_<%= org_course_field.id %>">
|
<div style="display:<%= is_hide_org_left(org_course_field) ? 'block':'none' %>;" id="org_subfield_<%= org_course_field.id %>">
|
||||||
<div class="homepageLeftMenuBlock">
|
<div class="homepageLeftMenuBlock">
|
||||||
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuCourses').slideToggle();">课程</a>
|
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuCourses').slideToggle();">课程</a>
|
||||||
<% if User.current.logged? and User.current.admin_of_org?(organization) %>
|
<% if User.current.logged? and User.current.admin_of_org?(organization) %>
|
||||||
|
|
Loading…
Reference in New Issue