parent
467af47386
commit
6c184b9248
@ -0,0 +1,16 @@
|
||||
<div>
|
||||
<div class="ni_con">
|
||||
<p class="mt30">
|
||||
<% if state == 2 %>
|
||||
请求已发送至<%=homework.user.show_name %>老师,希望他同意与你分享:)
|
||||
<% elsif state == 3 %>
|
||||
您已发送过分享请求,请勿重复发送。
|
||||
<% end %>
|
||||
</p>
|
||||
<div class="ni_btn">
|
||||
<a href="javascript:" class="tijiao" onclick="hideModal();" style="margin-bottom: 10px; margin-left: 60px; color: #fff;" >
|
||||
确 定
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,27 @@
|
||||
<div>
|
||||
<div class="ni_con">
|
||||
<h2>请求分享</h2>
|
||||
<p>
|
||||
请求说明(可选):
|
||||
<textarea type="text" id="apply_content" class="apply_content mt10" style="outline:none;"></textarea>
|
||||
</p>
|
||||
<div class="ni_btn">
|
||||
<a href="javascript:" class="tijiao" onclick="apply_to();" style="margin-bottom: 20px; margin-left: 60px; color: #fff">
|
||||
确 定
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function apply_to() {
|
||||
url = '/users/<%=User.current.id %>/apply_for_homework?homework_id=<%=homework.id %>&content='+$("#apply_content").val();
|
||||
$.get(
|
||||
url,
|
||||
{
|
||||
|
||||
},
|
||||
function (data) {
|
||||
}
|
||||
);
|
||||
}
|
||||
</script>
|
@ -0,0 +1,18 @@
|
||||
<div>
|
||||
<div class="ni_con">
|
||||
<p class="mt30">
|
||||
<% if status == 1 %>
|
||||
您的分享请求暂未通过审核,暂时不可发送至课程。
|
||||
<% elsif status == 2 %>
|
||||
您选中的作业目前为私有作业,请点击“请求分享”按钮向题目的作者发送分享请求吧!祝您成功:)
|
||||
<% elsif status == 3 %>
|
||||
您的分享请求已被老师拒绝,不可发送至课程。
|
||||
<% end %>
|
||||
</p>
|
||||
<div class="ni_btn">
|
||||
<a href="javascript:" class="tijiao" onclick="hideModal();" style="margin-bottom: 10px; margin-left: 60px; color: #fff;" >
|
||||
确 定
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,8 +1,12 @@
|
||||
<% if @state == 1 %>
|
||||
alert("您还未登录");
|
||||
<% elsif @state == 2 %>
|
||||
alert("申请成功,请等待审核");
|
||||
$("#homework_apply_status_<%=@homework.id %>").html("待审核");
|
||||
<% elsif @state == 3 %>
|
||||
alert("您已经发送过申请了,请耐心等待");
|
||||
hideModal();
|
||||
alert("您还未登录");
|
||||
<% elsif @state == 2 || @state == 3 %>
|
||||
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/apply_for_homework', :locals => {:homework => @homework, :state => @state}) %>');
|
||||
showModal('ajax-modal', '500px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='javascript:' onclick='hideModal();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().css("top","30%").css("left","30%").css("position","fixed").css("border","3px solid #269ac9");
|
||||
$("#homework_apply_status_<%=@homework.id %>").html("待审核");
|
||||
<% end %>
|
@ -0,0 +1,10 @@
|
||||
<% if @state == 1 %>
|
||||
alert("您还未登录");
|
||||
<% elsif @state == 2 %>
|
||||
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/apply_homework', :locals => {:homework => @homework}) %>');
|
||||
showModal('ajax-modal', '500px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='javascript:' onclick='hideModal();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().css("top","30%").css("left","30%").css("position","fixed").css("border","3px solid #269ac9");
|
||||
<% end %>
|
Loading…
Reference in new issue