From 3b153766f69326422a5244123d1ba2d4d4f9e213 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 2 Sep 2015 11:20:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E4=B9=8B=E5=90=8E=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=B1=95=E5=BC=80=E6=9B=B4=E5=A4=9A=E7=9B=B8=E5=85=B3?= =?UTF-8?q?BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/comments_controller.rb | 28 +++++++++++------------ app/views/users/_user_activities.html.erb | 2 +- app/views/users/show.html.erb | 2 +- app/views/users/show.js.erb | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 770c36a58..4088d4156 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -34,20 +34,20 @@ class CommentsController < ApplicationController ids = params[:asset_id].split(',') update_kindeditor_assets_owner ids,@comment.id,OwnerTypeHelper::COMMENT end - # ������ض�̬�ļ�¼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 - # ������ض�̬�ļ�¼add end + # # ������ض�̬�ļ�¼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 + # # ������ض�̬�ļ�¼add end flash[:notice] = l(:label_comment_added) end diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index 661e0eade..2eba84efa 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -61,4 +61,4 @@ <% end %> <% end %> -<%= 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"%> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 76599739c..fe916331f 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -39,4 +39,4 @@ -<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities,:page => 0} %> \ No newline at end of file +<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities,:page => 0,:type => @type} %> \ No newline at end of file diff --git a/app/views/users/show.js.erb b/app/views/users/show.js.erb index f870b38b9..bf7443f8c 100644 --- a/app/views/users/show.js.erb +++ b/app/views/users/show.js.erb @@ -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%>