学生列表没有分班就不显示分班列
This commit is contained in:
parent
c0d167d2e2
commit
00528bec60
|
@ -24,8 +24,10 @@
|
|||
<ul class="st_box_top">
|
||||
<li class="ml50" style="padding-right: 5px;"><span class="fontGrey6 fb">姓名</span></li>
|
||||
<li class="ml10" style="padding-right: 15px;"><span class="fontGrey6 fb">学号</span></li>
|
||||
<li style="padding-right: 55px; margin-left: 160px;"><span class="fontGrey6 fb">分班</span></li>
|
||||
<li class="st_list_score ml10">
|
||||
<% unless @course.course_groups.empty? %>
|
||||
<li style="padding-right: 55px; margin-left: 160px;"><span class="fontGrey6 fb">分班</span></li>
|
||||
<% end %>
|
||||
<li class="st_list_score <%= @course.course_groups.empty? ? 'ml250' : 'ml10' %>">
|
||||
<%= link_to '英雄榜', member_score_sort_course_path(:sort_type => 'score', :sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true, :class => 'ml35'%>
|
||||
<% if @sort_type == "score" && @score_sort_by == 'desc' %>
|
||||
<a id="pic" href="javascript:" class= "st_down"></a>
|
||||
|
@ -59,31 +61,33 @@
|
|||
<li><%= link_to("#{l(:label_bidding_user_studentcode)}:<span >#{member.user.user_extensions.student_id}</span>".html_safe,user_path(member.user)) %></li>
|
||||
<% end%>
|
||||
</ul>
|
||||
<% if User.current.allowed_to?(:as_teacher, @course) || User.current.admin? %>
|
||||
<% if @course.course_groups.nil? || @group %>
|
||||
<% unless @course.course_groups.empty? %>
|
||||
<% if User.current.allowed_to?(:as_teacher, @course) || User.current.admin? %>
|
||||
<% if @course.course_groups.nil? || @group %>
|
||||
<div class="select-class-option fl" style="margin-left: 5px;">
|
||||
<span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= form_tag({:controller => 'courses', :action => 'teacher_assign_group', :id => @course.id,:user_id => member.user_id},:remote=>'true', :method => 'post', :id=>"join_group_form_#{member.id}", :class => 'query_form') do %>
|
||||
<div class="select-class-option fl" style="margin-left: 5px;"><span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2 ml5"></a>
|
||||
</div>
|
||||
<%= select( :name,:group_id, course_group_option(@course),
|
||||
{ :include_blank => false,:selected => member.course_group_id},
|
||||
{:onchange=>"join_group_function('#join_group_form_#{member.id}');", :id =>"course_group_id", :name => "course_group_id",:class=>"w125 undis class-edit fl", :style => "margin-left: 5px;"}) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="select-class-option fl" style="margin-left: 5px;">
|
||||
<span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= form_tag({:controller => 'courses', :action => 'teacher_assign_group', :id => @course.id,:user_id => member.user_id},:remote=>'true', :method => 'post', :id=>"join_group_form_#{member.id}", :class => 'query_form') do %>
|
||||
<div class="select-class-option fl" style="margin-left: 5px;"><span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2 ml5"></a>
|
||||
</div>
|
||||
<%= select( :name,:group_id, course_group_option(@course),
|
||||
{ :include_blank => false,:selected => member.course_group_id},
|
||||
{:onchange=>"join_group_function('#join_group_form_#{member.id}');", :id =>"course_group_id", :name => "course_group_id",:class=>"w125 undis class-edit fl", :style => "margin-left: 5px;"}) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="select-class-option fl" style="margin-left: 5px;">
|
||||
<span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= link_to format("%0.2f",member.score.nil? ? 0 : member.score.to_s), {
|
||||
:action => 'show_member_score',
|
||||
:member_id => member.id,
|
||||
:remote => true},
|
||||
:class => 'st_list_score c_red' %>
|
||||
:class => "st_list_score c_red #{@course.course_groups.empty? ? 'ml130' : ''}" %>
|
||||
<%= link_to member.act_score.nil? ? 0 : member.act_score.to_s, {
|
||||
:action => 'show_member_act_score',
|
||||
:member_id => member.id,
|
||||
|
|
|
@ -89,7 +89,9 @@ h4{ font-size:14px; }
|
|||
.ml100{ margin-left:100px;}
|
||||
.ml110{ margin-left:110px;}
|
||||
.ml125 { margin-left:125px;}
|
||||
.ml130 { margin-left:130px;}
|
||||
.ml200 {margin-left:200px;}
|
||||
.ml250 {margin-left:250px;}
|
||||
.ml320{ margin-left:320px;}
|
||||
.ml150 { margin-left:150px;}
|
||||
.mr-5 {margin-right:-5px;}
|
||||
|
|
Loading…
Reference in New Issue