创建栏目时默认状态

This commit is contained in:
huang 2016-06-02 21:10:07 +08:00
parent dc4f927c39
commit e2848f4dec
2 changed files with 3 additions and 6 deletions

View File

@ -25,6 +25,8 @@ class OrgSubfieldsController < ApplicationController
# status类型说明详见SubField
def update_status_by_type subfield, type
case type
when "Resource"
subfield.update_attribute(:status, 6)
when "Comptec"
subfield.update_attribute(:status, 6)
when "Compstu"

View File

@ -38,14 +38,9 @@
<%= link_to "首页", organization_path(@organization), :class => "por_index_act" %>
</li>
<% when 'course' %>
<li style="display:<%= field.hide == 0 ? 'block':'none' %>;">
<a href="#course_<%= field.id %>" class="sn-link-white"> 课程动态</a>
</li>
<% when 'project' %>
<li style="display:<%= field.hide == 0 ? 'block':'none' %>;">
<a href="#project_<%= field.id %>" class="sn-link-white">项目动态</a>
</li>
<% end %>
<% else %>
<% if field.field_type == "Post" && field.hide == 0 %>
<li><a href="#message_<%= field.id %>" class="sn-link-white"><%= field.name %></a></li>