2014-04-09 11:06:13 +08:00
|
|
|
<style type="text/css">
|
|
|
|
#attachments_fields input.description {
|
|
|
|
width: auto;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<%= javascript_include_tag 'attachments' %>
|
2013-08-30 09:34:21 +08:00
|
|
|
<!-- fq -->
|
2013-11-08 20:54:45 +08:00
|
|
|
<!--modified by huang-->
|
|
|
|
<div class="content-title-top">
|
2014-06-09 14:23:31 +08:00
|
|
|
<% if User.current.logged? && (User.current.admin? || (!Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.roles&Role.where(id: [3, 4, 7, 9] )).size >0))%>
|
|
|
|
<%= link_to(l(:label_course_homework_new), {:controller => 'courses', :action => 'new_homework'}, :class => 'icon icon-add') %>
|
2013-11-08 20:54:45 +08:00
|
|
|
<% end %>
|
2013-08-30 09:34:21 +08:00
|
|
|
</div>
|
|
|
|
<div id="bid-show">
|
2013-09-16 08:49:39 +08:00
|
|
|
<%= render :partial => 'bids/bid_homework_show', :locals => {:bids => @bids, :bid_pages => @bid_pages} %>
|
2013-08-30 09:34:21 +08:00
|
|
|
</div>
|
|
|
|
|
2014-04-09 11:06:13 +08:00
|
|
|
<div id="OpenWindow">
|
|
|
|
<div id="signup-ct">
|
|
|
|
<div id="OpenWindow-header">
|
2014-06-09 14:23:31 +08:00
|
|
|
<h1> 课程: <%= @course.name%> </h1>
|
2014-04-09 11:06:13 +08:00
|
|
|
<p id='bid-desc'> 上传作业 </p>
|
|
|
|
<a href="javascript:void(0);" class="modal_close"></a>
|
|
|
|
</div>
|
|
|
|
<div id="OpenWindow-content">
|
|
|
|
|
2014-04-08 16:56:53 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-04-09 11:06:13 +08:00
|
|
|
</div>
|
2014-04-08 16:56:53 +08:00
|
|
|
<script type="text/javascript">
|
|
|
|
$("a[rel*=leanModal]").leanModal({
|
|
|
|
top:100,
|
|
|
|
closeButton: ".modal_close"
|
|
|
|
});
|
|
|
|
|
2014-04-09 11:06:13 +08:00
|
|
|
function showSubH(/* ... */){
|
|
|
|
var id, name, numargs = arguments.length;
|
|
|
|
|
|
|
|
id = arguments[0];
|
|
|
|
name = arguments[1];
|
|
|
|
|
|
|
|
$("#OpenWindow").find("#bid-desc").html('作业名: '+name);
|
|
|
|
|
|
|
|
post_url = '/bids/' + id + '/homework_ajax_modal.js'
|
|
|
|
function deal_post (data, textStatus, xhr) {
|
|
|
|
if(textStatus == 'success'){
|
|
|
|
eval(data);
|
|
|
|
}
|
|
|
|
if(textStatus != 'success'){
|
|
|
|
$('#OpenWindow-content').html('<span class=\"font_color_orange\" > ' + textStatus + ' <\/span>\n');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function deal_error (argument) {
|
2014-04-11 10:56:55 +08:00
|
|
|
$('#OpenWindow-content').html('<strong>Network Error</strong><span class=\"font_color_orange\" > <br/>http_status:' + argument.status + '<br/>statusText:' + argument.statusText + ' <\/span>\n');
|
2014-04-09 11:06:13 +08:00
|
|
|
}
|
|
|
|
$.post(post_url,{}, deal_post).error(deal_error);
|
2014-04-08 16:56:53 +08:00
|
|
|
}
|
|
|
|
</script>
|
2013-11-09 08:56:34 +08:00
|
|
|
|
2014-10-16 15:07:36 +08:00
|
|
|
<% html_title(l(:label_homework)) -%>
|