parent
9709692a08
commit
d9df8aae28
|
@ -380,6 +380,22 @@ module IssuesHelper
|
||||||
value = content_tag("i", h(value)) if value
|
value = content_tag("i", h(value)) if value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
# 缺陷更新结果在消息中显示样式
|
||||||
|
if no_html == "message"
|
||||||
|
label = content_tag(:span, label, :class => "issue_update_message")
|
||||||
|
old_value = content_tag("span", h(old_value)) if detail.old_value
|
||||||
|
old_value = content_tag("del", old_value) if detail.old_value and detail.value.blank?
|
||||||
|
if detail.property == 'attachment' && !value.blank? && atta = Attachment.find_by_id(detail.prop_key)
|
||||||
|
# Link to the attachment if it has not been removed
|
||||||
|
if options[:token].nil?
|
||||||
|
value = atta.filename
|
||||||
|
else
|
||||||
|
value = atta.filename
|
||||||
|
end
|
||||||
|
else
|
||||||
|
value = content_tag(:span, h(value), :class => "issue_update_message_value") if value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if detail.property == 'attr' && detail.prop_key == 'description'
|
if detail.property == 'attr' && detail.prop_key == 'description'
|
||||||
s = l(:text_journal_changed_no_detail, :label => label)
|
s = l(:text_journal_changed_no_detail, :label => label)
|
||||||
|
|
|
@ -427,8 +427,11 @@ module UsersHelper
|
||||||
|
|
||||||
# journal.details 记录每个动作的新旧值
|
# journal.details 记录每个动作的新旧值
|
||||||
def get_issue_des_update(journal)
|
def get_issue_des_update(journal)
|
||||||
arr = details_to_strings(journal.details,true)
|
no_html = "message"
|
||||||
arr << journal.notes
|
arr = details_to_strings(journal.details, no_html)
|
||||||
|
unless journal.notes.empty?
|
||||||
|
arr << "留言内容:" + journal.notes
|
||||||
|
end
|
||||||
str = ''
|
str = ''
|
||||||
arr.each { |item| str = str+item }
|
arr.each { |item| str = str+item }
|
||||||
return str
|
return str
|
||||||
|
|
|
@ -174,7 +174,7 @@ class Journal < ActiveRecord::Base
|
||||||
if self.user_id != self.issue.author_id
|
if self.user_id != self.issue.author_id
|
||||||
self.forge_messages << ForgeMessage.new(:user_id => self.issue.author_id, :project_id => self.issue.project_id, :viewed => false)
|
self.forge_messages << ForgeMessage.new(:user_id => self.issue.author_id, :project_id => self.issue.project_id, :viewed => false)
|
||||||
end
|
end
|
||||||
if self.user_id != self.issue.assigned_to_id # 指派人不是自己的话,则给指派人发送
|
if self.user_id != self.issue.assigned_to_id && self.issue.assigned_to_id != self.issue.author_id # 指派人不是自己的话,则给指派人发送
|
||||||
self.forge_messages << ForgeMessage.new(:user_id => self.issue.assigned_to_id, :project_id => self.issue.project_id, :viewed => false)
|
self.forge_messages << ForgeMessage.new(:user_id => self.issue.assigned_to_id, :project_id => self.issue.project_id, :viewed => false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -327,6 +327,7 @@
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<!--新闻回复-->
|
<!--新闻回复-->
|
||||||
<% @project_news_comments.each do |project_news_comment|%>
|
<% @project_news_comments.each do |project_news_comment|%>
|
||||||
<li style="clear: both; list-style: none;">
|
<li style="clear: both; list-style: none;">
|
||||||
|
|
|
@ -153,9 +153,9 @@
|
||||||
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
||||||
更新了问题状态
|
更新了问题状态
|
||||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
<%= link_to get_issue_des_update(ma.forge_message),
|
<%= 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"}",
|
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
:title => "#{get_issue_des_update(ma.forge_message)}" %></a>
|
:title => "#{get_issue_des_update(ma.forge_message).html_safe}" %></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.forge_message.created_on).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.forge_message.created_on).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -875,7 +875,9 @@ img.ui-datepicker-trigger {
|
||||||
.homepageNewsTypeNotRead {width:95px; font-size:12px; color:#888888; display:block;}
|
.homepageNewsTypeNotRead {width:95px; font-size:12px; color:#888888; display:block;}
|
||||||
.calendar_input{border-left:none !important;border-bottom: none!important; border-top: none!important; border-right: 1px solid #d9d9d9;}
|
.calendar_input{border-left:none !important;border-bottom: none!important; border-top: none!important; border-right: 1px solid #d9d9d9;}
|
||||||
.calendar_div{border: 1px solid #d9d9d9;}
|
.calendar_div{border: 1px solid #d9d9d9;}
|
||||||
|
/*缺陷更新动态在消息中显示样式*/
|
||||||
|
.issue_update_message{padding-left: 2px; margin-right: 3px;}
|
||||||
|
.issue_update_message_value{margin-right: 8px;}
|
||||||
#attachments_fields input.filename {
|
#attachments_fields input.filename {
|
||||||
border: 0;
|
border: 0;
|
||||||
height: 1.8em;
|
height: 1.8em;
|
||||||
|
|
Loading…
Reference in New Issue