From f7a888ac3dce4bc1a67215d1b6861f8df1ddc5ba Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 13 May 2016 11:11:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8D=E5=B8=88=E9=BB=98=E8=AE=A4=E5=88=9B?= =?UTF-8?q?=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/org_subfields_controller.rb | 6 ++++++ app/views/organizations/_subfield_list.html.erb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/controllers/org_subfields_controller.rb b/app/controllers/org_subfields_controller.rb index 661073cdc..c628b25fc 100644 --- a/app/controllers/org_subfields_controller.rb +++ b/app/controllers/org_subfields_controller.rb @@ -15,6 +15,12 @@ class OrgSubfieldsController < ApplicationController end end @subfield.update_attributes(:field_type => params[:field_type]) + # 如果栏目是教师,不参入类型的配置,定义为右三模式 + # 新增模块命名规则,左边1开头,右边2开头,以前的不变 + # eg:23 右三 + if params[:field_type] == "Comptec" + @subfield.update_attributes(:status => 23) + end else @res = false end diff --git a/app/views/organizations/_subfield_list.html.erb b/app/views/organizations/_subfield_list.html.erb index 0d6b5aac2..3cdb2991c 100644 --- a/app/views/organizations/_subfield_list.html.erb +++ b/app/views/organizations/_subfield_list.html.erb @@ -57,7 +57,7 @@
  • 新增
  • - <% if field.field_type == "Resource" %> + <% if field.field_type == "Resource" || field.field_type == "Comptec" %> 默认 <% else %> <%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %>