From c8a08d5a56f6974669ac27ac59fcb64867715a44 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 26 Mar 2015 11:55:42 +0800
Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=88=87=E6=8D=A2=E5=88=86=E7=8F=AD?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=202=E3=80=81=E9=9D=9E=E8=80=81=E5=B8=88?=
=?UTF-8?q?=E7=94=A8=E6=88=B7=E4=B8=8D=E8=83=BD=E7=BC=96=E8=BE=91=E3=80=81?=
=?UTF-8?q?=E5=88=A0=E9=99=A4=E5=88=86=E7=8F=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/courses/_new_groups_name.html.erb | 36 ++++++++++++---------
public/stylesheets/courses.css | 2 +-
2 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/app/views/courses/_new_groups_name.html.erb b/app/views/courses/_new_groups_name.html.erb
index cbda4f75e..da599ef5a 100644
--- a/app/views/courses/_new_groups_name.html.erb
+++ b/app/views/courses/_new_groups_name.html.erb
@@ -10,27 +10,31 @@
<%= link_to group_name, searchgroupmembers_course_path(@course,:group_id => group.id), method: 'get', remote: true,:onclick => "checkclass('group_name_#{group.id}')"%>
<% if @canShowCode%>
- <%= link_to '', deletegroup_course_path(:group_id => group.id), :method => 'delete', :remote => true,
- :data => {confirm: l(:label_delete_group)},
- :class => 'f_1',
- :style => "width: 11px;height: 16px;margin-top:3px;margin-left:5px;background: url(/images/pic_del.gif) no-repeat 0 0;"
- %>
- <% else%>
-
-
+ <% if group.members.empty?%>
+ <%= link_to '', deletegroup_course_path(:group_id => group.id), :method => 'delete', :remote => true,
+ :data => {confirm: l(:label_delete_group)},
+ :class => 'f_1',
+ :style => "width: 11px;height: 16px;margin-top:3px;margin-left:5px;background: url(/images/pic_del.gif) no-repeat 0 0;"
+ %>
+ <% else%>
+
+
+
+ <% end%>
+
+
<% end %>
-
-
-
- <%= form_tag(updategroupname_course_path(@course,:group_id => group.id), method: 'get', remote:true, :id => 'update_group_'+group.id.to_s) do %>
-
-
-
-
+ <% if @canShowCode%>
+ <%= form_tag(updategroupname_course_path(@course,:group_id => group.id), method: 'get', remote:true, :id => 'update_group_'+group.id.to_s) do %>
+
+
+
+
+ <% end %>
<% end %>
<% end %>
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 4674c47aa..38a69d72e 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -290,7 +290,7 @@ a.xls{ margin-left:5px; color:#136b3b;}
.st_search{ }
.st_search span{ font-size:14px; font-weight:bold; color:#606060; margin-right:35px;}
.st_search_input{ border:1px solid #1c9ec7; background:#fff; height:20px; color:#c4c4c4; width:200px; padding-left:5px; margin-bottom:5px;}
-.st_search a{ background:#1c9ec7; color:#fff;border:1px solid #1c9ec7; text-align:center; display:block; width:45px; height:20px; float:left; font-size:12px; }
+.st_search a{ background:#1c9ec7; color:#fff;border:1px solid #1c9ec7; text-align:center; display:block; width:60px; height:20px; float:left; font-size:12px; }
.st_search a:hover{ background:#048fbb; text-decoration:none;}
.classbox{ border:1px solid #f8df8c; background:#fffce6; color:#0d90c3; padding:0 3px; float:left; margin-left:15px;}
.st_addclass{ margin-top:5px;}