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

20 lines
586 B
Plaintext

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