点赞功能异常

This commit is contained in:
sw 2015-05-29 10:48:19 +08:00
parent fe3b715829
commit 9f09270aed
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<% if is_praise_homework User.current.id,@homework.id %>
<%= link_to "赞(#{praise_homework_count @homework.id})",praise_student_work_student_work_path(@homework), :remote => true,:class => 'orange_btn', :style => 'font-size:12px;'%>
<% if is_praise_homework User.current.id,@work.id %>
<%= link_to "赞(#{praise_homework_count @work.id})",praise_student_work_student_work_path(@work), :remote => true,:class => 'orange_btn', :style => 'font-size:12px;'%>
<% else %>
<%= link_to "赞(#{praise_homework_count @homework.id})","javascript:void(0)",:class => 'grey_btn', :style => 'font-size:12px;'%>
<%= link_to "赞(#{praise_homework_count @work.id})","javascript:void(0)",:class => 'grey_btn', :style => 'font-size:12px;'%>
<% end %>

View File

@ -1 +1 @@
$('#student_work_praise_<%= @homework.id%>').html('<%= escape_javascript(render :partial => 'student_work_praise')%>');
$('#student_work_praise_<%= @homework.id%>').html('<%= escape_javascript(render :partial => 'student_work/student_work_praise')%>');