<% max_position = @disciplines.pluck(:position).max %> <% if @disciplines.present? %> <% @disciplines.each do |discipline| %> <% end %> <% else %> <%= render 'admins/shared/no_data_for_table' %> <% end %>
序号 课程方向 实践课程 实训 题库 操作
<%= discipline.position %> <%= link_to discipline.name, admins_sub_disciplines_path(discipline_id: discipline), :title => discipline.name %> <%= check_box_tag :subject,!discipline.subject,discipline.subject,remote:true,data:{id:discipline.id},class:"discipline-source-form" %> <%= check_box_tag :shixun,!discipline.shixun,discipline.shixun,remote:true,data:{id:discipline.id},class:"discipline-source-form" %> <%= check_box_tag :question,!discipline.question,discipline.question,remote:true,data:{id:discipline.id},class:"discipline-source-form" %> <%= javascript_void_link('上移', class: 'move-action', data: { id: discipline.id, opr: "up" }, style: discipline.position == 1 ? 'display:none' : '') %> <%= javascript_void_link('下移', class: 'move-action', data: { id: discipline.id, opr: "down" }, style: discipline.position == max_position ? 'display:none' : '') %> <%= link_to '编辑', edit_admins_discipline_path(discipline), remote: true, class: 'action' %> <%= delete_link '删除', admins_discipline_path(discipline, element: ".discipline-item-#{discipline.id}"), class: 'delete-discipline-action' %>