竞赛帖子消息点击之后刷新,没有变成已读
This commit is contained in:
parent
7de40ac88b
commit
b83299772c
|
@ -71,6 +71,9 @@ class MessagesController < ApplicationController
|
||||||
end
|
end
|
||||||
#render :action => "show", :layout => "base_courses"#by young
|
#render :action => "show", :layout => "base_courses"#by young
|
||||||
elsif @project
|
elsif @project
|
||||||
|
#帖子消息状态更新
|
||||||
|
project_messages = ForgeMessage.where("user_id =? and forge_message_type =? and project_id =? and viewed =?", User.current.id, 'Message', @project.id, 0)
|
||||||
|
project_messages.update_all(:viewed => true)
|
||||||
#@reply_pages = Paginator.new @reply_count, REPLIES_PER_PAGE, page
|
#@reply_pages = Paginator.new @reply_count, REPLIES_PER_PAGE, page
|
||||||
# @replies = @topic.children.
|
# @replies = @topic.children.
|
||||||
# includes(:author, :attachments, {:board => :project}).
|
# includes(:author, :attachments, {:board => :project}).
|
||||||
|
@ -83,6 +86,9 @@ class MessagesController < ApplicationController
|
||||||
format.html {render :layout => 'base_projects'}
|
format.html {render :layout => 'base_projects'}
|
||||||
end
|
end
|
||||||
elsif @contest
|
elsif @contest
|
||||||
|
#帖子消息状态更新
|
||||||
|
contest_messages = ContestMessage.where("user_id =? and contest_message_type =? and contest_id =? and viewed =?", User.current.id, 'Message', @contest.id, 0)
|
||||||
|
contest_messages.update_all(:viewed => true)
|
||||||
@left_nav_type = 4
|
@left_nav_type = 4
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
|
|
Loading…
Reference in New Issue