<% id = 0 %> <% EducodeSales::Permission.all.group_by{ |d| d.clazz}.each do |k, d| %>
<% d.each do |p| %> <% id += 1 %> <%= check_box_tag "permission[#{p.subject}][]", p.action, @permissions.include?(p.id), {title: p.name, id: "#{id}_" } %> <% end %>
<% end %>
<%= radio_button_tag("business", "自己", @areas.include?("商机管理-自己"), {title: '本人创建列表', id: 1}) %> <%= radio_button_tag("business", "区域", @areas.include?("商机管理-区域"), {title: '本人负责区域列表', id: 2}) %> <%= radio_button_tag("business", "全部", @areas.include?("商机管理-全部"), {title: '全部列表', id: 3}) %>
<%= radio_button_tag("customer", "自己", @areas.include?("客户管理-自己"), {title: '本人负责列表', id: 13}) %> <%= radio_button_tag("customer", "区域", @areas.include?("客户管理-区域"), {title: '本人负责区域列表', id:14}) %> <%= radio_button_tag("customer", "全部", @areas.include?("客户管理-全部"), {title: '全部列表', id: 15}) %>
<%= radio_button_tag("sale_plan", "自己", @areas.include?("销售计划-自己"), {title: '本人创建列表', id: 4}) %> <%= radio_button_tag("sale_plan", "区域", @areas.include?("销售计划-区域"), {title: '本人负责区域列表', id: 5}) %> <%= radio_button_tag("sale_plan", "全部", @areas.include?("销售计划-全部"), {title: '全部列表', id: 6}) %>
<%= radio_button_tag("teacher", "自己", @areas.include?("教师运营-自己"), {title: '本人创建列表', id: 7}) %> <%= radio_button_tag("teacher", "区域", @areas.include?("教师运营-区域"), {title: '本人负责区域列表', id:8}) %> <%= radio_button_tag("teacher", "全部", @areas.include?("教师运营-全部"), {title: '全部列表', id: 9}) %>
<%= radio_button_tag("operation", "自己", @areas.include?("运营计划-自己"), {title: '本人创建列表', id: 10}) %> <%= radio_button_tag("operation", "区域", @areas.include?("运营计划-区域"), {title: '本人负责区域列表', id:11}) %> <%= radio_button_tag("operation", "全部", @areas.include?("运营计划-全部"), {title: '全部列表', id: 12}) %>