修改编辑分组时的样式

This commit is contained in:
sw 2015-03-25 19:25:17 +08:00
parent e465d66689
commit 3c224f0ff9
2 changed files with 65 additions and 47 deletions

View File

@ -1,57 +1,23 @@
<div class="st_list">
<div class="st_search">
<form class="f_l"><input type="text" name="" value="输入学生姓名、学号进行搜索" class="st_search_input"/></form>
<a href="#" class="f_l">搜索</a>
<%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:remote=>true,:id => "search_student") do %>
<%= text_field_tag 'name', params[:name], name: "name", :class => 'st_search_input', :placeholder => '输入学生姓名、学号进行搜索'%>
<% if @group %>
<%= hidden_field "search_group_id", params[:search_group_id],:value => "#{@group.id}", name: 'search_group_id' %>
<input type="hidden" name="ingroup">
<% else %>
<input type="hidden" name="incourse">
<% end %>
<% end %>
<a href="javascript:" class="f_l" onclick="$('#search_student').submit();">搜索</a>
</div>
<div class="cl"></div>
<div class="st_addclass">
<ul>
<li style=" color:#8b8b8b;">分班:</li>
<li class="classbox">
<a href="#">全部</a>
</li>
<li class="classbox_on">
<a href="#">A班<span class="c_red">29人</span></a><a href="#" onClick="sAlert('温馨提示:已有学生加入该班级,不能删除该班级,仅可编辑班级名称。');" style="margin-right:5px;" ><img src="images/courses/pic_del.gif" width="11" height="12" alt="删除班级" title="删除该班级" /></a>
<a href="javascript:void(0)" class="f_l" onclick="$('#add_tag01').slideToggle();"><img src="images/courses/pic_edit.png" width="14" height="15" alt="编辑班级 "title="编辑该班级" /></a>
</li>
<li>
<span id="add_tag01" style="display:none; vertical-align: middle;" class=" f_l">
<input type="text" id="" name="" size="20" class="isTxt w90 f_l" maxlength="100" />
<input type="button" class="submit f_l" onclick="addTag();"/>
</span>
</li>
<li class="classbox">
<a href="#">B班<span class="c_red">29人</span></a><a href="#" style="margin-right:5px;" ><img src="images/courses/pic_del.gif" width="11" height="12" alt="删除班级" title="删除该班级"/></a>
<a href="javascript:void(0)" class="f_l" onclick="$('#add_tag02').slideToggle();"><img src="images/courses/pic_edit.png" width="14" height="15" alt="编辑班级" title="编辑该班级" /></a>
</li>
<li>
<span id="add_tag02" style="display:none; vertical-align: middle;" class=" f_l">
<input type="text" id="" name="" size="20" class="isTxt w90 f_l" maxlength="100" />
<input type="button" class="submit f_l" onclick="addTag();"/>
</span>
</li>
<li class="classbox">
<a href="#">C班<span class="c_red">29人</span></a><a href="#" style="margin-right:5px;" ><img src="images/courses/pic_del.gif" width="11" height="12" alt="删除班级" title="删除该班级"/></a>
<a href="javascript:void(0)" class="f_l" onclick="$('#add_tag03').slideToggle();"><img src="images/courses/pic_edit.png" width="14" height="15" alt="编辑班级" title="编辑该班级" /></a>
</li>
<li>
<span id="add_tag03" style="display:none; vertical-align: middle;" class=" f_l">
<input type="text" id="" name="" size="20" class="isTxt w90 f_l" maxlength="100" />
<input type="button" class="submit f_l" onclick="addTag();"/>
</span>
</li>
<li style="margin-left:15px;">
<a href="javascript:void(0)" class="st_add f_l" onclick="$('#add_tag04').slideToggle();">+添加分班</a>
</li>
<li>
<span id="add_tag04" style="display:none; vertical-align: middle;" class="ml10 f_l">
<input type="text" id="" name="" size="20" class="isTxt w90 f_l" maxlength="100" />
<input type="button" class="submit f_l" onclick="addTag();"/>
</span>
</li>
</ul>
<%= render :partial => 'new_groups_name', :locals => {:course_groups => @course_groups} %>
</div>
<div class="cl"></div>
<div class="st_box">
<ul class="st_box_top">
<li class="ml50"><a href="#">姓名</a><a href="#" class="st_up"></a></li>

View File

@ -0,0 +1,52 @@
<ul>
<li style=" color:#8b8b8b;">分班:</li>
<li class="classbox">
<%= link_to l(:label_all), searchgroupmembers_course_path(@course,:group_id => 0), :onclick => "checkclass('group_name_0')", method: 'get', remote: true%>
</li>
<% unless course_groups.nil? %>
<% course_groups.each do |group| %>
<% group_name = " #{ group.name}( <span class='c_red'>#{group.members.count.to_s}人</span>)".html_safe %>
<li class="classbox" style="margin-bottom: 5px;">
<%= 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%>
<a href="javascript:" onClick="alert('温馨提示:已有学生加入该班级,不能删除该班级,仅可编辑班级名称。');" style="margin-right:4px;" >
<img src="/images/pic_del.gif" width="11" height="12" alt="删除班级" title="删除该班级" />
</a>
<% end %>
<a href="javascript:void(0)" class="f_l" style="padding-left: 5px;" onclick="$('#group_name_<%= group.id %>').value='';$('#edit_group_<%= group.id %>').slideToggle();">
<img src="/images/pic_edit.png" width="14" height="15" alt="编辑班级" />
</a>
</li>
<!-- 编辑分班 -->
<li>
<%= form_tag(updategroupname_course_path(@course,:group_id => group.id), method: 'get', remote:true, update: 'group_name') do %>
<span id="edit_group_<%= group.id %>" style="display:none; vertical-align: middle;" class=" f_l">
<input type="text" id="group_name_<%= group.id%>" name="group_name" size="20" class="isTxt w90 f_l" maxlength="100" />
<input type="button" class="submit f_l" onclick="edit_group('edit_group_<%= group.id%>');"/>
</span>
<% end %>
</li>
<% end %>
<% end %>
<% if @canShowCode %>
<li style="margin-left:15px;margin-top: 2px;">
<a href="javascript:void(0)" class="st_add f_l" onclick="$('#group_name').value='';$('#new_group_name').slideToggle();">+添加分班</a>
</li>
<li >
<span id="new_group_name" style="display:none; vertical-align: middle;" class="ml10 f_l">
<%= form_tag( addgroups_course_path(@course), method: 'get',:remote=>true) do %>
<input type="text" id="group_name" name="group_name" size="20" class="isTxt w90 f_l" maxlength="100" />
<input type="button" class="submit f_l" onclick="edit_group('group_name');"/>
<% end %>
</span>
</li>
<% end %>
</ul>