追加附件的调整
This commit is contained in:
parent
494946c70e
commit
9ca4001c8c
|
@ -1092,6 +1092,7 @@ class StudentWorkController < ApplicationController
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
@homework = @work.homework_common
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_student_work_project
|
def new_student_work_project
|
||||||
|
|
|
@ -121,13 +121,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
});
|
});
|
||||||
function show_upload(){
|
function show_upload(){
|
||||||
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'student_work/upload_attachment' ,:locals => {:work=>work})%>');
|
var htmlvalue = "<%= escape_javascript( render :partial => 'student_work/upload_attachment' ,:locals => {:work=>work})%>";
|
||||||
showModal('ajax-modal', '452px');
|
pop_box_new(htmlvalue, 500, 230);
|
||||||
$('#ajax-modal').siblings().remove();
|
|
||||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal();' style='margin-left: 435px;' class='resourceClose'></a>");
|
|
||||||
$('#ajax-modal').parent().css("top","40%").css("left","46%");
|
|
||||||
$('#ajax-modal').parent().addClass("resourceUploadPopup");
|
|
||||||
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
|
|
||||||
}
|
}
|
||||||
function regex_des() {
|
function regex_des() {
|
||||||
if ($.trim($("#attachment_des").val()) == "") {
|
if ($.trim($("#attachment_des").val()) == "") {
|
||||||
|
|
|
@ -1,31 +1,33 @@
|
||||||
<% revise_attachment = work.attachments.where("attachtype = 7").first %>
|
<% revise_attachment = work.attachments.where("attachtype = 7").first %>
|
||||||
<% if @homework.end_time < Date.today %>
|
<% if @homework.end_time < Date.today %>
|
||||||
<% if revise_attachment && @is_teacher %>
|
<% if revise_attachment && work.user != User.current %>
|
||||||
<div class="resubAtt mb15">
|
<div class="resubAtt mb15">
|
||||||
<span class="resubTitle">追加修订附件</span>
|
<span class="resubTitle">作业修订附件</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb10" id="revise_attachment_div_<%=revise_attachment.id %>">
|
<div class="mb10" id="revise_attachment_div_<%=revise_attachment.id %>">
|
||||||
<span class="tit_fb"> 追加附件:</span>
|
<span class="tit_fb"> 追加附件:</span>
|
||||||
<%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments.where("attachtype = 7"), :status => 2} %>
|
<%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments.where("attachtype = 7"), :status => 2} %>
|
||||||
<span class="tit_fb">追加时间:</span><%=format_time revise_attachment.created_on.to_s %> (<%=revise_attachment_status @homework,revise_attachment %>)<br />
|
|
||||||
<% unless revise_attachment.description == "" %>
|
<% unless revise_attachment.description == "" %>
|
||||||
<span class="tit_fb break_word">追加理由:</span><p class="showHworkP"><%=revise_attachment.description %></p>
|
<span class="tit_fb break_word">追加理由:</span><p class="showHworkP"><%=revise_attachment.description %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<div class="_notice_box ml5 text_c">注意:此处的附件是在作业截止日期过后提交的</div>
|
||||||
|
<div class="cl"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if work.user == User.current && !User.current.allowed_to?(:as_teacher, @homework.course) %>
|
<% if work.user == User.current && !User.current.allowed_to?(:as_teacher, @homework.course) %>
|
||||||
<div class="resubAtt mb15">
|
<div class="resubAtt mb15">
|
||||||
<span class="resubTitle">追加修订附件</span>
|
<span class="resubTitle">作业修订附件</span>
|
||||||
</div>
|
</div>
|
||||||
<% if revise_attachment %>
|
<% if revise_attachment %>
|
||||||
<div class="mb10" id="revise_attachment_div_<%=revise_attachment.id %>">
|
<div class="mb10" id="revise_attachment_div_<%=revise_attachment.id %>">
|
||||||
<span class="tit_fb"> 追加附件:</span>
|
<span class="tit_fb"> 追加附件:</span>
|
||||||
<%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments.where("attachtype = 7"), :status => 1} %>
|
<%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments.where("attachtype = 7"), :status => 1} %>
|
||||||
<span class="tit_fb">追加时间:</span><%=format_time revise_attachment.created_on.to_s %><br />
|
|
||||||
<% unless revise_attachment.description == "" %>
|
<% unless revise_attachment.description == "" %>
|
||||||
<span class="tit_fb break_word">追加理由:</span><p class="showHworkP"><%=revise_attachment.description %></p>
|
<span class="tit_fb break_word">追加理由:</span><p class="showHworkP"><%=revise_attachment.description %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div class="_notice_box ml5 text_c">注意:此处的附件是在作业截止日期过后提交的</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -125,13 +125,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
});
|
});
|
||||||
function show_upload(){
|
function show_upload(){
|
||||||
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'student_work/upload_attachment' ,:locals => {:work=>work})%>');
|
var htmlvalue = "<%= escape_javascript( render :partial => 'student_work/upload_attachment' ,:locals => {:work=>work})%>";
|
||||||
showModal('ajax-modal', '452px');
|
pop_box_new(htmlvalue, 500, 230);
|
||||||
$('#ajax-modal').siblings().remove();
|
|
||||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal();' style='margin-left: 435px;' class='resourceClose'></a>");
|
|
||||||
$('#ajax-modal').parent().css("top","40%").css("left","46%");
|
|
||||||
$('#ajax-modal').parent().addClass("resourceUploadPopup");
|
|
||||||
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
|
|
||||||
}
|
}
|
||||||
function regex_des() {
|
function regex_des() {
|
||||||
if ($.trim($("#attachment_des").val()) == "") {
|
if ($.trim($("#attachment_des").val()) == "") {
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
<!--<div class="resourceUploadPopup">-->
|
<div id="muban_popup_box" style="width:500px;">
|
||||||
<span class="uploadDialogText">上传附件</span>
|
<div class="muban_popup_top">
|
||||||
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
|
<h3 class="fl">
|
||||||
<div class="uploadBoxContainer">
|
上传附件
|
||||||
|
</h3>
|
||||||
|
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="muban_popup_con ml50 mt20 mb10 uploadBoxContainer">
|
||||||
<%= form_tag(revise_attachment_student_work_path(work.id), :multipart => true,:remote => !ie8?,:name=>"upload_form",:id=>'upload_form') do %>
|
<%= form_tag(revise_attachment_student_work_path(work.id), :multipart => true,:remote => !ie8?,:name=>"upload_form",:id=>'upload_form') do %>
|
||||||
<div>
|
<div>
|
||||||
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
||||||
|
@ -43,15 +48,11 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<p id="hint_message"></p>
|
<p id="hint_message"></p>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div style="margin-top: 10px" >
|
<div style="margin-top: 10px">
|
||||||
<div class="courseSendSubmit">
|
<a href="javascript:void(0);" id="upload_files_cancle_btn" class="fl sy_btn_grey mr10" onclick="closeModal();">取消</a>
|
||||||
<a href="javascript:void(0);" id="upload_files_submit_btn" class="sendSourceText" onclick="submit_revise_files();">确定</a>
|
<a href="javascript:void(0);" id="upload_files_submit_btn" class="fl sy_btn_blue" onclick="submit_revise_files();">确定</a>
|
||||||
<%#= submit_tag '确定',:onclick=>'submit_revise_files();',:onfocus=>'this.blur()',:id=>'upload_files_submit_btn',:class=>'sendSourceText' %>
|
|
||||||
</div>
|
|
||||||
<div class="courseSendCancel">
|
|
||||||
<a href="javascript:void(0);" id="upload_files_cancle_btn" class="sendSourceText" onclick="closeModal();">取消</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
</div>
|
|
@ -5,7 +5,7 @@
|
||||||
<%= link_to_short_attachment attachment,:length=> 58, :class => 'hidden link_file_a fl newsBlue mw360', :download => true -%>
|
<%= link_to_short_attachment attachment,:length=> 58, :class => 'hidden link_file_a fl newsBlue mw360', :download => true -%>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) if attachment.id && User.current == attachment.author && status != 2 %>
|
<%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) if attachment.id && User.current == attachment.author && status != 2 && @homework.end_time < Date.today %>
|
||||||
<span class="postAttSize">(<%= number_to_human_size attachment.filesize %>)</span>
|
<span class="postAttSize">(<%= number_to_human_size attachment.filesize %>)</span>
|
||||||
<span class="author">
|
<span class="author">
|
||||||
<%= format_time(attachment.created_on) %>
|
<%= format_time(attachment.created_on) %>
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
.muban_popup_top h3{ font-size:16px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px; }
|
.muban_popup_top h3{ font-size:16px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px; }
|
||||||
a.muban_icons_close{width:20px; height:20px;display:block;background: url(/images/sy/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;}
|
a.muban_icons_close{width:20px; height:20px;display:block;background: url(/images/sy/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;}
|
||||||
a:hover.muban_icons_close{background: url(/images/sy/sy_icons_close.png) -40px 0px no-repeat;}
|
a:hover.muban_icons_close{background: url(/images/sy/sy_icons_close.png) -40px 0px no-repeat;}
|
||||||
#muban_popup_box input,#muban_popup_box select{ border:1px solid #c8c8c8; height: 28px; color: #888;}
|
.muban_popup_box input,#muban_popup_box select{ border:1px solid #c8c8c8; height: 28px; color: #888;}
|
||||||
#muban_popup_box label.pop_box_label{width: 100px; text-align: right; display: inline-block;}
|
.muban_popup_box label.pop_box_label{width: 100px; text-align: right; display: inline-block;}
|
||||||
input.radio-width90{ width: 90px; }
|
input.radio-width90{ width: 90px; }
|
||||||
#muban_popup_box input,#muban_popup_box select{ border:1px solid #c8c8c8; height: 28px; color: #888;}
|
|
||||||
#muban_popup_box label.pop_box_label {width: 100px; text-align: right; display: inline-block;}
|
|
||||||
/*模板表格 20161013byLB*/
|
/*模板表格 20161013byLB*/
|
||||||
.muban_table{ width:100%; background:#fff; border:1px solid #e5e5e5; border-bottom: none; }
|
.muban_table{ width:100%; background:#fff; border:1px solid #e5e5e5; border-bottom: none; }
|
||||||
.muban_table thead tr{ height:40px; line-height:40px;}
|
.muban_table thead tr{ height:40px; line-height:40px;}
|
||||||
|
|
|
@ -1548,3 +1548,5 @@ a.syllabusbox_a_blue{
|
||||||
.pages_new_404{ margin:160px 209px 0px 209px; height: 580px;}
|
.pages_new_404{ margin:160px 209px 0px 209px; height: 580px;}
|
||||||
.pages_new_404_txt{ font-size: 16px; color: #888; text-align: center;}
|
.pages_new_404_txt{ font-size: 16px; color: #888; text-align: center;}
|
||||||
.feedbackText{box-shadow:none; width:550px; height:80px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;}
|
.feedbackText{box-shadow:none; width:550px; height:80px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;}
|
||||||
|
|
||||||
|
._notice_box{border:solid 1px #f6d0b1; background:#fff9e9; padding:4px; color:#ee4a20;}
|
Loading…
Reference in New Issue