点击消息后红色按钮不消失

This commit is contained in:
daiao 2017-03-07 14:19:17 +08:00
parent 1d6fb6849a
commit e88918916a
2 changed files with 4 additions and 2 deletions

View File

@ -2089,6 +2089,8 @@ class UsersController < ApplicationController
def show
if User.current == @user
# 点击小铃铛,更新点击时间
update_onclick_time if params[:click_user_message] == 'true'
# 全部设为已读
# 自己的主页显示消息
messages_all = MessageAll.where(:user_id => @user.id)

View File

@ -94,10 +94,10 @@
</div>
<div class="navHomepageNews" id="user_messages">
<%= link_to "", user_path(User.current), :class => "homepageNewsIcon", :target => "_Blank", :title => "您的所有消息" %>
<%= link_to "", user_path(User.current, :click_user_message => true), :class => "homepageNewsIcon", :target => "_Blank", :title => "您的所有消息" %>
<% new_message_count = User.current.count_new_message.to_i %>
<% if new_message_count > 0 %>
<div ><%= link_to new_message_count, user_path(User.current), :class => "newsActive", :target => "_Blank" %></div>
<div ><%= link_to new_message_count, user_path(User.current, :click_user_message => true), :class => "newsActive", :target => "_Blank" %></div>
<% end %>
<%#= link_to User.current.count_new_message, user_message_path(User.current), :class => "homepageNewsIcon" %>
<div class="shadowbox_news undis" id="user_messages_list">