去掉forum
This commit is contained in:
parent
d18d1a9d81
commit
c8399cdf58
|
@ -114,9 +114,10 @@ class UsersController < ApplicationController
|
||||||
when nil
|
when nil
|
||||||
@user_course_messages = @user.course_messages.reverse
|
@user_course_messages = @user.course_messages.reverse
|
||||||
@user_forge_messages = @user.forge_messages.reverse
|
@user_forge_messages = @user.forge_messages.reverse
|
||||||
@user_forum_messages = @user.forum_messages.reverse
|
@user_memo_messages = @user.memo_messages.reverse
|
||||||
@user_course_messages_count = @user_course_messages.count
|
@user_course_messages_count = @user_course_messages.count
|
||||||
@user_forge_messages_count = @user_forum_messages.count
|
@user_forge_messages_count = @user_forum_messages.count
|
||||||
|
@user_memo_messages_count = @user_memo_messages.count
|
||||||
when 'homework'
|
when 'homework'
|
||||||
@user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc")
|
@user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc")
|
||||||
@user_course_messages_count = @user_course_messages.count
|
@user_course_messages_count = @user_course_messages.count
|
||||||
|
|
|
@ -204,7 +204,7 @@ class JournalsForMessage < ActiveRecord::Base
|
||||||
# 主留言
|
# 主留言
|
||||||
receivers = []
|
receivers = []
|
||||||
if self.reply_id == 0
|
if self.reply_id == 0
|
||||||
if self.author_id != self.jour_id # 过滤自己给自己的留言消息
|
if self.user_id != self.jour_id # 过滤自己给自己的留言消息
|
||||||
receivers << self.jour
|
receivers << self.jour
|
||||||
end
|
end
|
||||||
else # 回帖
|
else # 回帖
|
||||||
|
@ -218,8 +218,8 @@ class JournalsForMessage < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if self.jour_type == 'Principal'
|
if self.jour_type == 'Principal'
|
||||||
if self.user_id != self.jour.user_id
|
if self.user_id != self.jour_id
|
||||||
self.user_feedback_messages << UserFeedbackMessage.new(:user_id => self.jour.user_id, :memo_message_id => self.id, :memo_message_type => "Forum", :viewed => false)
|
self.user_feedback_messages << UserFeedbackMessage.new(:user_id => self.jour_id, :user_message_id => self.id, :user_message_type => "Forum", :viewed => false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue