Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
daiao 2017-01-13 18:53:22 +08:00
commit 3fe99bb065
24 changed files with 2106 additions and 2124 deletions

View File

@ -198,9 +198,9 @@ class HomeworkCommonController < ApplicationController
@hw_status = params[:hw_status].to_i
if params[:is_manage] == "1"
redirect_to manage_or_receive_homeworks_user_path(User.current.id)
redirect_to user_manage_homeworks_user_path(User.current.id)
elsif params[:is_manage] == "2"
redirect_to my_homeworks_user_path(User.current.id)
redirect_to user_receive_homeworks_user_path(User.current.id)
elsif @hw_status == 1
redirect_to user_course_community_path(User.current.id)
elsif @hw_status == 2

View File

@ -778,7 +778,7 @@ class StudentWorkController < ApplicationController
end
end
end
redirect_to student_homeworks_user_path(User.current.id)
redirect_to student_work_index_path(:homework => @homework.id)
end
def retry_work

File diff suppressed because it is too large Load Diff

View File

@ -242,7 +242,8 @@ class WorksController < ApplicationController
def set_score_rule
# 未启动在线评审时才能更改评审参数
if @contestwork.work_status < 3
@contestwork.online_evaluation = params[:online_evaluation] ? 1 : 0
@contestwork.online_evaluation = params[:online_evaluation].to_i ? 1 : 0
@contestwork.save
# 如果开启在线评审
if params[:online_evaluation]

View File

@ -2906,8 +2906,7 @@ module ApplicationHelper
# 用户竞赛总数
def user_contest_count
count = @user.favorite_contests.visible.where("is_delete =?", 0).count
return count
@user.favorite_contests.visible.where("is_delete =?", 0).count
end
# 用户项目总数
@ -2946,14 +2945,12 @@ module ApplicationHelper
# 用户发布的issue数
def issues_author_is_self_count
@issues = Issue.where( :author_id => @user.id )
@issues_author_is_self_count = @issues.count
Issue.where(:author_id => @user.id).count
end
# 用户收到的issue数
def issues_assigned_is_self_count
@issues = Issue.where( :assigned_to_id => @user.id )
@issues_assigned_is_self_count = @issues.count
Issue.where( :assigned_to_id => @user.id ).count
end
def get_user_roll user

View File

@ -21,25 +21,25 @@
<th style="width: 40px;">
序号
</th>
<th style="width: 200px;">
<th style="width: 180px;">
竞赛
</th>
<th style="width: 40px;">
公开
</th>
<th style="width: 100px;">
<th style="width: 80px;">
创建者
</th>
<th style="width: 30px;">
<th style="width: 40px;">
成员数
</th>
<th style="width: 30px;">
<th style="width: 40px;">
提交数
</th>
<th style="width: 70px;">
<th style="width: 80px;">
创建于
</th>
<th style="width: 120px;">
<th style="width: 130px;">
最新动态时间
</th>
</tr>

View File

@ -1,12 +1,17 @@
<div id="popbox02">
<div class="ni_con">
<div><p align='center' style='margin-top: 35px'>您已提交过作品,请不要重复提交,如果想修改作品请点击编辑。</p></div>
<div id="muban_popup_box" style="width:500px;">
<div class="muban_popup_top">
<h3 class="fl">提示</h3>
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
<div class="cl"></div>
</div>
<div class="muban_popup_con clear">
<div><p align='center' style='margin-top: 30px'>您已提交过作品,请不要重复提交,如果想修改作品请点击编辑。</p></div>
<div class="cl"></div>
<div class="ni_btn mt10">
<a href="javascript:" class="tijiao" onclick="clickOK();" style="margin-bottom: 15px;margin-top:15px;" >
<a href="javascript:" class="fr sy_btn_blue mr30" onclick="clickOK();" style="margin-bottom: 15px;margin-top:15px;" >
编&nbsp;&nbsp;辑
</a>
<a href="javascript:" class="tijiao" onclick="clickCanel();" style="margin-bottom: 15px;margin-top:15px;" >
<a href="javascript:" class="fr sy_btn_grey mr5" onclick="clickCanel();" style="margin-bottom: 15px;margin-top:15px;" >
取&nbsp;&nbsp;消
</a>
</div>

View File

@ -1,39 +1,49 @@
<div id="popbox02">
<div class="ni_con">
<span class="f16 fontBlue fb">请您确认刚刚上传的作品信息</span>
<p class="f14 mt5 break_word">
<span class="fb">作品名称:</span><%=@student_work.name%>
</p>
<div class="f14 mt5 break_word" style="max-width: 425px; color:#808181; max-height:300px; overflow-x:hidden; overflow-y: auto;">
<div class="fb fl dis">作品描述:</div>
<div class="upload_img fl" style="max-width: 330px;"><%=@student_work.description.html_safe %></div>
<div class="cl"></div>
</div>
<p class="mt5">
<span class="fl fb mr30">附</span><span class="fb fl">件:</span>
<% if @student_work.attachments.empty? %>
<span class="fl c_red"><%= "无附件"%></span>
<% else %>
<div class="fl grey_c">
<% @student_work.attachments.each_with_index do |attachment,i| %>
<div id="attachment_<%= attachment.id%>">
<%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
<%= link_to('&nbsp;'.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %>
<span class="ml5 fl">(<%= number_to_human_size attachment.filesize %>)</span>
<div class="cl"></div>
</div>
<% end -%>
<%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
</div>
<% end %>
<div id="muban_popup_box" style="width:500px;">
<div class="muban_popup_top">
<h3 class="fl">作品确认</h3>
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
<div class="cl"></div>
</div>
<div class="muban_popup_con clear">
<div class="clear mt15 ml20" style="color:#808181;">
<span class="f16 fontBlue fb">请您确认刚刚上传的作品信息</span>
<p class="f14 mt5 break_word">
<span class="fb">作品名称:</span><%= @student_work.name %>
</p>
<div class="f14 mt5 break_word" style="max-width: 425px; max-height:300px; overflow-x:hidden; overflow-y: auto;">
<div class="fb fl dis">作品描述:</div>
<div class="upload_img fl" style="max-width: 330px;"><%= @student_work.description.html_safe %></div>
<div class="cl"></div>
</div>
<p class="mt5">
<span class="fl fb mr30">附</span><span class="fb fl">件:</span>
<% if @student_work.attachments.empty? %>
<span class="fl c_red">无附件</span>
<% else %>
<div class="fl grey_c">
<% @student_work.attachments.each_with_index do |attachment, i| %>
<div id="attachment_<%= attachment.id %>">
<%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
<%= link_to('&nbsp;'.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %>
<span class="ml5 fl">(<%= number_to_human_size attachment.filesize %>)</span>
<div class="cl"></div>
</div>
<% end -%>
<%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
</div>
<% end %>
</p>
<div class="cl"></div>
<div class="ni_btn mt10">
<a href="javascript:" class="tijiao" onclick="clickOK();" style="margin-bottom: 15px; margin-left: 55px;" >
<a href="javascript:" class="sy_btn_blue" onclick="clickOK();" style="margin-left: 55px;">
确&nbsp;&nbsp;定
</a>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">

View File

@ -1,40 +1,50 @@
<div id="popbox02">
<div class="ni_con">
<span class="f16 fontBlue fb">请您确认刚刚上传的作品信息</span>
<p class="f14 mt5 break_word">
<span class="fb">作品名称:</span><%=@student_work.name%>
</p>
<div class="f14 mt5 break_word" style="max-width: 425px; color:#808181; max-height:300px; overflow-x:hidden; overflow-y: auto;">
<div class="fb fl dis">作品描述:</div>
<div id="worksDescription" class="upload_img fl" style="max-width: 330px;"><%=@student_work.description.html_safe %></div>
<div class="cl"></div>
</div>
<p class="mt5">
<span class="fl fb mr30">附</span><span class="fb fl">件:</span>
<% if @student_work.attachments.empty? %>
<span class="fl c_red"><%= "无附件"%></span>
<% else %>
<div class="fl grey_c">
<% @student_work.attachments.each_with_index do |attachment,i| %>
<div id="attachment_<%= attachment.id%>">
<%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
<%= link_to('&nbsp;'.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %>
<span class="ml5 fl">(<%= number_to_human_size attachment.filesize %>)</span>
<div class="cl"></div>
</div>
<% end -%>
<%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
</div>
<% end %>
<div id="muban_popup_box" style="width:500px;">
<div class="muban_popup_top">
<h3 class="fl">作品确认</h3>
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
<div class="cl"></div>
</div>
<div class="muban_popup_con clear">
<div class="clear mt15 ml20" style="color:#808181;">
<span class="f16 fontBlue fb">请您确认刚刚上传的作品信息</span>
<p class="f14 mt5 break_word">
<span class="fb">作品名称:</span><%= @student_work.name %>
</p>
<div class="f14 mt5 break_word" style="max-width: 425px; color:#808181; max-height:300px; overflow-x:hidden; overflow-y: auto;">
<div class="fb fl dis">作品描述:</div>
<div id="worksDescription" class="upload_img fl" style="max-width: 330px;"><%= @student_work.description.html_safe %></div>
<div class="cl"></div>
</div>
<p class="mt5">
<span class="fl fb mr30">附</span><span class="fb fl">件:</span>
<% if @student_work.attachments.empty? %>
<span class="fl c_red"><%= "无附件" %></span>
<% else %>
<div class="fl grey_c">
<% @student_work.attachments.each_with_index do |attachment, i| %>
<div id="attachment_<%= attachment.id %>">
<%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
<%= link_to('&nbsp;'.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %>
<span class="ml5 fl">(<%= number_to_human_size attachment.filesize %>)</span>
<div class="cl"></div>
</div>
<% end -%>
<%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
</div>
<% end %>
</p>
<div class="cl"></div>
<div class="ni_btn mt10">
<a href="javascript:" class="tijiao" onclick="clickOK();" style="margin-bottom: 15px;margin-top:15px;" >
<a href="javascript:" class="fr sy_btn_blue mr45" onclick="clickOK();" style="margin-bottom: 15px;margin-top:15px;">
确&nbsp;定
</a>
<%= link_to("重 试", retry_work_contestant_work_path(@student_work.id),:class => "tijiao",:style =>"margin-bottom: 15px;margin-top:15px;",:remote => true)%>
</div>
<%= link_to("重 试", retry_work_contestant_work_path(@student_work.id), :class => "fr sy_btn_blue mr5", :style => "margin-bottom: 15px;margin-top:15px;", :remote => true) %>
</div>
</div>
</div>
</div>
<script type="text/javascript">

View File

@ -1,21 +1,12 @@
hideModal();
<% if @has_commit %>
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'has_commit_work') %>');
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
var htmlvalue = '<%= escape_javascript(render :partial => 'contestant_works/has_commit_work') %>';
pop_box_new(htmlvalue, 500, 163);
<% elsif @submit_result%>
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'work_information') %>');
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='/student_work/"+ <%=@student_work.id%> +"/retry_work' class='upload_btn' data-remote='true'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
var htmlvalue = '<%= escape_javascript(render :partial => 'contestant_works/work_information') %>';
pop_box_new(htmlvalue, 500, 400);
<% else %>
window.location.href = '<%= new_contestant_work_path(:work => @contestwork.id)%>';
window.location.href = '<%= new_contestant_work_path(:work => @contestwork.id)%>';
<% end %>
function clickCanel() {

View File

@ -21,28 +21,6 @@
});
<% end %>
// //快速创建项目的弹框
// function new_project(){
// $('#ajax-modal').html('<%#= escape_javascript(render :partial => 'student_work/new_project') %>');
// showModal('ajax-modal', '800px');
// $('#ajax-modal').siblings().remove();
// $('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
// "<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
// $('#ajax-modal').parent().css("top","30%").css("left","20%").css("position","fixed").css("border","3px solid #269ac9");
// }
// // 点击 checkbox选中引用的资源的时候保存该资源的id到session里去
// function store_seleted_resource(dom){
// if(dom.attr('checked') == 'checked' ){
// $.get(
// '<%#= store_selected_resource_user_path(User.current) %>'+'?save=y&res_id='+dom.val()
// )
// }else {
// $.get(
// '<%#= store_selected_resource_user_path(User.current) %>'+'?save=n&res_id='+dom.val()
// )
// }
// }
// 添加组成员
function show_group_member() {
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'choose_group_member',:locals => {:homework=>@contestwork}) %>');

View File

@ -1,11 +1,7 @@
hideModal();
<% if @submit_result%>
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'work_edit_information') %>');
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
var htmlvalue = '<%= escape_javascript(render :partial => 'contestant_works/work_edit_information') %>';
pop_box_new(htmlvalue, 500, 400);
<% else %>
window.location.href = '<%= edit_contestant_work_path(@work)%>';
<% end %>

View File

@ -20,9 +20,9 @@
}
function cancel_edit(){
<% if @is_manage.to_i == 1 %>
window.location.href='<%=manage_or_receive_homeworks_user_path(User.current.id) %>';
window.location.href='<%=user_manage_homeworks_user_path(User.current.id) %>';
<% elsif @is_manage.to_i == 2 %>
window.location.href='<%=my_homeworks_user_path(User.current.id) %>';
window.location.href='<%=user_receive_homeworks_user_path(User.current.id) %>';
<% elsif @hw_status == 3 %>
window.location.href='<%=homework_common_index_path(:course => @course.id) %>';
<% elsif @hw_status == 1 %>

View File

@ -1,7 +1,7 @@
<% if @homework.homework_type == 2 %>
<% if @homework.anonymous_comment == 0 %>
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_pro',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
pop_box_new(htmlvalue, 630, 758);
pop_box_new(htmlvalue, 630, 914);
<% else %>
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_pro_anon',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
pop_box_new(htmlvalue, 530, 404);
@ -9,7 +9,7 @@
<% else %>
<% if @homework.anonymous_comment == 0 %>
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_non_pro',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
pop_box_new(htmlvalue, 630, 758);
pop_box_new(htmlvalue, 630, 885);
<% else %>
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_none_pro_anon',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
pop_box_new(htmlvalue, 530, 332);

View File

@ -94,10 +94,10 @@
</div>
<div class="navHomepageNews" id="user_messages">
<%= link_to "", user_message_path(User.current), :class => "homepageNewsIcon", :target => "_Blank", :title => "您的所有消息" %>
<%= link_to "", user_path(User.current), :class => "homepageNewsIcon", :target => "_Blank", :title => "您的所有消息" %>
<% new_message_count = User.current.count_new_message.to_i %>
<% if new_message_count > 0 %>
<div ><%= link_to new_message_count, user_message_path(User.current), :class => "newsActive", :target => "_Blank" %></div>
<div ><%= link_to new_message_count, user_path(User.current), :class => "newsActive", :target => "_Blank" %></div>
<% end %>
<%#= link_to User.current.count_new_message, user_message_path(User.current), :class => "homepageNewsIcon" %>
<div class="shadowbox_news undis" id="user_messages_list">

View File

@ -37,27 +37,6 @@
$("#relateProject,.relatePInfo").mouseout(function(){
$(".relatePInfo").css("display","none");
});
// $(".homepagePostPortrait").mouseover(function(){
// onImage = true;
// $(this).children(".userCard").css("display","block");
// });
// $(".homepagePostPortrait").mouseout(function(){
// var cur = $(this);
// onImage = false;
// setTimeout(function(){
// if (onUserCard == false && onImage == false) {
// $(cur).children(".userCard").css("display","none");
// }
// },500);
// });
// $(".userCard").mouseover(function(){
// onUserCard = true;
// $(this).css("display","block");
// });
// $(".userCard").mouseout(function(){
// onUserCard = false;
// $(this).css("display","none");
// });
$(".coursesLineGrey").mouseover(function(){
$(this).css("color","#ffffff");
})
@ -102,7 +81,7 @@
<div class="homepageContent">
<div class="homepageLeft mt10" id="LSide">
<div class="user_leftinfo mb10">
<% if User.current.logged? && User.current == @user%>
<% if User.current.logged? && User.current == @user %>
<div class="pr" style="width: 80px; margin:0 auto;">
<%= link_to image_tag(url_to_avatar(@user),width:"74", height: "74", :id => 'nh_source_tx'),
my_clear_user_avatar_temp_path, :class => "user_leftinfo_img", :remote => true %>

View File

@ -1,16 +1,21 @@
<div id="popbox02">
<div class="ni_con">
<div><p align='center' style='margin-top: 35px'>您已提交过作品,请不要重复提交,如果想修改作品请点击编辑。</p></div>
<div id="muban_popup_box" style="width:500px;">
<div class="muban_popup_top">
<h3 class="fl">提示</h3>
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
<div class="cl"></div>
</div>
<div class="muban_popup_con clear">
<div><p align='center' style='margin-top: 30px'>您已提交过作品,请不要重复提交,如果想修改作品请点击编辑。</p></div>
<div class="cl"></div>
<div class="ni_btn mt10">
<a href="javascript:" class="tijiao" onclick="clickOK();" style="margin-bottom: 15px;margin-top:15px;" >
<a href="javascript:" class="fr sy_btn_blue mr30" onclick="clickOK();" style="margin-bottom: 15px;margin-top:15px;" >
编&nbsp;&nbsp;辑
</a>
<a href="javascript:" class="tijiao" onclick="clickCanel();" style="margin-bottom: 15px;margin-top:15px;" >
<a href="javascript:" class="fr sy_btn_grey mr5" onclick="clickCanel();" style="margin-bottom: 15px;margin-top:15px;" >
取&nbsp;&nbsp;消
</a>
</div>
</div>
</div>
</div>
<script type="text/javascript">

View File

@ -1,39 +1,49 @@
<div id="popbox02">
<div class="ni_con">
<span class="f16 fontBlue fb">请您确认刚刚上传的作品信息</span>
<p class="f14 mt5">
<span class="fb">作品名称:</span><%=@student_work.name%>
</p>
<div class="f14 mt5 break_word" style="max-width: 425px; color:#808181; max-height:300px; overflow-x:hidden; overflow-y: auto;">
<div class="fb fl dis">作品描述:</div>
<div class="upload_img fl" style="max-width: 330px;"><%=@student_work.description.html_safe %></div>
<div class="cl"></div>
</div>
<p class="mt5">
<span class="fl fb mr30">附</span><span class="fb fl">件:</span>
<% if @student_work.attachments.empty? %>
<span class="fl c_red"><%= "无附件"%></span>
<% else %>
<div class="fl grey_c">
<% @student_work.attachments.each_with_index do |attachment,i| %>
<div id="attachment_<%= attachment.id%>">
<%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
<%= link_to('&nbsp;'.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %>
<span class="ml5 fl">(<%= number_to_human_size attachment.filesize %>)</span>
<div class="cl"></div>
</div>
<% end -%>
<%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
</div>
<% end %>
<div id="muban_popup_box" style="width:500px;">
<div class="muban_popup_top">
<h3 class="fl">作品确认</h3>
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
<div class="cl"></div>
</div>
<div class="muban_popup_con clear">
<div class="clear mt15 ml20" style="color:#808181;">
<span class="f16 fontBlue fb">请您确认刚刚上传的作品信息</span>
<p class="f14 mt5">
<span class="fb">作品名称:</span><%= @student_work.name %>
</p>
<div class="f14 mt5 break_word" style="max-width: 425px; color:#808181; max-height:300px; overflow-x:hidden; overflow-y: auto;">
<div class="fb fl dis">作品描述:</div>
<div class="upload_img fl" style="max-width: 330px;"><%= @student_work.description.html_safe %></div>
<div class="cl"></div>
</div>
<p class="mt5">
<span class="fl fb mr30">附</span><span class="fb fl">件:</span>
<% if @student_work.attachments.empty? %>
<span class="fl c_red">无附件</span>
<% else %>
<div class="fl grey_c">
<% @student_work.attachments.each_with_index do |attachment, i| %>
<div id="attachment_<%= attachment.id %>">
<%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
<%= link_to('&nbsp;'.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %>
<span class="ml5 fl">(<%= number_to_human_size attachment.filesize %>)</span>
<div class="cl"></div>
</div>
<% end -%>
<%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
</div>
<% end %>
</p>
<div class="cl"></div>
<div class="ni_btn mt10">
<a href="javascript:" class="tijiao" onclick="clickOK();" style="margin-bottom: 15px; margin-left: 55px;" >
<a href="javascript:" class="sy_btn_blue" onclick="clickOK();" style="margin-left: 55px;">
确&nbsp;&nbsp;定
</a>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">

View File

@ -1,38 +1,48 @@
<div id="popbox02">
<div class="ni_con">
<span class="f16 fontBlue fb">请您确认刚刚上传的作品信息</span>
<p class="f14 mt5">
<span class="fb">作品名称:</span><%=@student_work.name%>
</p>
<div class="f14 mt5 break_word" style="max-width: 425px; color:#808181; max-height:300px; overflow-x:hidden; overflow-y: auto;">
<div class="fb fl dis">作品描述:</div>
<div id="worksDescription" class="upload_img fl" style="max-width: 330px;"><%=@student_work.description.html_safe %></div>
<div class="cl"></div>
</div>
<p class="mt5">
<span class="fl fb mr30">附</span><span class="fb fl">件:</span>
<% if @student_work.attachments.empty? %>
<span class="fl c_red"><%= "无附件"%></span>
<% else %>
<div class="fl grey_c">
<% @student_work.attachments.each_with_index do |attachment,i| %>
<div id="attachment_<%= attachment.id%>">
<%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
<%= link_to('&nbsp;'.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %>
<span class="ml5 fl">(<%= number_to_human_size attachment.filesize %>)</span>
<div class="cl"></div>
</div>
<% end -%>
<%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
</div>
<% end %>
</p>
<div id="muban_popup_box" style="width:500px;">
<div class="muban_popup_top">
<h3 class="fl">作品确认</h3>
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
<div class="cl"></div>
<div class="ni_btn mt10">
<a href="javascript:" class="tijiao" onclick="clickOK();" style="margin-bottom: 15px;margin-top:15px;" >
确&nbsp;定
</a>
<%= link_to("重 试", retry_work_student_work_path(@student_work.id),:class => "tijiao",:style =>"margin-bottom: 15px;margin-top:15px;",:remote => true)%>
</div>
<div class="muban_popup_con clear">
<div class="clear mt15 ml20" style="color:#808181;">
<span class="f16 fontBlue fb">请您确认刚刚上传的作品信息</span>
<p class="f14 mt5">
<span class="fb">作品名称:</span><%= @student_work.name %>
</p>
<div class="f14 mt5 break_word" style="max-width: 425px; color:#808181; max-height:300px; overflow-x:hidden; overflow-y: auto;">
<div class="fb fl dis">作品描述:</div>
<div id="worksDescription" class="upload_img fl" style="max-width: 330px;"><%= @student_work.description.html_safe %></div>
<div class="cl"></div>
</div>
<p class="mt5">
<span class="fl fb mr30">附</span><span class="fb fl">件:</span>
<% if @student_work.attachments.empty? %>
<span class="fl c_red"><%= "无附件" %></span>
<% else %>
<div class="fl grey_c">
<% @student_work.attachments.each_with_index do |attachment, i| %>
<div id="attachment_<%= attachment.id %>">
<%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
<%= link_to('&nbsp;'.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %>
<span class="ml5 fl">(<%= number_to_human_size attachment.filesize %>)</span>
<div class="cl"></div>
</div>
<% end -%>
<%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
</div>
<% end %>
</p>
<div class="cl"></div>
<div class="ni_btn mt10">
<a href="javascript:" class="fr sy_btn_blue mr45" onclick="clickOK();" style="margin-bottom: 15px;margin-top:15px;">
确&nbsp;定
</a>
<%= link_to("重 试", retry_work_student_work_path(@student_work.id), :class => "fr sy_btn_blue mr5", :style => "margin-bottom: 15px;margin-top:15px;", :remote => true) %>
</div>
</div>
</div>
</div>

View File

@ -1,19 +1,10 @@
hideModal();
<% if @has_commit %>
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/has_commit_work') %>');
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
var htmlvalue = '<%= escape_javascript(render :partial => 'student_work/has_commit_work') %>';
pop_box_new(htmlvalue, 500, 163);
<% elsif @submit_result%>
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/work_information') %>');
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='/student_work/"+ <%=@student_work.id%> +"/retry_work' class='upload_btn' data-remote='true'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
var htmlvalue = '<%= escape_javascript(render :partial => 'student_work/work_information') %>';
pop_box_new(htmlvalue, 500, 400);
<% else %>
window.location.href = '<%= new_student_work_url(:homework => @homework.id)%>';
<% end %>

View File

@ -1,11 +1,7 @@
hideModal();
<% if @submit_result%>
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/work_edit_information') %>');
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
var htmlvalue = '<%= escape_javascript(render :partial => 'student_work/work_edit_information') %>';
pop_box_new(htmlvalue, 500, 400);
<% else %>
window.location.href = '<%= edit_student_work_url(@work)%>';
<% end %>

View File

@ -1,8 +1,8 @@
<%# 系统消息总显示在最上面 %>
<%= render :partial => 'users/user_message_system' %>
<%= render :partial => 'users/user_message_system' if !@system_messages.nil? %>
<% message_alls.each do |ma| %>
<% ma = ma.try(:message) %>
<% ma = ma.try(:message) if ma.is_a?(MessageAll) %>
<% if ma.class == AtMessage && ma.at_valid? && ma.at_message %>
<%= render :partial => 'users/user_at_message', :locals => {:ma => ma} %>
<% end %>
@ -45,7 +45,11 @@
<% end %>
<ul class="pages" style="width: auto;display: table;margin-left: auto;margin-right: auto; padding-top: 10px">
<%= pagination_links_full @message_all_pages, @messages_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
<% if params[:action] == "unapproval_applied_list" %>
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
<% else %>
<%= pagination_links_full @message_all_pages, @messages_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
<% end %>
</ul>
<script>
$(function(){

View File

@ -185,7 +185,7 @@
</li>
<li class="homepageNewsPubType fl">
<%= link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="homepageNewsType fl">在线评审启动失败<font class="fr c_red">(评委数为0或作品数为0)</font></span>
<span class="homepageNewsType fl">在线评审启动失败<font class="c_red">(评委数为0或作品数为0)</font></span>
</li>
<li class="messageInformationContents">
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}"%>

View File

@ -76,7 +76,7 @@ function submit_set_score_rule(end_time){
function regex_evaluation_start(end_time){
var evaluation_start = $.trim($("#evaluation_start_time").val());
if(evaluation_start == ""){
$("#homework_evaluation_start_time").text("开启评日期不能为空");
$("#homework_evaluation_start_time").text("开启日期不能为空");
return false;
}
var end_time = new Date(end_time);
@ -85,7 +85,7 @@ function regex_evaluation_start(end_time){
$("#homework_evaluation_start_time").text("");
return true;
}else{
$("#homework_evaluation_start_time").text("开启匿评日期必须大于截止日期");
$("#homework_evaluation_start_time").text("开启评审日期必须大于关闭评审日期");
return false;
}
}
@ -95,7 +95,7 @@ function regex_evaluation_end(){
var evaluation_start = $.trim($("#evaluation_start_time").val());
var evaluation_end = $.trim($("#evaluation_end_time").val());
if(evaluation_end == ""){
$("#homework_evaluation_end_time").text("关闭评日期不能为空");
$("#homework_evaluation_end_time").text("关闭日期不能为空");
return true;
}
var evaluation_start_time = new Date(evaluation_start);
@ -104,7 +104,7 @@ function regex_evaluation_end(){
$("#homework_evaluation_end_time").text("");
return true;
}else{
$("#homework_evaluation_end_time").text("关闭评日期不能小于开启评日期");
$("#homework_evaluation_end_time").text("关闭日期不能小于开启评日期");
return false;
}
}
@ -116,7 +116,7 @@ function regex_evaluation_num(){
var evaluation_num = $.trim($("#evaluation_num").val());
var regex = /^\d+$/;
if(evaluation_num==""){
$("#evaluation_num_notice").text("评人数不能为空");
$("#evaluation_num_notice").text("人数不能为空");
return false;
}
else if(regex.test(evaluation_num)){
@ -134,13 +134,13 @@ function regex_evaluation_num(){
return true;
}
else{
$("#evaluation_num_notice").text("评人数必须为大于0");
$("#evaluation_num_notice").text("人数必须为大于0");
return false;
}
}
}
else{
$("#evaluation_num_notice").text("评人数只能为正整数");
$("#evaluation_num_notice").text("人数只能为正整数");
return false;
}
}