%# 系统消息总显示在最上面 %> <%= render :partial => 'users/user_message_system' %> <% message_alls.each do |ma| %> <% ma = ma.try(:message) %> <% if ma.class == AtMessage && ma.at_valid? && ma.at_message %> <%= render :partial => 'users/user_at_message', :locals => {:ma => ma} %> <% end %> <%# 课程消息 %> <% if ma.class == CourseMessage %> <%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %> <% end %> <% if ma.class == ForgeMessage %> <%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %> <% end %> <%# 竞赛消息 %> <% if ma.class == ContestMessage %> <%= render :partial => 'users/user_message_contest', :locals => {:ma => ma} %> <% end %> <%# 博客消息 %> <%= render :partial => 'users/user_message_blog', :locals => {:ma => ma} %> <% if ma.class == MemoMessage %> <%= render :partial => 'users/user_message_forum', :locals => {:ma => ma} %> <% end %> <% if ma.class == UserFeedbackMessage %> <%= render :partial => 'users/user_message_userfeedaback', :locals => {:ma => ma} %> <% end %> <% if ma.class == OrgMessage %> <%= render :partial => 'users/user_message_org', :locals => {:ma => ma} %> <% end %> <%# 申请类消息 %> <% if ma.class == AppliedMessage %> <%= render :partial => 'users/user_message_applied', :locals => {:ma => ma} %> <% end %> <% end %>