Adds markings to emails generated by private comments (#12888).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11869 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-05-18 17:24:23 +00:00
parent de394f5f74
commit 1093454193
3 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,6 @@
<% if @journal.private_notes? %>
(<%= l(:field_private_notes) %>)
<% end %>
<%= l(:text_issue_updated, :id => "##{@issue.id}", :author => h(@journal.user)) %>
<ul>

View File

@ -1,4 +1,4 @@
<%= l(:text_issue_updated, :id => "##{@issue.id}", :author => @journal.user) %>
<%= "(#{l(:field_private_notes)}) " if @journal.private_notes? -%><%= l(:text_issue_updated, :id => "##{@issue.id}", :author => @journal.user) %>
<% details_to_strings(@journal.details, true).each do |string| -%>
<%= string %>

View File

@ -361,6 +361,17 @@ class MailerTest < ActiveSupport::TestCase
assert_not_include 'someone@foo.bar', ActionMailer::Base.deliveries.last.bcc.sort
end
def test_issue_edit_should_mark_private_notes
journal = Journal.find(2)
journal.private_notes = true
journal.save!
with_settings :default_language => 'en' do
Mailer.issue_edit(journal).deliver
end
assert_mail_body_match '(Private notes)', last_email
end
def test_document_added
document = Document.find(1)
valid_languages.each do |lang|