2015-08-25 12:46:57 +08:00
|
|
|
|
2015-08-24 14:29:38 +08:00
|
|
|
<div class="resources">
|
|
|
|
<div class="homepageRightBanner">
|
|
|
|
<div class="NewsBannerName">消息</div>
|
|
|
|
<ul class="resourcesSelect">
|
|
|
|
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
|
|
|
<ul class="newsType">
|
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "全部",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user} %></a></li>
|
|
|
|
<%# 课程相关消息 %>
|
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "作业消息",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'homework'} %></a></li>
|
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "课程讨论区",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'course_message'} %></a></li>
|
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "课程通知",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'course_news'} %></a></li>
|
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "通知回复",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'course_news_reply'} %></a></li>
|
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "课程问卷",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'poll'} %></a></li>
|
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "作品评阅",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'works_reviewers'} %></a></li>
|
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "作品讨论",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'works_reply'} %></a></li>
|
|
|
|
<%# 项目相关消息 %>
|
2015-08-26 09:01:02 +08:00
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "指派问题",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'issue'} %></a></li>
|
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "问题更新",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'issue_update'} %></a></li>
|
2015-08-24 14:29:38 +08:00
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "项目讨论区",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'forge_message'} %></a></li>
|
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "项目新闻",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'forge_news'} %></a></li>
|
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "新闻回复",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'forge_news_reply'} %></a></li>
|
|
|
|
<%# 项目相关消息 %>
|
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "贴吧帖子",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'forum'} %></a></li>
|
|
|
|
<%# 系统贴吧 %>
|
|
|
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "用户留言",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'user_feedback'} %></a></li>
|
2015-08-21 17:40:28 +08:00
|
|
|
|
2015-08-24 14:29:38 +08:00
|
|
|
</ul>
|
|
|
|
</li>
|
2015-08-20 16:27:49 +08:00
|
|
|
</ul>
|
2015-08-24 14:29:38 +08:00
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<% if @new_message_count >0 %>
|
|
|
|
<%# 课程消息 %>
|
2015-08-25 11:10:08 +08:00
|
|
|
<% unless @message_alls.nil? %>
|
|
|
|
<% @message_alls.each do |ma| %>
|
|
|
|
<% if ma.class == CourseMessage %>
|
|
|
|
<% if ma.course_message_type == "News" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
2015-08-25 15:20:24 +08:00
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author) %></a></li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue" %></li>
|
2015-08-26 09:01:02 +08:00
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了通知</li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsContent fl">
|
|
|
|
<%= 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}" %></li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_on).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.course_message_type == "Comment" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
2015-08-25 15:20:24 +08:00
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue" %></li>
|
2015-08-26 14:47:53 +08:00
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知</li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsContent fl">
|
|
|
|
<%= 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}" %></li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_on).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.course_message_type == "HomeworkCommon" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
2015-08-25 15:20:24 +08:00
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue" %></a></li>
|
2015-08-26 09:01:02 +08:00
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了作业</li>
|
2015-08-24 14:29:38 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-08-25 11:10:08 +08:00
|
|
|
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),:class => "newsGrey", :title => "#{ma.course_message.name}" %></a></li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.course_message_type == "Poll" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
2015-08-25 15:20:24 +08:00
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue" %></a></li>
|
2015-08-26 09:01:02 +08:00
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了问卷</li>
|
2015-08-24 14:29:38 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-08-25 17:06:38 +08:00
|
|
|
<%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_path(ma.course_message.id),
|
2015-08-25 11:10:08 +08:00
|
|
|
:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
|
|
|
|
:title => "#{ma.course_message.polls_name}" %></a></li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.course_message_type == "Message" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
2015-08-25 15:20:24 +08:00
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue" %></li>
|
|
|
|
<% if ma.course_message.parent_id.nil? %>
|
2015-08-26 09:01:02 +08:00
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了帖子</li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%=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}" %></a></li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_on).html_safe %> </li>
|
|
|
|
<% else %>
|
2015-08-26 09:01:02 +08:00
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">回复了帖子</li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%=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}" %> </a></li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_on).html_safe %> </li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.course_message_type == "StudentWorksScore" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
2015-08-25 15:20:24 +08:00
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue" %></li>
|
2015-08-26 14:47:53 +08:00
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.status == 0 ? "评阅了作品" : "重新评阅了作品" %></li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-08-26 14:47:53 +08:00
|
|
|
<% unless ma.content.nil? %>
|
|
|
|
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),:class=>"newsGrey",:title => "#{ma.content.html_safe}" %></a></li>
|
|
|
|
<% end %>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-08-25 11:10:08 +08:00
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.course_message_type == "JournalsForMessage" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
2015-08-25 15:20:24 +08:00
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue" %></li>
|
2015-08-26 14:47:53 +08:00
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">回复了作品评论</li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id),:class=>"newsGrey",:title => "#{ma.course_message.notes}" %></a></li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_on).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
2015-08-24 14:29:38 +08:00
|
|
|
<% end %>
|
2015-08-25 11:10:08 +08:00
|
|
|
<!--项目消息-->
|
|
|
|
<% if ma.class == ForgeMessage %>
|
|
|
|
<% if ma.forge_message_type == "Issue" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
2015-08-25 15:20:24 +08:00
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a>
|
2015-08-25 11:10:08 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPublisher fl">
|
|
|
|
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue" %>
|
|
|
|
</li>
|
2015-08-25 19:30:22 +08:00
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">指派了问题给你</li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-08-25 13:04:25 +08:00
|
|
|
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",:title => "#{ma.forge_message.subject}" %></a>
|
2015-08-25 11:10:08 +08:00
|
|
|
</li>
|
2015-08-25 13:51:42 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-08-25 11:10:08 +08:00
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.forge_message_type == "Journal" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
2015-08-25 15:20:24 +08:00
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user) %></a>
|
2015-08-25 11:10:08 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPublisher fl">
|
|
|
|
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue" %>
|
|
|
|
</li>
|
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
2015-08-25 19:30:22 +08:00
|
|
|
更新了问题状态
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%= link_to get_issue_des_update(ma.forge_message),
|
|
|
|
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
:title => "#{get_issue_des_update(ma.forge_message)}" %></a>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.forge_message.created_on).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.forge_message_type == "Message" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
2015-08-25 15:20:24 +08:00
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a></li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsPublisher fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue" %></li>
|
2015-08-24 14:29:38 +08:00
|
|
|
|
2015-08-25 19:30:22 +08:00
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了帖子" : "回复了帖子" %></li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%=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}" %></a></li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.forge_message.created_on).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.forge_message_type == "News" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
2015-08-25 15:20:24 +08:00
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a>
|
2015-08-25 11:10:08 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPublisher fl">
|
|
|
|
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue" %>
|
|
|
|
</li>
|
2015-08-25 19:30:22 +08:00
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了新闻</li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%= 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}" %></a>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.forge_message.created_on).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.forge_message_type == "Comment" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
2015-08-25 15:20:24 +08:00
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a></li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsPublisher fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue" %></li>
|
2015-08-25 13:04:46 +08:00
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">回复了新闻</li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsContent fl">
|
|
|
|
<%= 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}"%></li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.forge_message.created_on).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
2015-08-24 14:29:38 +08:00
|
|
|
<% end %>
|
2015-08-25 11:10:08 +08:00
|
|
|
<!--公共贴吧-->
|
|
|
|
<% if ma.class == MemoMessage %>
|
|
|
|
<% if ma.memo_type == "Memo" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
2015-08-25 15:20:24 +08:00
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.memo.author), :width => "30", :height => "30"), user_path(ma.memo.author) %></a>
|
2015-08-25 11:10:08 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPublisher fl">
|
|
|
|
<%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue" %>
|
|
|
|
</li>
|
2015-08-26 09:01:02 +08:00
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>" ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子" : "回复了贴吧帖子" %></li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-08-25 17:42:39 +08:00
|
|
|
<%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id),:class => "newsGrey" , :title => "#{ma.memo.content.html_safe}" %></a>
|
2015-08-25 11:10:08 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.memo.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
2015-08-24 14:29:38 +08:00
|
|
|
<% end %>
|
2015-08-25 11:10:08 +08:00
|
|
|
<!--用户留言-->
|
|
|
|
<% if ma.class == UserFeedbackMessage %>
|
|
|
|
<% if ma.journals_for_message_type == "JournalsForMessage" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
2015-08-25 15:20:24 +08:00
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"), user_path(ma.journals_for_message.user) %></a>
|
2015-08-25 11:10:08 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPublisher fl">
|
|
|
|
<%=link_to ma.journals_for_message.user, user_path(ma.journals_for_message.user), :class => "newsBlue" %>
|
|
|
|
</li>
|
2015-08-25 13:04:46 +08:00
|
|
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了" : "回复了你的留言" %></li>
|
2015-08-25 11:10:08 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-08-25 14:35:26 +08:00
|
|
|
<%= link_to ma.journals_for_message.notes.html_safe, feedback_path(ma.journals_for_message.jour_id), :class => "newsGrey", :title => "#{ma.journals_for_message.notes}" %></a>
|
2015-08-25 11:10:08 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
2015-08-24 14:29:38 +08:00
|
|
|
<% end %>
|
2015-08-21 09:41:59 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2015-08-25 11:10:08 +08:00
|
|
|
<!--项目消息-->
|
2015-08-24 14:29:38 +08:00
|
|
|
<% else %>
|
2015-08-26 09:01:02 +08:00
|
|
|
<div class="flash notice">您目前还没有相关消息!</div>
|
2015-08-21 09:41:59 +08:00
|
|
|
<% end %>
|
2015-08-24 14:29:38 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-08-21 17:40:28 +08:00
|
|
|
|
2015-08-24 14:29:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|