创建栏目时默认状态
This commit is contained in:
parent
dc4f927c39
commit
e2848f4dec
|
@ -25,6 +25,8 @@ class OrgSubfieldsController < ApplicationController
|
||||||
# status类型说明,详见SubField
|
# status类型说明,详见SubField
|
||||||
def update_status_by_type subfield, type
|
def update_status_by_type subfield, type
|
||||||
case type
|
case type
|
||||||
|
when "Resource"
|
||||||
|
subfield.update_attribute(:status, 6)
|
||||||
when "Comptec"
|
when "Comptec"
|
||||||
subfield.update_attribute(:status, 6)
|
subfield.update_attribute(:status, 6)
|
||||||
when "Compstu"
|
when "Compstu"
|
||||||
|
|
|
@ -38,14 +38,9 @@
|
||||||
<%= link_to "首页", organization_path(@organization), :class => "por_index_act" %>
|
<%= link_to "首页", organization_path(@organization), :class => "por_index_act" %>
|
||||||
</li>
|
</li>
|
||||||
<% when 'course' %>
|
<% when 'course' %>
|
||||||
<li style="display:<%= field.hide == 0 ? 'block':'none' %>;">
|
|
||||||
<a href="#course_<%= field.id %>" class="sn-link-white"> 课程动态</a>
|
|
||||||
</li>
|
|
||||||
<% when 'project' %>
|
<% when 'project' %>
|
||||||
<li style="display:<%= field.hide == 0 ? 'block':'none' %>;">
|
|
||||||
<a href="#project_<%= field.id %>" class="sn-link-white">项目动态</a>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if field.field_type == "Post" && field.hide == 0 %>
|
<% if field.field_type == "Post" && field.hide == 0 %>
|
||||||
<li><a href="#message_<%= field.id %>" class="sn-link-white"><%= field.name %></a></li>
|
<li><a href="#message_<%= field.id %>" class="sn-link-white"><%= field.name %></a></li>
|
||||||
|
|
Loading…
Reference in New Issue