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