<% if @message_alls.count >0 %>
<%# 课程消息 %>
<% unless @message_alls.nil? %>
<% @message_alls.each do |ma| %>
<% if ma.class == CourseMessage %>
<% if ma.course_message_type == "News" %>
- <%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author) %>
- <%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>">发布了通知:
-
<%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:title => "#{ma.course_message.title}" %>
- <%= time_tag(ma.course_message.created_on).html_safe %>
<% end %>
<% if ma.course_message_type == "Comment" %>
- <%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %>
- <%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>">评论了通知:
-
<%= link_to ma.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:title => "#{ma.course_message.comments.html_safe}" %>
- <%= time_tag(ma.course_message.created_on).html_safe %>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" %>
<% end %>
<% if ma.course_message_type == "Poll" %>
<% end %>
<% if ma.course_message_type == "Message" %>
- <%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %>
- <%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>"><%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %>
-
<%=link_to ma.course_message.subject.html_safe, course_boards_path(ma.course_message.course,:parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id,
:topic_id => ma.course_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
:title => "#{ma.course_message.subject.html_safe}" %>
- <%= time_tag(ma.course_message.created_on).html_safe %>
<% 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 == "Issue" %>
<% end %>
<% if ma.forge_message_type == "Journal" %>
<% end %>
<% if ma.forge_message_type == "Message" %>
- <%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %>
- <%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %>
-
<%=link_to ma.forge_message.subject.html_safe, project_boards_path(ma.forge_message.project,
:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
:topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
:title => "#{ma.forge_message.subject.html_safe}" %>
- <%= time_tag(ma.forge_message.created_on).html_safe %>
<% end %>
<% if ma.forge_message_type == "News" %>
-
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %>
-
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
">发布了新闻:
-
<%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id}, :class => "newsGrey", :title => "#{ma.forge_message.title.html_safe}" %>
- <%= time_tag(ma.forge_message.created_on).html_safe %>
<% end %>
<% if ma.forge_message_type == "Comment" %>
- <%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %>
- <%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
">评论了新闻:
-
<%= link_to "#{ma.forge_message.comments.html_safe}",
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.forge_message.comments.html_safe}"%>
- <%= time_tag(ma.forge_message.created_on).html_safe %>
<% 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 %>
<% end %>
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
<% end %>
<% else %>
您目前还没有相关消息!
<% end %>