Merge branch 'develop' into 'develop'

还原pullrequest小铃铛消息



See merge request !109
This commit is contained in:
黄井泉 2017-01-06 12:17:18 +08:00
commit 62616b022d
2 changed files with 5 additions and 5 deletions

View File

@ -360,7 +360,7 @@ class PullRequestsController < ApplicationController
:project_id => project_id,
:forge_message_id => pull_request_id,
:forge_message_type => "PullRequest",
:viewed => false,
:viewed => true,
:status => status,
:operate_user_id => User.current.id,
)

View File

@ -150,10 +150,10 @@
<li><a href="<%=news_path(ma.forge_message.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> 发布了新闻:<%= ma.forge_message.title.html_safe%>"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span>发布了新闻:<%= ma.forge_message.title.html_safe%></a></li>
<% elsif ma.forge_message_type == "Comment" %>
<li><a href="<%=news_path(ma.forge_message.commented.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> 评论了新闻:<%= ma.forge_message.commented.title%>"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span>评论了新闻:<%= ma.forge_message.commented.title%></a></li>
<% elsif ma.forge_message_type == "PullRequest" && PullRequest.where(:pull_request_id => ma.forge_message_id).count != 0%>
<% send_message_user = PullRequest.where(:pull_request_id => ma.forge_message_id) %>
<% author = User.find(ma.operate_user_id.nil? ? 2 : ma.operate_user_id) %>
<li><a href="<%= project_pull_requests_path(ma.project_id) %>" target="_blank" title="<%= User.find(author.id).show_name %> <%= pull_request_message_status(ma) %> <%= send_message_user[0].title %>"><span class="shadowbox_news_user"><%= User.find(author.id).show_name %> </span><%= pull_request_message_status(ma) %> <%= send_message_user[0].title %></a></li>
<%# elsif ma.forge_message_type == "PullRequest" && PullRequest.where(:pull_request_id => ma.forge_message_id).count != 0%>
<%# send_message_user = PullRequest.where(:pull_request_id => ma.forge_message_id) %>
<%# author = User.find(ma.operate_user_id.nil? ? 2 : ma.operate_user_id) %>
<!-- <li><a href="<%#= project_pull_requests_path(ma.project_id) %>" target="_blank" title="<%#= User.find(author.id).show_name %> <%#= pull_request_message_status(ma) %> <%#= send_message_user[0].title %>"><span class="shadowbox_news_user"><%#= User.find(author.id).show_name %> </span><%#= pull_request_message_status(ma) %> <%#= send_message_user[0].title %></a></li>-->
<% end %>
<% elsif ma.class == MemoMessage %>
<% if ma.memo_type == "Memo" && !ma.memo.nil? && !ma.memo.author.nil? %>