2015-09-02 14:15:26 +08:00
|
|
|
<div class="homepageRightBanner">
|
2015-08-28 17:05:27 +08:00
|
|
|
<div class="NewsBannerName">消息</div>
|
|
|
|
<ul class="resourcesSelect">
|
|
|
|
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
|
|
|
<ul class="newsType">
|
2015-08-29 09:20:04 +08:00
|
|
|
<li><%= link_to "全部",user_message_path(User.current), :class => "resourcesGrey" %></li>
|
2015-09-07 16:08:04 +08:00
|
|
|
<li><%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "resourcesGrey" %></li>
|
2015-09-09 10:15:05 +08:00
|
|
|
<li><%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %></li>
|
2015-09-10 11:39:53 +08:00
|
|
|
<%# 系统消息 %>
|
|
|
|
<li><%= link_to "系统消息", user_message_path(User.current, :type => 'system_message'), :class => "resourcesGrey" %></li>
|
2015-08-28 17:05:27 +08:00
|
|
|
<%# 课程相关消息 %>
|
2015-08-29 12:06:57 +08:00
|
|
|
<li><%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "resourcesGrey" %></li>
|
|
|
|
<li><%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "resourcesGrey" %></li>
|
2015-08-29 09:20:04 +08:00
|
|
|
<li><%= link_to "课程通知",user_message_path(User.current, :type => 'course_news'), :class => "resourcesGrey" %></li>
|
2015-08-29 12:06:57 +08:00
|
|
|
<!--<li><%#= link_to "通知回复", user_message_path(User.current, :type => 'course_news_reply'), :class => "resourcesGrey" %></li>-->
|
|
|
|
<!--<li><%#= link_to "课程问卷", user_message_path(User.current, :type => 'poll'), :class => "resourcesGrey" %></a></li>-->
|
|
|
|
<!--<li><%#= link_to "作品评阅", user_message_path(User.current, :type => 'works_reviewers'), :class => "resourcesGrey" %></li>-->
|
|
|
|
<!--<li><%#= link_to "作品讨论", user_message_path(User.current, :type => 'works_reply'), :class => "resourcesGrey" %></li>-->
|
2015-08-28 17:05:27 +08:00
|
|
|
<%# 项目相关消息 %>
|
2015-08-29 12:06:57 +08:00
|
|
|
<li><%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "resourcesGrey" %></li>
|
|
|
|
<!--<li><%#= link_to "问题更新", user_message_path(User.current, :type => 'issue_update'), :class => "resourcesGrey" %></li>-->
|
|
|
|
<!--<li><%#= link_to "项目讨论区", user_message_path(User.current, :type => 'forge_message'), :class => "resourcesGrey" %></li>-->
|
|
|
|
<!--<li><%#= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "resourcesGrey" %></li>-->
|
|
|
|
<!--<li><%#= link_to "新闻回复", user_message_path(User.current, :type => 'forge_news_reply'), :class => "resourcesGrey" %></li>-->
|
2015-08-28 17:05:27 +08:00
|
|
|
<%# 项目相关消息 %>
|
2015-08-31 16:41:52 +08:00
|
|
|
<li><%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "resourcesGrey" %></li>
|
2015-08-28 17:05:27 +08:00
|
|
|
<%# 系统贴吧 %>
|
2015-08-31 16:41:52 +08:00
|
|
|
<li><%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "resourcesGrey" %></li>
|
2015-08-28 17:05:27 +08:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="resources mt10" id="users_setting">
|
|
|
|
<div>
|
|
|
|
<% if @message_alls.count >0 %>
|
2015-09-07 16:14:34 +08:00
|
|
|
<% if params[:type].nil? || params[:type] == "unviewed" %>
|
|
|
|
<div class="newsReadSetting">
|
|
|
|
有 <span class="c_red"><%= unviewed_message(@user) %></span> 条未读
|
|
|
|
<% unless unviewed_message(@user) == 0 %>
|
|
|
|
<a href="javascript:void(0);" class="ml15"><%= link_to "全部设为已读", user_message_path(User.current, :viewed => 'all') %></a>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2015-09-09 17:43:33 +08:00
|
|
|
<%# 系统消息 %>
|
|
|
|
<% @user_system_messages.each do |usm| %>
|
|
|
|
<ul class="homepageNewsList fl">
|
2015-09-10 11:39:53 +08:00
|
|
|
<li class="homepageNewsPortrait fl">
|
|
|
|
<a href="javascript:void(0);">
|
|
|
|
<div class="navHomepageLogo fl">
|
|
|
|
<%=image_tag("/images/logo.png",width:"30px", height: "30px",class: "mt3") %>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl"><span class="newsBlue homepageNewsPublisher" >Trustie平台</span><span class="homepageNewsType fl">发布新消息:</span></li>
|
2015-09-09 17:43:33 +08:00
|
|
|
<li class="homepageNewsContent fl">
|
2015-09-10 15:47:51 +08:00
|
|
|
<%= link_to usm.content.html_safe, {:controller => 'system_messages', :action => 'index'},
|
2015-09-09 17:43:33 +08:00
|
|
|
:class =>"newsGrey",
|
2015-09-11 09:48:16 +08:00
|
|
|
:onmouseover =>"message_titile_show($(this),event);",
|
|
|
|
:onmouseout => "message_titile_hide($(this));"
|
|
|
|
%>
|
|
|
|
</li>
|
|
|
|
<div style="display:none;" class="message_title">
|
2015-09-11 10:30:01 +08:00
|
|
|
<%= usm.content.html_safe%>
|
2015-09-11 09:48:16 +08:00
|
|
|
</div>
|
2015-09-09 17:43:33 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(usm.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
2015-08-28 17:05:27 +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">
|
|
|
|
<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>
|
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了通知:</span></li>
|
|
|
|
<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>
|
2015-08-30 11:20:37 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-08-28 17:05:27 +08:00
|
|
|
</ul>
|
2015-08-24 14:29:38 +08:00
|
|
|
<% end %>
|
2015-08-28 17:05:27 +08:00
|
|
|
<% if ma.course_message_type == "Comment" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<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>
|
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span></li>
|
|
|
|
<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"}",
|
2015-09-02 16:21:47 +08:00
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></li>
|
2015-09-02 20:06:47 +08:00
|
|
|
<div style="display: none" class="message_title">
|
2015-09-02 16:21:47 +08:00
|
|
|
<%= ma.course_message.comments.html_safe %>
|
|
|
|
</div>
|
2015-08-30 11:20:37 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-08-28 17:05:27 +08:00
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.course_message_type == "HomeworkCommon" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<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>
|
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了作业:</span></li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-09-02 09:25:34 +08:00
|
|
|
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.course_message.name}" %></a></li>
|
2015-08-30 11:20:37 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-08-28 17:05:27 +08:00
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.course_message_type == "Poll" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<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>
|
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了问卷:</span></li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_path(ma.course_message.id),
|
|
|
|
:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
|
|
|
|
:title => "#{ma.course_message.polls_name}" %></a></li>
|
2015-08-30 11:20:37 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-08-28 17:05:27 +08:00
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.course_message_type == "Message" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<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>
|
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %></span></li>
|
2015-09-02 19:35:51 +08:00
|
|
|
<% if ma.course_message.parent_id.nil? %>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%= link_to ma.course_message.subject, 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>
|
|
|
|
<% else %>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%= link_to ma.course_message.content.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"}",
|
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
2015-09-02 20:06:47 +08:00
|
|
|
<div style="display: none" class="message_title" >
|
2015-09-02 19:35:51 +08:00
|
|
|
<%= ma.course_message.content.html_safe %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2015-08-30 11:20:37 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-08-24 14:29:38 +08:00
|
|
|
|
2015-08-28 17:05:27 +08:00
|
|
|
</ul>
|
2015-08-24 14:29:38 +08:00
|
|
|
<% end %>
|
2015-08-28 17:05:27 +08:00
|
|
|
<% if ma.course_message_type == "StudentWorksScore" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<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>
|
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.status == 0 ? "评阅了作品:" : "重新评阅了作品:" %></span></li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<% unless ma.content.nil? %>
|
2015-09-02 09:25:34 +08:00
|
|
|
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",:title => "#{ma.content.html_safe}" %></a></li>
|
2015-08-28 17:05:27 +08:00
|
|
|
<% end %>
|
2015-08-30 11:20:37 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-08-25 11:10:08 +08:00
|
|
|
</ul>
|
2015-08-24 14:29:38 +08:00
|
|
|
<% end %>
|
2015-08-28 17:05:27 +08:00
|
|
|
<% if ma.course_message_type == "JournalsForMessage" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<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>
|
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">回复了作品评论:</span></li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-09-02 09:25:34 +08:00
|
|
|
<%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",:title => "#{ma.course_message.notes}" %></a></li>
|
2015-08-30 11:20:37 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-08-28 17:05:27 +08:00
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<!--项目消息-->
|
|
|
|
<% if ma.class == ForgeMessage %>
|
2015-09-08 16:55:36 +08:00
|
|
|
<% if ma.forge_message_type == "AppliedProject" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
|
|
|
<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>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">申请加入项目:</span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-09-08 17:26:10 +08:00
|
|
|
<%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",:title => "#{ma.project}" %></a>
|
2015-09-08 16:55:36 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
2015-08-28 17:05:27 +08:00
|
|
|
<% if ma.forge_message_type == "Issue" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<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>
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">指派了问题给你:</span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%= 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>
|
|
|
|
</li>
|
2015-08-30 11:20:37 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-08-28 17:05:27 +08:00
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.forge_message_type == "Journal" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
|
|
|
<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>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
|
|
|
更新了问题状态:</span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%= link_to get_issue_des_update(ma.forge_message).html_safe,
|
|
|
|
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
:title => "#{get_issue_des_update(ma.forge_message).html_safe}" %></a>
|
|
|
|
</li>
|
2015-08-30 11:20:37 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-08-28 17:05:27 +08:00
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.forge_message_type == "Message" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<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>
|
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span></li>
|
2015-09-02 19:35:51 +08:00
|
|
|
<% if ma.forge_message.parent_id.nil? %>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%=link_to ma.forge_message.subject, 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>
|
|
|
|
<% else %>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%=link_to ma.forge_message.content.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"}",
|
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
2015-09-02 20:06:47 +08:00
|
|
|
<div style="display: none" class="message_title">
|
2015-09-02 19:35:51 +08:00
|
|
|
<%= ma.forge_message.content.html_safe %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2015-08-30 11:20:37 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-08-28 17:05:27 +08:00
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.forge_message_type == "News" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<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>
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了新闻:</span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-09-02 09:25:34 +08:00
|
|
|
<%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id}, :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.forge_message.title.html_safe}" %></a>
|
2015-08-28 17:05:27 +08:00
|
|
|
</li>
|
2015-08-30 11:20:37 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-08-28 17:05:27 +08:00
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.forge_message_type == "Comment" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<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>
|
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了新闻:</span></li>
|
|
|
|
<li class="homepageNewsContent fl">
|
|
|
|
<%= link_to "#{ma.forge_message.comments.html_safe}",
|
2015-09-02 16:21:47 +08:00
|
|
|
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
:title => "#{ma.forge_message.comments.html_safe}" %>
|
|
|
|
</li>
|
2015-08-30 11:20:37 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-08-28 17:05:27 +08:00
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<!--公共贴吧-->
|
|
|
|
<% if ma.class == MemoMessage %>
|
|
|
|
<% if ma.memo_type == "Memo" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
|
|
|
<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>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
<%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher" %>
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>" ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %></span>
|
|
|
|
</li>
|
2015-09-02 19:35:51 +08:00
|
|
|
<% if ma.memo.parent_id.nil? %>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
:title => "#{ma.memo.subject}" %></a>
|
|
|
|
</li>
|
|
|
|
<% else %>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%= link_to ma.memo.content.html_safe, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
|
|
|
</li>
|
2015-09-02 20:06:47 +08:00
|
|
|
<div style="display: none" class="message_title">
|
2015-09-02 19:35:51 +08:00
|
|
|
<%= ma.memo.content.html_safe %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2015-08-28 17:05:27 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.memo.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<!--用户留言-->
|
|
|
|
<% if ma.class == UserFeedbackMessage %>
|
|
|
|
<% if ma.journals_for_message_type == "JournalsForMessage" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
|
|
|
<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>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
<%=link_to ma.journals_for_message.user, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %></span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-09-02 16:21:47 +08:00
|
|
|
<%= link_to ma.journals_for_message.notes.html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
2015-08-28 17:05:27 +08:00
|
|
|
</li>
|
2015-09-02 20:06:47 +08:00
|
|
|
<div style="display: none" class="message_title" >
|
2015-09-02 16:21:47 +08:00
|
|
|
<%= ma.journals_for_message.notes.html_safe %>
|
|
|
|
</div>
|
2015-08-28 17:05:27 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
|
2015-09-01 17:37:43 +08:00
|
|
|
|
2015-08-28 17:05:27 +08:00
|
|
|
</ul>
|
2015-08-24 14:29:38 +08:00
|
|
|
<% end %>
|
2015-08-21 09:41:59 +08:00
|
|
|
<% end %>
|
2015-09-10 11:42:53 +08:00
|
|
|
<%# 系统消息 %>
|
2015-09-10 11:39:53 +08:00
|
|
|
<% if ma.class == SystemMessage %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
|
|
|
<a href="javascript:void(0);">
|
|
|
|
<div class="navHomepageLogo fl">
|
|
|
|
<%=image_tag("/images/logo.png",width:"30px", height: "30px",class: "mt3")%>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl"><span class="newsBlue homepageNewsPublisher" >Trustie平台</span><span class="homepageNewsType fl">发布新消息:</span></li>
|
|
|
|
<li class="homepageNewsContent fl">
|
2015-09-10 15:47:51 +08:00
|
|
|
<%= link_to ma.content.html_safe, {:controller => 'system_messages', :action => 'index'},
|
2015-09-10 11:39:53 +08:00
|
|
|
:class =>"newsGrey",
|
2015-09-11 09:48:16 +08:00
|
|
|
:onmouseover =>"message_titile_show($(this),event);",
|
|
|
|
:onmouseout => "message_titile_hide($(this));"
|
|
|
|
%>
|
|
|
|
</li>
|
|
|
|
<div style="display:none;" class="message_title">
|
|
|
|
<%= ma.content.html_safe%>
|
|
|
|
</div>
|
2015-09-10 11:39:53 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
2015-08-21 09:41:59 +08:00
|
|
|
<% end %>
|
2015-08-28 17:05:27 +08:00
|
|
|
<ul class="wlist" style=" border:none; padding-top: 15px;">
|
|
|
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
|
|
|
</ul>
|
2015-08-21 09:41:59 +08:00
|
|
|
<% end %>
|
2015-08-28 17:05:27 +08:00
|
|
|
|
|
|
|
<!--项目消息-->
|
|
|
|
<% else %>
|
|
|
|
<div class="flash notice">您目前还没有相关消息!</div>
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-08-21 17:40:28 +08:00
|
|
|
|
2015-09-02 16:21:47 +08:00
|
|
|
<script>
|
|
|
|
function message_titile_show(obj,e)
|
|
|
|
{
|
|
|
|
obj.parent().next("div").show();
|
2015-09-02 20:06:47 +08:00
|
|
|
obj.parent().next("div").css("top",e.pageY).css("left",e.pageX).css("position","absolute");
|
2015-09-02 16:21:47 +08:00
|
|
|
}
|
|
|
|
function message_titile_hide(obj)
|
|
|
|
{
|
|
|
|
obj.parent().next("div").hide();
|
|
|
|
}
|
|
|
|
</script>
|
2015-08-24 14:29:38 +08:00
|
|
|
|
2015-09-01 17:37:43 +08:00
|
|
|
|
2015-08-24 14:29:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|