From ccea42cc8b55d39de087df051d9a5e22088a2afe Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 4 May 2016 19:47:44 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=92=8C=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E7=9A=84=E5=8A=A8=E6=80=81=E5=8F=AA=E5=8F=82=E4=B8=8E=E4=BA=94?= =?UTF-8?q?=E7=A7=8D=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/organizations_helper.rb | 26 +++++++++++++++++++ .../organizations/_subfield_list.html.erb | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/app/helpers/organizations_helper.rb b/app/helpers/organizations_helper.rb index 3fdfc3aa0..a43890c90 100644 --- a/app/helpers/organizations_helper.rb +++ b/app/helpers/organizations_helper.rb @@ -97,6 +97,32 @@ module OrganizationsHelper type end + # 课程和项目不参与某些模块的排列 + def subfield_status_option_default + type = [] + option1 = [] + option1 << "左上" + option1 << "1" + type << option1 + option2 = [] + option2 << "中一" + option2 << "2" + type << option2 + option3 = [] + option3 << "中二" + option3 << "3" + type << option3 + option4 = [] + option4 << "中下" + option4 << "4" + type << option4 + option6 = [] + option6 << "右上" + option6 << "6" + type << option6 + type + end + def subfield_list_type subfield case subfield.to_i when 1 diff --git a/app/views/organizations/_subfield_list.html.erb b/app/views/organizations/_subfield_list.html.erb index 2d29f258f..2961b97a0 100644 --- a/app/views/organizations/_subfield_list.html.erb +++ b/app/views/organizations/_subfield_list.html.erb @@ -31,7 +31,7 @@
- <%= select( :name,:group_id, subfield_status_option, + <%= select( :name,:group_id, subfield_status_option_default, { :include_blank => false,:selected => field.status}, {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:56px;"}) %> <% end %>