缺陷更新区别新建
This commit is contained in:
parent
4c974266b8
commit
90c199f15a
|
@ -145,18 +145,14 @@ class Issue < ActiveRecord::Base
|
|||
def act_as_forge_message
|
||||
# 指派给自己的缺陷不提示消息
|
||||
unless self.author_id == self.assigned_to_id
|
||||
self.forge_messages << ForgeMessage.new(:user_id => self.assigned_to_id,
|
||||
:project_id => self.project_id,
|
||||
:viewed => false)
|
||||
self.forge_messages << ForgeMessage.new(:user_id => self.assigned_to_id, :project_id => self.project_id, :viewed => false)
|
||||
end
|
||||
end
|
||||
|
||||
# 更新缺陷
|
||||
def act_as_forge_message_update
|
||||
unless self.author_id == self.assigned_to_id
|
||||
self.forge_messages << ForgeMessage.new(:user_id => self.assigned_to_id,
|
||||
:project_id => self.project_id,
|
||||
:viewed => false)
|
||||
self.forge_messages << ForgeMessage.new(:user_id => self.assigned_to_id, :project_id => self.project_id, :viewed => false, :update=> true)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -133,11 +133,11 @@
|
|||
<li class="homepageNewsPublisher fl">
|
||||
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue" %>
|
||||
</li>
|
||||
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">指派问题给我</li>
|
||||
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">与我相关问题</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>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.forge_message.updated_on).html_safe %> </li>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% if ma.forge_message_type == "Journal" %>
|
||||
|
|
Loading…
Reference in New Issue