消息
<% if @message_alls.count >0 %> <% if params[:type].nil? || params[:type] == "unviewed" %>
有 <%= unviewed_message(@user) %> 条未读 <% unless unviewed_message(@user) == 0 %> <%= link_to "全部设为已读", user_message_path(User.current, :viewed => 'all') %> <% end %>
<% end %> <%# 系统消息 %> <% @user_system_messages.each do |usm| %> <% end %> <%# 课程消息 %> <% unless @message_alls.nil? %> <% @message_alls.each do |ma| %> <% if ma.class == CourseMessage %> <% if ma.course_message_type == "News" %> <% end %> <% if ma.course_message_type == "Comment" %> <% end %> <% if ma.course_message_type == "HomeworkCommon" %> <% end %> <% if ma.course_message_type == "Poll" %> <% end %> <% if ma.course_message_type == "Message" %> <% end %> <% if ma.course_message_type == "StudentWorksScore" %> <% end %> <% if ma.course_message_type == "JournalsForMessage" %> <% end %> <% end %> <% if ma.class == ForgeMessage %> <% if ma.forge_message_type == "AppliedProject" %> <% end %> <% if ma.forge_message_type == "Issue" %> <% end %> <% if ma.forge_message_type == "Journal" %> <% end %> <% if ma.forge_message_type == "Message" %> <% end %> <% if ma.forge_message_type == "News" %> <% end %> <% if ma.forge_message_type == "Comment" %> <% end %> <% end %> <% if ma.class == MemoMessage %> <% if ma.memo_type == "Memo" %> <% end %> <% end %> <% if ma.class == UserFeedbackMessage %> <% if ma.journals_for_message_type == "JournalsForMessage" %> <% end %> <% end %> <% if ma.class == SystemMessage %> <% end %> <% end %> <% end %> <% else %>
您目前还没有相关消息!
<% end %>