Innov用户消息通知报500,并将Pull request的登录名改为姓名
This commit is contained in:
parent
d7e067a82e
commit
2a768cbd49
|
@ -12,7 +12,7 @@
|
|||
<%= link_to "", project_pull_request_path(request.id, :project_id => @project.id), :class => "issues_icons_mes fr mr5 ml5" %>
|
||||
</div>
|
||||
<div class="c_grey clear mt5">
|
||||
<p class="fl">由 <%= link_to request.author.try(:username), user_path(get_user_by_login_and(request.author.try(:username))), :class => "linkBlue2" %> 创建于<%= time_tag(request.created_at) %>前</p>
|
||||
<p class="fl">由 <%= link_to User.find(request.author.id).try(:show_name), user_path(get_user_by_login_and(request.author.try(:username))), :class => "linkBlue2" %> 创建于<%= time_tag(request.created_at) %>前</p>
|
||||
<span class="fl ml10"><%= time_tag(request.updated_at) %>前更新</span>
|
||||
<p class="fr"><%= @project.name+"/"+request.source_branch %><span class="c_grey02 ml10 mr10">合并到</span><%= request.target_branch %></p>
|
||||
</div>
|
||||
|
|
|
@ -28,8 +28,15 @@
|
|||
<% end %>
|
||||
<% if ma.course_message_type == "Comment" && ma.course_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), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to User.find(ma.course_message.author_id).show_name, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span></li>
|
||||
<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), :target => '_blank' %>
|
||||
</a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.course_message.author_id).show_name, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to ma.course_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" , :target => '_blank'%>
|
||||
|
@ -48,8 +55,13 @@
|
|||
<% end %>
|
||||
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? && ma.course_message %>
|
||||
<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), :target => '_blank' %></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", :target => '_blank' %>
|
||||
<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), :target => '_blank' %>
|
||||
</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", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了班级作业:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
|
@ -255,7 +267,13 @@
|
|||
<% end %>
|
||||
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 6 && ma.course_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag(url_to_avatar(User.find(ma.apply_user_id)), width: "30px", height: "30px", class: "mt3") %></div></a></li>
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);">
|
||||
<div class="navHomepageLogo fl">
|
||||
<%= image_tag(url_to_avatar(User.find(ma.apply_user_id)), width: "30px", height: "30px", class: "mt3") %>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.show_name,
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
|
@ -280,8 +298,15 @@
|
|||
<% end %>
|
||||
<% if ma.course_message_type == "Poll" && ma.course_message %>
|
||||
<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), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了问卷:</span></li>
|
||||
<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), :target => '_blank' %>
|
||||
</a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.course_message.user).show_name, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<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"}", :target => '_blank' %>
|
||||
|
@ -296,9 +321,14 @@
|
|||
<% end %>
|
||||
<% if ma.course_message_type == "Message" && !ma.nil? && !ma.course_message.nil? %>
|
||||
<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), :target => '_blank' %></a></li>
|
||||
<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), :target => '_blank' %>
|
||||
</a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.course_message.author.show_name, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
|
||||
<%=link_to User.find(ma.course_message.author).show_name, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
|
||||
<%= ma.course_message.parent_id.nil? ? "发布了班级帖子:" : "评论了班级帖子:" %></span></li>
|
||||
<% if ma.course_message.parent_id.nil? %>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
|
@ -388,9 +418,12 @@
|
|||
<% 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), :target => '_blank' %></a>
|
||||
<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), :target => '_blank' %>
|
||||
</a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to User.find(ma.course_message.user).show_name, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">在班级中留言了:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
|
@ -409,9 +442,12 @@
|
|||
<% elsif ma.course_message.jour_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), :target => '_blank' %></a>
|
||||
<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), :target => '_blank' %>
|
||||
</a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to User.find(ma.course_message.user).show_name, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
||||
<% if ma.course_message.m_parent_id.nil? %>
|
||||
回复了您的<span class="fontBlue2" title="作业:<%=ma.course_message.jour.name %>">作业</span>:
|
||||
|
@ -435,7 +471,9 @@
|
|||
<% 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), :target => '_blank' %></a>
|
||||
<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), :target => '_blank' %>
|
||||
</a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname +
|
||||
|
@ -452,7 +490,8 @@
|
|||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p>
|
||||
<%= User.current.show_name %>老师您好!
|
||||
<%= ma.course_message.user.show_name%><%= ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"%>回复了您的作品评论。详情如下:
|
||||
<%= User.find(ma.course_message.user).show_name %>
|
||||
<%= ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"%>回复了您的作品评论。详情如下:
|
||||
</p>
|
||||
<ul class="ul_normal_color">
|
||||
<li>回复内容:<span style="color:red;"><%= ma.course_message.notes %></span></li>
|
||||
|
|
|
@ -162,7 +162,7 @@
|
|||
<% 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), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to User.find(ma.forge_message.user_id).show_name, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<li class="homepageNewsPubType fl"><%=link_to User.find(ma.forge_message.author).show_name, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span></li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.forge_message.subject, board_message_path(ma.forge_message.board_id, ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
|
@ -181,7 +181,7 @@
|
|||
</a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.forge_message.user_id).show_name, user_path(ma.forge_message.author),
|
||||
<%=link_to User.find(ma.forge_message.author).show_name, user_path(ma.forge_message.author),
|
||||
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了新闻:</span>
|
||||
</li>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
class DeleteErrorMessageAllAndOrgMessage < ActiveRecord::Migration
|
||||
def up
|
||||
MessageAll.where("message_type = 'OrgMessage' and message_id in(15, 17, 18, 19, 170, 172, 173)").destroy_all
|
||||
OrgMessage.where("organization_id in (30, 82)").destroy_all
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue