过滤之后点击展开更多相关BUG

This commit is contained in:
sw 2015-09-02 11:20:21 +08:00
parent 9728437953
commit 3b153766f6
4 changed files with 17 additions and 17 deletions

View File

@ -34,20 +34,20 @@ class CommentsController < ApplicationController
ids = params[:asset_id].split(',')
update_kindeditor_assets_owner ids,@comment.id,OwnerTypeHelper::COMMENT
end
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add start
if( @comment.id && @news.course )
if(@news.author_id != User.current.id)
notify = ActivityNotify.new()
notify.activity_container_id = @news.course.id
notify.activity_container_type = 'Course'
notify.activity_id = @comment.id
notify.activity_type = 'Comment'
notify.notify_to = @news.author_id
notify.is_read = 0
notify.save()
end
end
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add end
# # <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add start
# if( @comment.id && @news.course )
# if(@news.author_id != User.current.id)
# notify = ActivityNotify.new()
# notify.activity_container_id = @news.course.id
# notify.activity_container_type = 'Course'
# notify.activity_id = @comment.id
# notify.activity_type = 'Comment'
# notify.notify_to = @news.author_id
# notify.is_read = 0
# notify.save()
# end
# end
# # <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add end
flash[:notice] = l(:label_comment_added)
end

View File

@ -61,4 +61,4 @@
<% end %>
<% end %>
<input type="hidden" value="<%= page%>"/>
<%= link_to "点击展开更多",user_activities_path(@user.id),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
<%= link_to "点击展开更多",user_activities_path(@user.id,:type => type),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>

View File

@ -39,4 +39,4 @@
</div>
</div>
<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities,:page => 0} %>
<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities,:page => 0,:type => @type} %>

View File

@ -1,4 +1,4 @@
$("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'users/user_activities',:locals => {:user_activities => @user_activities, :page => @page} )%>");
$("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'users/user_activities',:locals => {:user_activities => @user_activities, :page => @page,:type => @type} )%>");
<% if @user_activities.count < 10%>
$("#show_more_activities").hide();
<% end%>