From 00528bec6058f935cce17f7736047830f8b88a68 Mon Sep 17 00:00:00 2001 From: cxt Date: Sun, 12 Jun 2016 14:50:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=88=97=E8=A1=A8=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=88=86=E7=8F=AD=E5=B0=B1=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=88=86=E7=8F=AD=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_new_member_list.html.erb | 40 +++++++++++---------- public/stylesheets/public.css | 2 ++ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/app/views/courses/_new_member_list.html.erb b/app/views/courses/_new_member_list.html.erb index 747b37c03..720dfceea 100644 --- a/app/views/courses/_new_member_list.html.erb +++ b/app/views/courses/_new_member_list.html.erb @@ -24,8 +24,10 @@ - <% 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 %> +
+ +
+ <% 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 %> +
+ +
+ <%= 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 %>
- <% 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 %> -
- -
- <%= 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 %> -
- -
<% 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, diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index f975b5a64..c98ec2a47 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -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;}