parent
620cc83d4b
commit
c6c3625029
@ -1,27 +1,16 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="ni_con">
|
<div class="ni_con">
|
||||||
|
<%= form_tag(apply_for_homework_user_path(:id=>User.current.id,:homework_id=>homework.id), :multipart => true,:remote => true,:name=>"apply_for_homework_form",:id=>'apply_for_homework_form') do %>
|
||||||
<h2>请求分享</h2>
|
<h2>请求分享</h2>
|
||||||
<p>
|
<p>
|
||||||
请求说明(可选):
|
请求说明(可选):
|
||||||
<textarea type="text" id="apply_content" class="apply_content mt10" style="outline:none;"></textarea>
|
<textarea type="text" name="content" id="apply_content" class="apply_content mt10" style="outline:none;"></textarea>
|
||||||
</p>
|
</p>
|
||||||
<div class="ni_btn">
|
<div class="ni_btn">
|
||||||
<a href="javascript:" class="tijiao" onclick="apply_to();" style="margin-bottom: 20px; margin-left: 60px; color: #fff">
|
<a href="javascript:" class="tijiao" onclick="$('#apply_for_homework_form').submit();" style="margin-bottom: 20px; margin-left: 60px; color: #fff">
|
||||||
确 定
|
确 定
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</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,8 @@
|
|||||||
|
class ChangeCourseMessagesCloumn < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
change_column :course_messages, :content, :text
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in new issue