0条消息则不显示“全部设为已读”

This commit is contained in:
huang 2015-09-02 21:47:42 +08:00
parent a47c9176b7
commit a78b28f1b7
1 changed files with 4 additions and 1 deletions

View File

@ -31,7 +31,10 @@
<div>
<% if params[:type].nil? %>
<div class="newsReadSetting">
有&nbsp;<span class="c_red"><%= User.current.count_new_message %></span>&nbsp;条未读<a href="javascript:void(0);" class="ml15"><%= link_to "全部设为已读", user_message_path(User.current, :viewed => 'all') %></a>
有&nbsp;<span class="c_red"><%= User.current.count_new_message %></span>&nbsp;条未读
<% unless User.current.count_new_message == 0 %>
<a href="javascript:void(0);" class="ml15"><%= link_to "全部设为已读", user_message_path(User.current, :viewed => 'all') %></a>
<% end %>
</div>
<% end %>
<% if @message_alls.count >0 %>