socialforge/app/views/news/show.html.erb

18 lines
465 B
Plaintext
Raw Normal View History

<% if @project %>
<%= render :partial => 'project_show', locals: {project: @project} %>
<% elsif @course %>
<%= render :partial => 'course_show', locals: {course: @course} %>
2013-08-01 10:33:49 +08:00
<% end %>
<script type="text/javascript">
$(function(){
$("#add_comment_form").submit(function(){
if($("#comment").val() == ''){
alert('请输入评论内容');
return false;
}
$(this)[0].submit();
//return true;
});
})
</script>