Merge branch 'develop' into szzh
This commit is contained in:
commit
5a7ed4fee9
|
@ -191,9 +191,19 @@ class AttachmentsController < ApplicationController
|
|||
if !@attachment.container.nil? &&
|
||||
(@attachment.container.is_a?(Course) || ((@attachment.container.has_attribute?(:course) || @attachment.container.has_attribute?(:course_id) ) &&
|
||||
@attachment.container.course ) || ((@attachment.container.has_attribute?(:board) || @attachment.container.has_attribute?(:board_id)) &&
|
||||
@attachment.container.board && @attachment.container.board.course ) )
|
||||
@attachment.container.board && @attachment.container.board.course ) || @attachment.container.is_a?(StudentWorksScore) || @attachment.container.is_a?(HomeworkCommon) ||
|
||||
@attachment.container.is_a?(StudentWork))
|
||||
if @attachment.container.is_a?(News)
|
||||
format.html { redirect_to_referer_or news_path(@attachment.container) }
|
||||
elsif @attachment.container.is_a?(StudentWorksScore)
|
||||
@is_destroy = true #根据ID删除页面对应的数据,js刷新页面
|
||||
format.js
|
||||
elsif @attachment.container.is_a?(HomeworkCommon)
|
||||
@is_destroy = true #根据ID删除页面对应的数据,js刷新页面
|
||||
format.js
|
||||
elsif @attachment.container.is_a?(StudentWork)
|
||||
@is_destroy = true #根据ID删除页面对应的数据,js刷新页面
|
||||
format.js
|
||||
elsif @attachment.container.is_a?(Message)
|
||||
format.html { redirect_to_referer_or new_board_message_path(@attachment.container) }
|
||||
elsif @course.nil?
|
||||
|
@ -431,7 +441,7 @@ private
|
|||
@attachment.container.board.course)
|
||||
@course = @attachment.container.board.course
|
||||
else
|
||||
unless @attachment.container_type == 'Bid' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo' || @attachment.container_type == 'Softapplication' || @attachment.container_type == 'PhoneAppVersion' || @attachment.container_type == 'StudentWorksScore'|| @attachment.container_type == 'StudentWorks'
|
||||
unless @attachment.container_type == 'Bid' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo' || @attachment.container_type == 'Softapplication' || @attachment.container_type == 'PhoneAppVersion' || @attachment.container_type == 'StudentWorksScore'|| @attachment.container_type == 'StudentWork'
|
||||
@project = @attachment.project
|
||||
end
|
||||
end
|
||||
|
|
|
@ -334,9 +334,8 @@ class HomeworkAttachController < ApplicationController
|
|||
@homework.name = name
|
||||
@homework.description = description
|
||||
@homework.project_id = params[:project_id] || 0
|
||||
if params[:attachments]
|
||||
@homework.save_attachments(params[:attachments])
|
||||
end
|
||||
render_attachment_warning_if_needed(@homework)
|
||||
if @homework.save
|
||||
respond_to do |format|
|
||||
format.html { redirect_to course_for_bid_url @homework.bid }
|
||||
|
|
|
@ -5,7 +5,7 @@ class HomeworkCommonController < ApplicationController
|
|||
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment]
|
||||
|
||||
def index
|
||||
homeworks = @course.homework_commons
|
||||
homeworks = @course.homework_commons.order("created_at desc")
|
||||
@is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course))
|
||||
@is_student = User.current.logged? && (User.current.admin? || (User.current.member_of_course?(@course) && !@is_teacher))
|
||||
@homeworks = paginateHelper homeworks,20
|
||||
|
@ -17,14 +17,14 @@ class HomeworkCommonController < ApplicationController
|
|||
def new
|
||||
@homework = HomeworkCommon.new
|
||||
@homework.safe_attributes = params[:homework_common]
|
||||
@homework.late_penalty = 2
|
||||
@homework.late_penalty = 0
|
||||
@homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||
@homework.publish_time = Time.now.strftime('%Y-%m-%d')
|
||||
|
||||
#匿评作业相关属性
|
||||
@homework_detail_manual = HomeworkDetailManual.new
|
||||
@homework_detail_manual.ta_proportion = 0.6
|
||||
@homework_detail_manual.absence_penalty = 2
|
||||
@homework_detail_manual.absence_penalty = 0
|
||||
@homework_detail_manual.evaluation_num = 3
|
||||
@homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
|
||||
@homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||
|
@ -101,6 +101,9 @@ class HomeworkCommonController < ApplicationController
|
|||
@homework_detail_manual.evaluation_num = params[:evaluation_num]
|
||||
@homework_detail_manual.absence_penalty = params[:absence_penalty]
|
||||
|
||||
@homework.save_attachments(params[:attachments])
|
||||
render_attachment_warning_if_needed(@homework)
|
||||
|
||||
if @homework.save && @homework_detail_manual.save
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
|
|
|
@ -3,7 +3,7 @@ module HomeworkCommonHelper
|
|||
#迟交扣分下拉框
|
||||
def late_penalty_option
|
||||
type = []
|
||||
for i in (1..5)
|
||||
for i in (0..5)
|
||||
option = []
|
||||
option << i
|
||||
option << i
|
||||
|
@ -29,7 +29,7 @@ module HomeworkCommonHelper
|
|||
#缺评扣分
|
||||
def absence_penalty_option
|
||||
type = []
|
||||
i = 1
|
||||
i = 0
|
||||
while i <= 5
|
||||
option = []
|
||||
option << i
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
<% if @is_destroy%>
|
||||
$("#attachment_<%= @attachment.id%>").remove();
|
||||
<%else%>
|
||||
var attachment_html_obj = $('#attachments_<%= j params[:attachment_id] %>');
|
||||
//modify by yutao 2015-5-14 当1个页面存在多个上传控件时此块代码存在bug 故改之 start
|
||||
var containerid=$('.remove-upload',attachment_html_obj).data('containerid');
|
||||
|
@ -24,3 +27,4 @@ if(containerid==undefined){
|
|||
}
|
||||
}
|
||||
//modify by yutao 2015-5-14 当1个页面存在多个上传控件时此块代码存在bug 故改之 end
|
||||
<% end%>
|
|
@ -1,24 +1,5 @@
|
|||
<style>
|
||||
table,tr,td{border:0; cellspacing:0; cellpadding:0;}
|
||||
ul,li{ list-style-type:none}
|
||||
.cl{ clear:both; overflow:hidden; }
|
||||
a{ text-decoration:none; text-align:center; }
|
||||
a:hover{ text-decoration:underline;}
|
||||
/**** 常用***/
|
||||
.f_l{ float:left;}
|
||||
.f_r{ float:right;}
|
||||
.b_lblue{ background:#64bdd9;}
|
||||
.b_dblue{ background:#55a1b9; cursor:pointer;}
|
||||
.f_b{ font-weight: bold;}
|
||||
.c_blue{ color:#64bdd9;}
|
||||
.c_grey{ color:#999999;}
|
||||
.c_grey02{ color:#666666;}
|
||||
.f_14{ font-size:14px;}
|
||||
.c_dblue{ color:#3e6d8e;}
|
||||
.w90{width:90px;}
|
||||
.ml10{margin-left:10px;}
|
||||
.ml5{margin-left:5px;}
|
||||
.b_grey{ background:#a3a3a3;}
|
||||
.c_blue02{ color:#15bcce; font-weight: bold;}
|
||||
.w280{ display:block; width:280px;float:left;}
|
||||
.w70{ display:block;width:70px; text-align:center; float:left;}
|
||||
|
@ -26,9 +7,6 @@
|
|||
.c_blue03{ color:#0d90c4;}
|
||||
|
||||
|
||||
/***弹框***/
|
||||
/*#popbox_tscore{width:480px;position:absolute;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}*/
|
||||
/*.alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;}*/
|
||||
.tscore_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; text-align: center; padding-top:5px;}
|
||||
.tscore_box{ width:350px; margin:15px auto;}
|
||||
.tscore_box li{ height:25px;}
|
||||
|
@ -40,11 +18,16 @@
|
|||
<ul class="tscore_box">
|
||||
<li ><span class="c_blue02 w280">作业名称</span><span class="c_blue02 w70">得分</span></li>
|
||||
<% @member_score.student_homework_score[0].each do |homework_score| %>
|
||||
|
||||
<li><span class="c_grey02 w280"><%= homework_score.name %></span><span class="c_red w70"><%= format("%0.2f",homework_score[:score].nil? ? 0 : homework_score[:score]) %></span></li>
|
||||
<li>
|
||||
<span class="c_grey02 w280">
|
||||
<%= homework_score.name %>
|
||||
</span>
|
||||
<span class="c_red w70">
|
||||
<%= format("%0.2f",homework_score[:score].nil? ? 0 : homework_score[:score]) %>
|
||||
</span>
|
||||
</li>
|
||||
<% end %>
|
||||
<li><span class="c_blue03 w280">作业积分(总得分)</span><span class="c_red w70"><%= @member_score.student_homework_score[1] %></span></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -6,8 +6,8 @@ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'courses/show_me
|
|||
showModal('ajax-modal', '400px');
|
||||
//$('#ajax-modal').css('height','569px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +
|
||||
"<a href='javascript:void(0)' onclick='hidden_homework_score_form();'><img src='/images/bid/close.png' width='26px' height='26px' style='margin-left: -30px;' /></a></span>");
|
||||
$('#ajax-modal').before("<span>" +
|
||||
"<a href='javascript:void(0)' onclick='hidden_homework_score_form();'><img src='/images/bid/close.png' width='26px' height='26px' style='margin-left: 375px;' /></a></span>");
|
||||
//$('#ajax-modal').parent().removeClass();
|
||||
$('#ajax-modal').parent().css("top","30%").css("left","40%").css("position","fixed");
|
||||
$('#ajax-modal').parent().addClass("new-watcher");
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="">
|
||||
<div class="mt5">
|
||||
<p class="f_l mb5 c_grey02">文件大小:<%= number_to_human_size(file.filesize) %></p>
|
||||
<%= link_to( l(:button_delete), attachment_path(file),
|
||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "f_r re_de") if delete_allowed && file.container_id == @course.id && file.container_type == "Course"%>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<p class="fl ml20 f14 mb10 c_orange">基本规则设置(总分为100分)</p>
|
||||
<div class="cl"></div>
|
||||
<ul class="ml10">
|
||||
<li>
|
||||
<li style="display: none;">
|
||||
<label class="label02">迟交扣分: </label>
|
||||
<%= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %>
|
||||
<span class="fl mt5"> 分</span>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<div class="cl"></div>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<li style="display: none;">
|
||||
<label class="label02">缺评扣分: </label>
|
||||
<%= select_tag :absence_penalty,options_for_select(absence_penalty_option,homework.homework_detail_manual.absence_penalty), {:class => "fl mb10 h26 w70"} %>
|
||||
<span class="fl mt5"> 分</span>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<%= render :partial => 'student_work/student_work_attachment_form', :locals => {:work => work,:score => score} %>
|
||||
</div>
|
||||
<%end%>
|
||||
<a href="javascript:void(0);" class="blue_n_btn fr" onclick="$(this).parent().parent().submit();">提交</a>
|
||||
<a href="javascript:void(0);" class="blue_n_btn fr evaluation_submit" onclick="$(this).parent().parent().submit();">提交</a>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end%>
|
|
@ -1,22 +1,21 @@
|
|||
<!-- 匿评作品列表,显示某一个作品的信息 -->
|
||||
<ul class="hwork_ul <%= cycle("b_grey", "") %>" id="student_work_<%= student_work.id%>">
|
||||
<% is_my_work = student_work.user == User.current%>
|
||||
<li style="min-height: 1px;width: 65px;">
|
||||
<li class="hwork_num">
|
||||
<% if is_my_work%>
|
||||
<% student_id = student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||
<%= link_to student_id,"javascript:void(0)",:class => "c_grey hwork_center",:title => student_id%>
|
||||
<% else%>
|
||||
<%= link_to "--", "javascript:void(0)",:class => "c_grey hwork_center"%>
|
||||
<span>
|
||||
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||
</span>
|
||||
<% end%>
|
||||
</li>
|
||||
<li>
|
||||
<li class="hwork_name">
|
||||
<% if is_my_work%>
|
||||
<%= link_to student_work.user.show_name,user_path(student_work.user),:class => "c_blue02 hwork_name",:title => student_work.user.show_name %>
|
||||
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name %>
|
||||
<% else%>
|
||||
<%= link_to "匿名","javascript:void(0)",:class => "c_blue02 hwork_name"%>
|
||||
<%= link_to "匿名","javascript:void(0)"%>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class=" hwork_tit_e" style="width: 440px">
|
||||
<li class=" hwork_tit_e" style="width: 410px">
|
||||
<%= link_to student_work.name, student_work_path(student_work),:remote => true, :title => student_work.name, :class => "c_blue02"%>
|
||||
</li>
|
||||
<% my_score = student_work_score(student_work,User.current) %>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<li class="w70 ">
|
||||
<span href="javascript:void(0);" class="c_dark f14 fb fl ml15 ">学号</span>
|
||||
<li class="hwork_num ">
|
||||
<span class="f14 f_b c_dark fl ">学号</span>
|
||||
</li>
|
||||
<li class="w70">
|
||||
<li class="hwork_name f14 fb c_dark">
|
||||
<span class="c_dark f14 fb fl ">学生姓名</span>
|
||||
</li>
|
||||
<li class="hwork_tit_e">
|
||||
|
|
|
@ -35,9 +35,9 @@
|
|||
<% end%>
|
||||
<li >
|
||||
<span class="tit_fb ">内容:</span>
|
||||
<p class="show_hwork_p break_word">
|
||||
<%= @work.description%>
|
||||
</p>
|
||||
<div class="show_hwork_p break_word">
|
||||
<%= textilizable @work.description%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li >
|
||||
|
@ -54,13 +54,13 @@
|
|||
|
||||
<% if @is_teacher || (@homework.homework_type == 1 && @homework.homework_detail_manual.comment_status == 2 && @work.user != User.current )%>
|
||||
<!-- 老师 || 匿评作业 && 开启匿评状态 && 不是当前用户自己的作品 -->
|
||||
<div id="add_student_score_<%= @work.id%>" class="mt10 ">
|
||||
<div id="add_student_score_<%= @work.id%>" class="mt10 evaluation">
|
||||
<%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
|
||||
</div>
|
||||
<% end%>
|
||||
</ul>
|
||||
|
||||
<div class="ping_box" id="score_list_<%= @work.id%>" style="<%= @work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
||||
<div class="ping_box mt10" id="score_list_<%= @work.id%>" style="<%= @work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
||||
<%@work.student_works_scores.order("created_at desc").each do |score|%>
|
||||
<div id="work_score_<%= score.id%>">
|
||||
<%= render :partial => 'student_work_score',:locals => {:score => score}%>
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
<!-- 作品列表,显示某一个作品的信息 -->
|
||||
<ul class="hwork_ul <%= cycle("b_grey", "") %>" id="student_work_<%= student_work.id%>">
|
||||
<li style="min-height: 1px;width: 65px;">
|
||||
<% student_id = student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||
<%= link_to student_id,"javascript:void(0)",:class => "c_grey hwork_center",:title => student_id%>
|
||||
<li class="hwork_num">
|
||||
<span>
|
||||
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to student_work.user.show_name,user_path(student_work.user),:class => "c_blue02 hwork_name",:title => student_work.user.show_name%>
|
||||
<li class=" hwork_name ">
|
||||
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name%>
|
||||
</li>
|
||||
<li class=" hwork_tit">
|
||||
<%= link_to student_work.name, student_work_path(student_work),:remote => true,:title => student_work.name, :class => "c_blue02"%>
|
||||
</li>
|
||||
<li class=" hwork_code <%= student_work.teacher_score.nil? ? 'c_grey' : 'c_red'%>">
|
||||
<li class=" hwork_code <%= student_work.teacher_score.nil? ? 'c_grey' : 'c_red'%> mr18">
|
||||
<%= student_work.teacher_score.nil? ? "--" : format("%.2f",student_work.teacher_score)%>
|
||||
</li>
|
||||
<li class=" hwork_code <%= student_work.teaching_asistant_score.nil? ? 'c_grey' : 'c_red'%>">
|
||||
<li class=" hwork_code <%= student_work.teaching_asistant_score.nil? ? 'c_grey' : 'c_red'%> mr18">
|
||||
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.2f",student_work.teaching_asistant_score)%>
|
||||
</li>
|
||||
<li class=" hwork_code02 <%= student_work.student_score.nil? ? 'c_grey' : 'c_red'%> student_score_info">
|
||||
<li class=" hwork_code02 <%= student_work.student_score.nil? ? 'c_grey' : 'c_red'%> mr18 student_score_info" >
|
||||
<%= student_work.student_score.nil? ? "--" : format("%.2f",student_work.student_score)%>
|
||||
<% unless student_work.student_score.nil?%>
|
||||
<span class="c_blue">
|
||||
|
@ -30,7 +31,7 @@
|
|||
</div>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class=" hwork_code02 <%= student_work.final_score.nil? ? 'c_grey' : 'c_red'%>">
|
||||
<li class=" hwork_code <%= student_work.final_score.nil? ? 'c_grey' : 'c_red'%>">
|
||||
<%= student_work.final_score.nil? ? "--" : format("%.2f",student_work.final_score)%>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
<li class="w70 ">
|
||||
<span href="javascript:void(0);" class="c_dark f14 fb fl ">学号</span>
|
||||
<li class="hwork_num ">
|
||||
<a href="javascript:void(0);" class=" f14 f_b c_dark fl" >学号</a>
|
||||
</li>
|
||||
<li class="w70">
|
||||
<span class="c_dark f14 fb fl ">学生姓名</span>
|
||||
<li class=" hwork_name f14 fb c_dark">
|
||||
学生姓名
|
||||
</li>
|
||||
<li class="hwork_tit">
|
||||
<span class="c_dark f14 fb fl">作品名称</span>
|
||||
</li>
|
||||
<li class="w70 mr5" >
|
||||
<%= link_to "教师评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "c_dark f14 fb fl"%>
|
||||
<li class="mr5 w70">
|
||||
<%= link_to "教师评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl hwork_code"%>
|
||||
<% if @show_all && @order == "teacher_score"%>
|
||||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="w70 mr5">
|
||||
<%= link_to "教辅评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "c_dark f14 fb fl"%>
|
||||
<li class="mr5 w70">
|
||||
<%= link_to "教辅评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl hwork_code"%>
|
||||
<% if @show_all && @order == "teaching_asistant_score"%>
|
||||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="w60 mr5 ml10">
|
||||
<%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "c_dark f14 fb fl"%>
|
||||
<li class="mr5 ml15 w40">
|
||||
<%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||
<% if @show_all && @order == "student_score"%>
|
||||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="w40 ml10" id="final_sort">
|
||||
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "final_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "c_dark f14 fb fl"%>
|
||||
<li class="ml30">
|
||||
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "final_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||
<% if @show_all && @order == "final_score"%>
|
||||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||
<% end%>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<% for attachment in attachments %>
|
||||
<% attachments.each_with_index do |attachment,i| %>
|
||||
<div id="attachment_<%= attachment.id%>">
|
||||
<%= link_to_short_attachment attachment, :class => 'link_file', :download => true -%>
|
||||
<%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload', :confirm => l(:text_are_you_sure)) if attachment.id && User.current == attachment.author %>
|
||||
<span class="ml5">(<%= number_to_human_size attachment.filesize %>)</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
|
|
@ -36,6 +36,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);">
|
||||
<a class="student_work_search fl" onclick="SearchByName($(this).prev(),'<%= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)">搜索</a>
|
||||
<% end%>
|
||||
<% if @is_teacher%>
|
||||
<div class="fr">
|
||||
|
|
|
@ -112,7 +112,7 @@ zh:
|
|||
field_project: 项目
|
||||
field_issue: 问题
|
||||
|
||||
field_notes: 说明
|
||||
field_notes: 内容
|
||||
field_is_closed: 已关闭的问题
|
||||
field_is_default: 默认值
|
||||
|
||||
|
|
|
@ -793,6 +793,10 @@ function SearchByName(obj,url,event)
|
|||
location.href = url + "&name=" + obj.val();
|
||||
}
|
||||
}
|
||||
function SearchByName(obj,url)
|
||||
{
|
||||
location.href = url + "&name=" + obj.val();
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#about_project label").eq(1).remove();
|
||||
|
|
|
@ -630,14 +630,17 @@ a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;}
|
|||
.w300{ width:300px;}
|
||||
.w80{ width:80px;}
|
||||
.t_c{ text-align:center;}
|
||||
.hwork_tit{ width:240px; float:left; }
|
||||
.hwork_tit a{ width:255px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||
.hwork_tit_e{ width:440px; float:left; }
|
||||
.hwork_tit_e a{ width:455px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||
.hwork_code{ width:60px; text-align:center; margin-right:15px;}
|
||||
.hwork_code02{ width:60px; text-align:center; margin-right:10px;}
|
||||
|
||||
.hwork_tit{ width:210px; float:left; }
|
||||
.hwork_tit a{ width:205px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||
.hwork_code{ width:56px; text-align:center; }
|
||||
.hwork_code02{ width:60px; text-align:center; }
|
||||
.hwork_tit_e{ width:420px; float:left; }
|
||||
.hwork_tit_e a{ width:405px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||
.hwork_num{ width:90px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;min-height: 1px;}
|
||||
.mr18{ margin-right:18px;}
|
||||
a.hwork_center{ display:block; width:60px; margin-right:5px;overflow: hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
a.hwork_name{ display:block;width:65px; margin-right:10px;overflow: hidden;white-space: nowrap; text-overflow:ellipsis;min-height: 1px;}
|
||||
.hwork_name{ display:block;width:80px; overflow: hidden;white-space: nowrap; text-overflow:ellipsis;min-height: 1px;}
|
||||
.show_hwork{ border:2px solid #64bdd9; width:646px; padding:10px; color:#666666; padding-bottom:0px; }
|
||||
.show_hwork ul li{ margin-bottom:5px;}
|
||||
.show_hwork_arrow{ position:relative; top:2px; left:25px;background:url(../images/course/arrow_up.jpg) 0 0 no-repeat; width:20px; height:11px;}
|
||||
|
@ -656,7 +659,6 @@ 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;}
|
||||
.li_min_search{ float:right; margin-right:-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;}
|
||||
/*返回顶部*/
|
||||
|
@ -671,6 +673,9 @@ input#score{ width:40px;}
|
|||
.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;top:0;height:100%;background:#64bdd9;left:0;}
|
||||
|
||||
.filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px;}
|
||||
.evaluation{position: relative;}
|
||||
.evaluation_submit{position: absolute;right: 0px;bottom: 5px;}
|
||||
.student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; }
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ table{ background:#fff;}
|
|||
.no_line{ border-bottom:none;}
|
||||
.line{border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;}
|
||||
.no_border{ border:none;}
|
||||
.min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/new_project/public_icon.png) 135px -193px no-repeat; cursor:pointer;}
|
||||
.min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/new_project/public_icon.png) 135px -193px no-repeat;}
|
||||
|
||||
/* font & color */
|
||||
h2{ font-size:18px; color:#15bccf;}
|
||||
|
@ -59,6 +59,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
|||
.ml10{ margin-left:10px;}
|
||||
.ml15{ margin-left:15px;}
|
||||
.ml20{ margin-left:20px;}
|
||||
.ml35{margin-left: 35px;}
|
||||
.ml40{ margin-left:40px;}
|
||||
.ml45{ margin-left:45px;}
|
||||
.ml55{ margin-left:55px;}
|
||||
|
@ -86,6 +87,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
|||
.mb20{ margin-bottom:20px;}
|
||||
.pl15{ padding-left:15px;}
|
||||
.w20{ width:20px;}
|
||||
.w40{width: 40px;}
|
||||
.w45{ width: 45px;}
|
||||
.w60{ width:60px;}
|
||||
.w70{ width:70px;}
|
||||
|
|
Loading…
Reference in New Issue