diff options
author | Go MAEDA <maeda@farend.jp> | 2024-10-20 04:46:37 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2024-10-20 04:46:37 +0000 |
commit | 95add1af5cb34f50af4aacb2e6064ab75346a411 (patch) | |
tree | 0eb6ae49a1846790eb572940f6a7b220cbbcf651 /app | |
parent | daa18f5c381b6ecf2df674f7de2733ea9a3a31e7 (diff) | |
download | redmine-95add1af5cb34f50af4aacb2e6064ab75346a411.tar.gz redmine-95add1af5cb34f50af4aacb2e6064ab75346a411.zip |
Include attachment filename in "File added" email notification subject (#41450).
Patch by minoura makoto (user:minoura).
git-svn-id: https://svn.redmine.org/redmine/trunk@23148 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/mailer.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 10d2fe900..b64e94991 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -187,13 +187,16 @@ class Mailer < ActionMailer::Base added_to_url = url_for(:controller => 'documents', :action => 'show', :id => container.id) added_to = "#{l(:label_document)}: #{container.title}" end + summary = l(:label_attachment_summary, + :filename => attachments.first.filename, + :count => attachments.length - 1) redmine_headers 'Project' => container.project.identifier @attachments = attachments @user = user @added_to = added_to @added_to_url = added_to_url mail :to => user, - :subject => "[#{container.project.name}] #{l(:label_attachment_new)}" + :subject => "[#{container.project.name}] #{l(:label_attachment_new)}: #{summary}" end # Notifies users about new attachments |