作品列表增加分班过滤

This commit is contained in:
sw 2015-07-15 16:01:03 +08:00
parent 67c054e3af
commit f909fbb835
5 changed files with 19 additions and 1 deletions

View File

@ -80,4 +80,19 @@ module StudentWorkHelper
end
color
end
#获取分班信息
def course_group_list course
result = []
if course.course_groups && !course.course_groups.empty?
result << l(:label_chose_group)
course.course_groups.each do |group|
option = []
option << group.name
option << group.id
result << option
end
end
result
end
end

View File

@ -49,6 +49,7 @@
</span>
<% if @show_all%>
<input type="text" value="<%= @name%>" placeholder="昵称、学号、姓名搜索" class="min_search ml10 fl" onkeypress="SearchByName($(this),'<%= student_work_index_path(:homework => @homework.id)%>',event);">
<%= select_tag :late_penalty,options_for_select(course_group_list(@course),@group), {:class => "fl h22 w100 ml10"} %>
<a class="student_work_search fl" onclick="SearchByName_1($(this).prev(),'<%= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)">搜索</a>
<%= link_to("缺评情况",student_work_absence_penalty_student_work_index_path(:homework => @homework.id), :class => "student_work_search fl", :target => "_blank") if((@is_teacher || User.current.admin?) && @homework.homework_type == 1) %>
<% end%>

View File

@ -2026,6 +2026,7 @@ zh:
label_file_lost_list: 缺失文件列表
lable_unset: 未设置
label_chose_group: 请选择分班

View File

@ -665,7 +665,7 @@ a:hover.ping_pic{border:1px solid #64bdd9;}
a.down_btn{ border:1px solid #CCC; color:#999; padding:0px 5px; font-size:12px; text-align:center; display:block;}
a:hover.down_btn{ background:#14ad5a; color:#fff; border:1px solid #14ad5a;}
.fr{ float:right;}
.min_search{ width:200px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 185px -193px no-repeat; cursor:pointer;}
.min_search{ width:140px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 185px -193px no-repeat; }
.li_min_search{ float:right; margin-right:-10px;}
.info_ni_download{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 200px;margin-top: 10px;}
.info_ni{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 50px;margin-top: -5px;}

View File

@ -110,6 +110,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.w350{ width:350px;}
.w610{ width:610px;}
.w600{ width:600px;}
.h20{height: 20px;}
.h22{ height:22px;}
.h26{ height:26px;}
.h50{ height:50px;}