<%= render :partial => 'users/selector_for_messages'%>
<% if (!@message_alls.nil? && @message_alls.count >0) %> <% if params[:type].nil? || params[:type] == "unviewed" %>
<% count = unviewed_message(@user) %> 有 <%= count %> 条未读 <% unless (count == 0 || User.current != @user) %> <%= link_to "全部设为已读", user_message_path(User.current, :viewed => 'all') %> <% end %>
<% end %>
<% unless @message_alls.nil? %> <%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %> <% end %>
<% else %>
您目前还没有相关消息!
<% end %>