项目和课程的动态只参与五种配置

This commit is contained in:
huang 2016-05-04 19:47:44 +08:00
parent f94a45c398
commit ccea42cc8b
2 changed files with 27 additions and 1 deletions

View File

@ -97,6 +97,32 @@ module OrganizationsHelper
type type
end 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 def subfield_list_type subfield
case subfield.to_i case subfield.to_i
when 1 when 1

View File

@ -31,7 +31,7 @@
<div class="update_status_class"><span class="hidden"><%= subfield_list_type(field.status) %></span> <div class="update_status_class"><span class="hidden"><%= subfield_list_type(field.status) %></span>
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2"></a> <a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2"></a>
</div> </div>
<%= select( :name,:group_id, subfield_status_option, <%= select( :name,:group_id, subfield_status_option_default,
{ :include_blank => false,:selected => field.status}, { :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;"}) %> {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:56px;"}) %>
<% end %> <% end %>