2015-09-02 14:15:26 +08:00
|
|
|
<div class="homepageRightBanner">
|
2015-09-17 14:41:03 +08:00
|
|
|
<div class="NewsBannerName"><%= title_for_message(params[:type]) %></div>
|
|
|
|
<ul class="resourcesSelect">
|
|
|
|
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
|
|
|
<ul class="newsType">
|
|
|
|
<li><%= link_to "全部",user_message_path(User.current), :class => "resourcesGrey" %></li>
|
|
|
|
<li><%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "resourcesGrey" %></li>
|
|
|
|
<li><%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %></li>
|
|
|
|
<%# 课程相关消息 %>
|
|
|
|
<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>
|
|
|
|
<li><%= link_to "课程通知",user_message_path(User.current, :type => 'course_news'), :class => "resourcesGrey" %></li>
|
|
|
|
<!--<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>-->
|
|
|
|
<%# 项目相关消息 %>
|
|
|
|
<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>-->
|
|
|
|
<%# 项目相关消息 %>
|
|
|
|
<li><%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "resourcesGrey" %></li>
|
|
|
|
<%# 系统贴吧 %>
|
|
|
|
<li><%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "resourcesGrey" %></li>
|
|
|
|
<%# 系统消息 %>
|
2015-09-18 13:30:25 +08:00
|
|
|
<li><%= link_to "系统消息", user_system_messages_path(User.current), :class => "resourcesGrey" %></li>
|
2015-09-17 14:41:03 +08:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2015-08-28 17:05:27 +08:00
|
|
|
<div class="resources mt10" id="users_setting">
|
|
|
|
<div>
|
2015-09-17 12:59:52 +08:00
|
|
|
<% if @message_alls.count >0 || @user_system_messages.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> 条未读
|
2015-09-11 15:55:51 +08:00
|
|
|
<% unless (unviewed_message(@user) == 0 || User.current != @user) %>
|
2015-09-07 16:14:34 +08:00
|
|
|
<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
|
|
|
<%# 系统消息 %>
|
2015-09-17 14:41:03 +08:00
|
|
|
<% if params[:type] != 'system_messages' %>
|
|
|
|
<% @user_system_messages.each do |usm| %>
|
|
|
|
<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>
|
2015-09-28 10:20:14 +08:00
|
|
|
<span style="color: red;float: left">【系统消息】</span>
|
2015-09-18 09:35:26 +08:00
|
|
|
<li class="homepageSystenMessageContent fl">
|
|
|
|
|
2015-09-19 12:58:45 +08:00
|
|
|
<%= link_to usm.subject.blank? ? (usm.content.nil? ? usm.description.html_safe : usm.content.html_safe) : usm.subject, user_system_messages_path(User.current),
|
2015-09-17 14:41:03 +08:00
|
|
|
:id => "content_link_#{usm.id}",
|
|
|
|
:onmouseover =>"message_titile_show($(this),event);",
|
|
|
|
:onmouseout => "message_titile_hide($(this));"
|
|
|
|
%>
|
|
|
|
</li>
|
|
|
|
<div style="display:none;" class="message_title_red system_message_style">
|
2015-09-19 12:58:45 +08:00
|
|
|
<% unless usm.subject.blank? %>
|
2015-09-18 17:49:43 +08:00
|
|
|
<p><strong>标题:</strong><%= usm.subject %></p>
|
2015-09-18 17:01:30 +08:00
|
|
|
<% end %>
|
2015-09-19 12:58:45 +08:00
|
|
|
<% if (!usm.description.blank?) || (!usm.content.blank?) %>
|
2015-09-19 11:29:51 +08:00
|
|
|
<div class="fl"><strong>内容:</strong></div><div class="ml36"><%= usm.description.nil? ? usm.content.html_safe : usm.description.html_safe %></div>
|
2015-09-18 16:09:55 +08:00
|
|
|
<% end %>
|
2015-09-17 14:41:03 +08:00
|
|
|
</div>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(usm.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2015-09-18 23:18:15 +08:00
|
|
|
<!--总消息列表-->
|
2015-08-28 17:05:27 +08:00
|
|
|
<% unless @message_alls.nil? %>
|
|
|
|
<% @message_alls.each do |ma| %>
|
2015-09-18 23:18:15 +08:00
|
|
|
<%# 课程消息 %>
|
2015-08-28 17:05:27 +08:00
|
|
|
<% 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"}",
|
2015-09-18 11:25:23 +08:00
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></li>
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-19 10:25:58 +08:00
|
|
|
<p><strong>标题:</strong><%= ma.course_message.title %></p>
|
2015-09-19 10:57:42 +08:00
|
|
|
<% unless ma.course_message.description.nil? %>
|
|
|
|
<div class="fl"><strong>内容:</strong></div>
|
|
|
|
<div class="ml36"><%= ma.course_message.description.html_safe %></div>
|
|
|
|
<% end %>
|
2015-09-18 11:25:23 +08:00
|
|
|
</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>
|
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-18 11:25:23 +08:00
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-19 10:25:58 +08:00
|
|
|
<p><strong>标题:</strong><%= ma.course_message.commented.title %></p>
|
2015-09-19 10:57:42 +08:00
|
|
|
<% unless ma.course_message.comments.nil? %>
|
|
|
|
<div class="fl"><strong>内容:</strong></div>
|
|
|
|
<div class="ml36"><%= ma.course_message.comments.html_safe %></div>
|
|
|
|
<% end %>
|
2015-09-02 16:21:47 +08:00
|
|
|
</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 %>
|
2015-09-19 10:54:50 +08:00
|
|
|
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? %>
|
2015-08-28 17:05:27 +08:00
|
|
|
<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>
|
2015-09-25 09:27:03 +08:00
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了课程作业:</span>
|
2015-09-23 14:53:50 +08:00
|
|
|
</li>
|
2015-09-25 09:27:03 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-09-18 11:25:23 +08:00
|
|
|
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
|
|
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-25 18:19:23 +08:00
|
|
|
<% if User.current.allowed_to?(:as_teacher,ma.course_message) %>
|
2015-09-25 09:27:03 +08:00
|
|
|
<p>
|
|
|
|
<%= User.current.lastname + User.current.firstname %>老师您好!
|
2015-09-25 10:13:34 +08:00
|
|
|
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
|
2015-09-25 09:27:03 +08:00
|
|
|
</p>
|
2015-09-25 09:40:30 +08:00
|
|
|
<p>课程名称:<%= ma.course_message.course.name %>
|
2015-09-23 16:46:29 +08:00
|
|
|
(<%= ma.course_message.course.term %>)</p>
|
2015-09-25 10:13:34 +08:00
|
|
|
<p>作业标题:<span style="color:Red"><%= ma.course_message.name %></span></p>
|
2015-09-25 10:18:43 +08:00
|
|
|
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 24点</span></p>
|
2015-09-25 10:13:34 +08:00
|
|
|
<p>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %> 24点</span></p>
|
2015-09-25 11:04:46 +08:00
|
|
|
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 24点</span></p>
|
2015-09-25 10:13:34 +08:00
|
|
|
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
|
|
|
|
<p>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></p>
|
2015-09-23 16:46:29 +08:00
|
|
|
<p>
|
|
|
|
您可以修改作业内容、评分规则、匿评过程等,谢谢!
|
|
|
|
</p>
|
2015-09-25 18:19:23 +08:00
|
|
|
<% else %>
|
|
|
|
<p><%= User.current.lastname + User.current.firstname %>同学你好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:</p>
|
|
|
|
<p>课程名称:<%= ma.course_message.course.name %>
|
|
|
|
(<%= ma.course_message.course.term %>)</p>
|
|
|
|
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
|
|
|
|
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 24点</span></p>
|
|
|
|
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 24点</span></p>
|
|
|
|
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
|
|
|
|
<p>
|
|
|
|
请抓紧时间提交自己的作品,谢谢!
|
|
|
|
</p>
|
2015-09-19 10:57:42 +08:00
|
|
|
<% end %>
|
2015-09-18 11:25:23 +08:00
|
|
|
</div>
|
2015-08-30 11:20:37 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
2015-09-11 14:41:23 +08:00
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 %>
|
|
|
|
<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>
|
2015-09-25 11:04:46 +08:00
|
|
|
<li class="homepageHomeworkContent fl">
|
|
|
|
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
|
|
|
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %>
|
|
|
|
</li>
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
<% if User.current.members.where("course_id = ?", ma.course_message.course.id).first.roles.first.name == 'Student' %>
|
|
|
|
<p>
|
|
|
|
<%= User.current.lastname + User.current.firstname %>同学您好!
|
|
|
|
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
|
|
|
|
|
|
|
|
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
|
|
|
|
|
|
|
|
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>@nbsp; 24点</span></p>
|
|
|
|
|
|
|
|
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>
|
|
|
|
@nbsp;@nbsp;24点</span></p>
|
|
|
|
|
|
|
|
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
请同学们抓紧时间提交自己的作品,谢谢!
|
|
|
|
</p>
|
|
|
|
<% else %>
|
2015-09-28 11:22:00 +08:00
|
|
|
<p><%= User.current.lastname + User.current.firstname %>老师您好!
|
2015-09-25 11:04:46 +08:00
|
|
|
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>
|
|
|
|
老师发布的作业截止日期快到了:</p>
|
|
|
|
|
2015-09-28 10:20:14 +08:00
|
|
|
<p>课程名称:<%= ma.course_message.course.name %>
|
2015-09-25 11:04:46 +08:00
|
|
|
(<%= ma.course_message.course.term %>)</p>
|
|
|
|
|
2015-09-28 11:22:00 +08:00
|
|
|
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
|
2015-09-25 11:04:46 +08:00
|
|
|
|
2015-09-28 10:20:14 +08:00
|
|
|
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>@nbsp;@nbsp;24点</span></p>
|
2015-09-25 11:04:46 +08:00
|
|
|
|
2015-09-28 10:20:14 +08:00
|
|
|
<p>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>
|
|
|
|
@nbsp;@nbsp;24点</span></p>
|
2015-09-25 11:04:46 +08:00
|
|
|
|
2015-09-28 10:20:14 +08:00
|
|
|
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>
|
|
|
|
@nbsp;@nbsp;24点</span></p>
|
2015-09-25 11:04:46 +08:00
|
|
|
|
2015-09-28 10:20:14 +08:00
|
|
|
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
|
2015-09-25 11:04:46 +08:00
|
|
|
|
2015-09-28 10:20:14 +08:00
|
|
|
<p>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span>
|
2015-09-25 11:04:46 +08:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
您可以修改作业内容、评分规则、匿评过程等,谢谢!
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<li class="homepageHomeworkContentWarn fl"> 截止时间快到了!</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 %>
|
2015-09-24 14:48:48 +08:00
|
|
|
<!--作品开启匿评 待整合:时间紧-->
|
|
|
|
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 %>
|
|
|
|
<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.lastname + ma.course_message.user.firstname + "老师",
|
|
|
|
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">启动了作业匿评:</span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl">
|
|
|
|
<%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %>
|
|
|
|
</li>
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-28 11:22:00 +08:00
|
|
|
<p>
|
|
|
|
<%= User.current.lastname + User.current.firstname %><%= User.current.members.where("course_id=?", ma.course.id).first.roles.first.name == 'Student' ? '同学' : '老师' %>
|
|
|
|
您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师开启了匿评,作业详情如下:
|
|
|
|
</p>
|
|
|
|
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
|
|
|
|
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
匿评开启:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 24点</span>
|
2015-09-24 14:48:48 +08:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
2015-09-19 10:54:50 +08:00
|
|
|
<!--作品关闭匿评-->
|
|
|
|
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 3 %>
|
|
|
|
<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>
|
2015-09-24 14:48:48 +08:00
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
<%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
|
|
|
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">关闭了作业匿评:</span></li>
|
2015-09-19 10:54:50 +08:00
|
|
|
<li class="homepageNewsContent fl">
|
2015-09-24 14:48:48 +08:00
|
|
|
<%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
2015-09-19 10:54:50 +08:00
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))"%>
|
|
|
|
</li>
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-28 11:22:00 +08:00
|
|
|
<p>
|
|
|
|
<%= User.current.lastname + User.current.firstname %><%= User.current.members.where("course_id=?", ma.course.id).first.roles.first.name == 'Student' ? '同学':'老师'%>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师关闭了匿评,作业详情如下:
|
|
|
|
</p>
|
|
|
|
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
|
2015-09-24 14:48:48 +08:00
|
|
|
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
|
|
|
<% unless ma.course_message.description.blank? %>
|
|
|
|
<div class="fl"><strong>作业内容:</strong></div>
|
|
|
|
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
|
|
|
|
<% end %>
|
2015-09-19 10:54:50 +08:00
|
|
|
</div>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
|
2015-09-24 17:11:39 +08:00
|
|
|
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 4 %>
|
|
|
|
<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.lastname + ma.course_message.user.firstname + "老师",
|
|
|
|
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">启动作业匿评失败</span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl">
|
|
|
|
<%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %>
|
|
|
|
</li>
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师启动作业匿评失败,作业详情如下:</p>
|
|
|
|
<p><strong>课程:</strong><%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
|
|
|
|
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
|
|
|
<% unless ma.course_message.description.blank? %>
|
|
|
|
<div class="fl"><strong>作业内容:</strong></div>
|
|
|
|
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
|
2015-08-28 17:05:27 +08:00
|
|
|
<% 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"}",
|
2015-09-18 11:25:23 +08:00
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
<%= ma.course_message.polls_name %>
|
|
|
|
</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 == "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"}",
|
2015-09-19 10:57:42 +08:00
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
|
|
|
<div style="display: none" class="message_title_red system_message_style" >
|
|
|
|
<p><strong>主题:</strong><%= ma.course_message.subject %></p>
|
|
|
|
<% unless ma.course_message.content.nil? %>
|
|
|
|
<div class="fl"><strong>内容:</strong></div>
|
|
|
|
<div class="ml36"><%= ma.course_message.content.html_safe %></div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2015-09-02 19:35:51 +08:00
|
|
|
<% 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-18 11:25:23 +08:00
|
|
|
<div style="display: none" class="message_title_red system_message_style" >
|
2015-09-19 10:25:58 +08:00
|
|
|
<p><strong>主题:</strong><%= ma.course_message.subject %></p>
|
2015-09-19 10:57:42 +08:00
|
|
|
<% unless ma.course_message.content.nil? %>
|
|
|
|
<div class="fl"><strong>内容:</strong></div>
|
|
|
|
<div class="ml36"><%= ma.course_message.content.html_safe %></div>
|
|
|
|
<% end %>
|
2015-09-02 19:35:51 +08:00
|
|
|
</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">
|
2015-09-25 08:59:34 +08:00
|
|
|
<li class="homepageNewsPortrait fl">
|
|
|
|
<% if ma.course_message.reviewer_role == 3 %>
|
|
|
|
<%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30") %>
|
|
|
|
<% else %>
|
|
|
|
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
2015-09-24 11:07:09 +08:00
|
|
|
<li class="homepageNewsPubType fl">
|
2015-09-25 08:59:34 +08:00
|
|
|
<% if ma.course_message.reviewer_role == 3 %>
|
2015-09-25 11:22:35 +08:00
|
|
|
<span class="newsBlue homepageNewsPublisher">匿名用户</span>
|
2015-09-25 08:59:34 +08:00
|
|
|
<% else %>
|
|
|
|
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
|
|
|
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
|
|
|
<% end %>
|
2015-09-24 11:07:09 +08:00
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
|
|
|
<%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %>
|
|
|
|
</span>
|
|
|
|
</li>
|
2015-08-28 17:05:27 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<% unless ma.content.nil? %>
|
2015-09-18 11:25:23 +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"}",
|
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
|
|
|
<div style="display: none" class="message_title_red system_message_style" >
|
|
|
|
<%= ma.content.html_safe %>
|
2015-09-24 11:07:09 +08:00
|
|
|
<p><strong>课程:</strong><%= ma.course.name %>
|
|
|
|
(<%= ma.course.term %>)</p>
|
|
|
|
<p><strong>作业标题:</strong><%=ma.course_message.student_work.homework_common.name %></p>
|
|
|
|
<% unless ma.course_message.student_work.homework_common.description.blank? %>
|
|
|
|
<div class="fl"><strong>作业内容:</strong></div>
|
|
|
|
<div class="ml60"><%= ma.course_message.student_work.homework_common.description.html_safe %></div>
|
|
|
|
<% end %>
|
2015-09-18 11:25:23 +08:00
|
|
|
</div>
|
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-09-17 14:41:03 +08:00
|
|
|
<% if ma.course_message_type == "JournalsForMessage" %>
|
|
|
|
<% if ma.course_message.jour_type == 'Course' %>
|
2015-09-25 16:30:00 +08:00
|
|
|
<% if params[:type] != 'homework' %>
|
|
|
|
<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 ma.course_message.notes.html_safe, course_feedback_path(:id => ma.course_id),
|
|
|
|
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
|
|
|
</li>
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
<%= ma.course_message.notes.html_safe %>
|
|
|
|
</div>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
2015-09-17 14:41:03 +08:00
|
|
|
<% else %>
|
|
|
|
<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>
|
2015-09-24 11:07:09 +08:00
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname +
|
|
|
|
"#{ma.course_message.user.members.where("course_id=?", ma.course.id).first.roles.first.name=='Student'?"同学":"老师"}",
|
|
|
|
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
2015-09-17 14:41:03 +08:00
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">回复了作品评论:</span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-09-18 11:25:23 +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"}",
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
2015-09-17 14:41:03 +08:00
|
|
|
</li>
|
2015-09-18 11:25:23 +08:00
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-24 11:07:09 +08:00
|
|
|
<div class="fl"><strong>回复内容:</strong></div>
|
|
|
|
<div class="ml60"><%= ma.course_message.notes %></div>
|
|
|
|
<div class="fl"><strong>您的作品评论:</strong></div>
|
|
|
|
<div class="ml80"><%= ma.course_message.jour.comment %></div>
|
|
|
|
<p><strong>课程:</strong><%= ma.course.name %>(<%= ma.course.term %>)</p>
|
|
|
|
<p><strong>作业标题:</strong><%=ma.course_message.jour.student_work.homework_common.name %></p>
|
|
|
|
<% unless ma.course_message.jour.student_work.homework_common.description.blank? %>
|
|
|
|
<div class="fl"><strong>作业内容:</strong></div>
|
|
|
|
<div class="ml60"><%= ma.course_message.jour.student_work.homework_common.description.html_safe %></div>
|
|
|
|
<% end %>
|
2015-09-18 11:25:23 +08:00
|
|
|
</div>
|
2015-09-17 14:41:03 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2015-08-28 17:05:27 +08:00
|
|
|
<% end %>
|
|
|
|
<!--项目消息-->
|
|
|
|
<% if ma.class == ForgeMessage %>
|
2015-09-18 23:18:15 +08:00
|
|
|
<!--申请加入项目-->
|
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-18 11:25:23 +08:00
|
|
|
<%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
2015-09-08 16:55:36 +08:00
|
|
|
</li>
|
2015-09-18 11:25:23 +08:00
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
<%= ma.project %>
|
|
|
|
</div>
|
2015-09-08 16:55:36 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
2015-09-18 23:18:15 +08:00
|
|
|
<!--邀请加入项目-->
|
|
|
|
<% if ma.forge_message_type == "ProjectInvite" %>
|
|
|
|
<% inviter = User.find(ma.forge_message_id) %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(inviter), :width => "30", :height => "30"), user_path(inviter) %></a>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
<%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher" %>
|
2015-09-21 14:28:22 +08:00
|
|
|
<span class='<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl' : 'homepageNewsType fl' %>'>邀请你加入项目</span>
|
2015-09-18 23:18:15 +08:00
|
|
|
</li>
|
2015-09-21 14:28:22 +08:00
|
|
|
<% if ma.user.member_of?(ma.project) %>
|
|
|
|
<li class="homepageNewsContent fl">
|
|
|
|
<% else %>
|
|
|
|
<li class="homepageHomeworkContent fl">
|
|
|
|
<% end %>
|
2015-09-18 23:18:15 +08:00
|
|
|
<%= link_to ma.project, project_path(ma.project),
|
|
|
|
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %>
|
|
|
|
</li>
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
<%= ma.project %>
|
|
|
|
</div>
|
2015-09-21 14:28:22 +08:00
|
|
|
<% unless User.current.member_of?(ma.project) %>
|
|
|
|
<li class="homepageHomeworkContentWarn fl">
|
|
|
|
<%=link_to "同意加入", {:controller => 'projects', :action => 'member', :id => ma.project_id, :message_id =>ma.id, :key => ma.secret_key},
|
|
|
|
:value => ma.secret_key,
|
|
|
|
:class => "green_btn_cir ml10",
|
|
|
|
:style => "color:#fff" %>
|
|
|
|
</li>
|
2015-09-19 09:19:35 +08:00
|
|
|
<% end %>
|
2015-09-18 23:18:15 +08:00
|
|
|
<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" %>
|
2015-09-28 13:29:02 +08:00
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"><%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%></span>
|
2015-08-28 17:05:27 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-09-18 11:25:23 +08:00
|
|
|
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.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-18 11:25:23 +08:00
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-19 10:25:58 +08:00
|
|
|
<p><strong>主题:</strong><%= ma.forge_message.subject %></p>
|
2015-09-19 10:57:42 +08:00
|
|
|
<% unless ma.forge_message.description.nil? || ma.forge_message.description == "" %>
|
|
|
|
<div class="fl"><strong>描述:</strong></div>
|
|
|
|
<div class="ml36"><%= ma.forge_message.description.html_safe %></div>
|
|
|
|
<% end %>
|
2015-09-18 11:25:23 +08:00
|
|
|
</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.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">
|
2015-09-25 16:05:19 +08:00
|
|
|
<%= link_to ma.forge_message.journalized.subject,
|
2015-08-28 17:05:27 +08:00
|
|
|
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
2015-09-16 17:35:08 +08:00
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
2015-08-28 17:05:27 +08:00
|
|
|
</li>
|
2015-09-18 11:25:23 +08:00
|
|
|
<div style="display: none" class="message_title_red system_message_style" >
|
2015-09-18 17:49:43 +08:00
|
|
|
<p><strong>问题标题:</strong><%= ma.forge_message.journalized.subject %></p>
|
|
|
|
<div class="fl"><strong>更新内容:</strong></div>
|
2015-09-19 10:25:58 +08:00
|
|
|
<div class="ml60"><%= get_issue_des_update(ma.forge_message).html_safe %></div>
|
2015-09-16 17:35:08 +08:00
|
|
|
</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.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">
|
2015-09-18 11:25:23 +08:00
|
|
|
<%= 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"}",
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-19 10:25:58 +08:00
|
|
|
<p><strong>主题:</strong><%= ma.forge_message.subject %></p>
|
2015-09-19 10:57:42 +08:00
|
|
|
<% unless ma.forge_message.content.nil? %>
|
|
|
|
<div class="fl"><strong>内容:</strong></div>
|
|
|
|
<div class="ml36"><%= ma.forge_message.content.html_safe %></div>
|
|
|
|
<% end %>
|
2015-09-18 11:25:23 +08:00
|
|
|
</div>
|
2015-09-02 19:35:51 +08:00
|
|
|
<% else %>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-09-25 12:01:21 +08:00
|
|
|
<%= link_to ma.forge_message.subject, project_boards_path(ma.forge_message.project,
|
2015-09-18 11:25:23 +08:00
|
|
|
: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>
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-25 12:01:21 +08:00
|
|
|
<p><strong>帖子主题:</strong><%= ma.forge_message.subject %></p>
|
2015-09-19 10:57:42 +08:00
|
|
|
<% unless ma.forge_message.content.nil? %>
|
2015-09-25 12:01:21 +08:00
|
|
|
<div class="fl"><strong>评论内容:</strong></div>
|
|
|
|
<div class="ml60"><%= ma.forge_message.content.html_safe %></div>
|
2015-09-19 10:57:42 +08:00
|
|
|
<% end %>
|
2015-09-02 19:35:51 +08:00
|
|
|
</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-18 11:25:23 +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"}",
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
2015-08-28 17:05:27 +08:00
|
|
|
</li>
|
2015-09-18 11:25:23 +08:00
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-19 10:25:58 +08:00
|
|
|
<p><strong>标题:</strong><%= ma.forge_message.title %></p>
|
2015-09-19 10:57:42 +08:00
|
|
|
<% unless ma.forge_message.description.nil? %>
|
|
|
|
<div class="fl"><strong>内容:</strong></div>
|
|
|
|
<div class="ml36"><%= ma.forge_message.description.html_safe %></div>
|
|
|
|
<% end %>
|
2015-09-18 11:25:23 +08:00
|
|
|
</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.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"}",
|
2015-09-18 11:25:23 +08:00
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %>
|
2015-09-02 16:21:47 +08:00
|
|
|
</li>
|
2015-09-18 11:25:23 +08:00
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-19 10:25:58 +08:00
|
|
|
<p><strong>新闻标题:</strong><%= ma.forge_message.commented.title %></p>
|
|
|
|
<div class="fl"><strong>评论内容:</strong></div>
|
|
|
|
<div class="ml60"><%= ma.forge_message.comments.html_safe %></div>
|
2015-09-18 11:25:23 +08:00
|
|
|
</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 %>
|
|
|
|
<% 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"}",
|
2015-09-18 11:25:23 +08:00
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
2015-09-02 19:35:51 +08:00
|
|
|
</li>
|
2015-09-18 11:25:23 +08:00
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-18 17:49:43 +08:00
|
|
|
<p><strong>标题:</strong><%= ma.memo.subject %></p>
|
2015-09-19 10:57:42 +08:00
|
|
|
<% unless ma.memo.content.nil? %>
|
|
|
|
<div class="fl"><strong>内容:</strong></div>
|
|
|
|
<div class="ml36"><%= ma.memo.content.html_safe %></div>
|
|
|
|
<% end %>
|
2015-09-18 11:25:23 +08:00
|
|
|
</div>
|
2015-09-02 19:35:51 +08:00
|
|
|
<% 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-18 11:25:23 +08:00
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-18 17:49:43 +08:00
|
|
|
<p><strong>标题:</strong><%= ma.memo.subject %></p>
|
2015-09-19 10:57:42 +08:00
|
|
|
<% unless ma.memo.content.nil? %>
|
|
|
|
<div class="fl"><strong>内容:</strong></div>
|
|
|
|
<div class="ml36"><%= ma.memo.content.html_safe %></div>
|
|
|
|
<% end %>
|
2015-09-02 19:35:51 +08:00
|
|
|
</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-18 11:25:23 +08:00
|
|
|
<div style="display: none" class="message_title_red system_message_style" >
|
2015-09-23 17:37:40 +08:00
|
|
|
<% if ma.journals_for_message.reply_id == 0 %>
|
|
|
|
<%= ma.journals_for_message.notes.html_safe %>
|
|
|
|
<% else %>
|
|
|
|
<div class="fl"><strong>您的留言:</strong></div>
|
|
|
|
<div class="ml60"><%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %></div>
|
|
|
|
<div class="fl"><strong>回复内容:</strong></div>
|
|
|
|
<div class="ml60"><%= ma.journals_for_message.notes.html_safe %></div>
|
|
|
|
<% end %>
|
2015-09-02 16:21:47 +08:00
|
|
|
</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 %>
|
|
|
|
<% 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>
|
2015-09-17 14:41:03 +08:00
|
|
|
function message_titile_show(obj,e)
|
|
|
|
{
|
|
|
|
obj.parent().next("div").show();
|
|
|
|
obj.parent().next("div").css("top",e.pageY).css("left",e.pageX).css("position","absolute");
|
|
|
|
}
|
|
|
|
function message_titile_hide(obj)
|
|
|
|
{
|
|
|
|
obj.parent().next("div").hide();
|
|
|
|
}
|
2015-09-16 11:28:35 +08:00
|
|
|
|
2015-09-17 14:41:03 +08:00
|
|
|
function show_more_system_messages(list,content, id2, id3) {
|
|
|
|
$(list).toggleClass("show_more_li");
|
|
|
|
$(content).toggleClass("show_more_system_message");
|
|
|
|
var information = $(id2);
|
|
|
|
var val = information.attr("value");
|
|
|
|
if (val == "show_more") {
|
|
|
|
$(id2).text("[收起]");
|
|
|
|
information.attr("value", "hide_more");
|
|
|
|
information.attr("style", "color:#3ca5c6");
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$(id2).text("[展开]");
|
|
|
|
information.attr("value", "show_more");
|
|
|
|
information.attr("style", "color:#0781b4;");
|
|
|
|
}
|
|
|
|
}
|
2015-09-02 16:21:47 +08:00
|
|
|
</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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|