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

18 lines
465 B
Plaintext

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