diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-10-12 18:04:56 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-10-12 18:04:56 +0000 |
commit | dead6a28f81cf54943691b0ce20b9501242aae07 (patch) | |
tree | 53c4795d2bce93ead67b99b5be079727c6f68062 /app/models/mailer.rb | |
parent | 0682b8cfc47867a6be03f4cb7474c59a1b1b7ad7 (diff) | |
download | redmine-dead6a28f81cf54943691b0ce20b9501242aae07.tar.gz redmine-dead6a28f81cf54943691b0ce20b9501242aae07.zip |
Removed translated email templates attachments_added and document_added (no longer usefull).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@834 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/mailer.rb')
-rw-r--r-- | app/models/mailer.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 5f655db85..683045715 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -60,7 +60,7 @@ class Mailer < ActionMailer::Base @body['journal']= journal end - def document_add(document) + def document_added(document) set_language_if_valid(Setting.default_language) @recipients = document.project.users.collect { |u| u.mail if u.mail_notification }.compact @from = Setting.mail_from @@ -68,21 +68,18 @@ class Mailer < ActionMailer::Base @body['document'] = document end - def attachments_add(attachments) + def attachments_added(attachments) set_language_if_valid(Setting.default_language) container = attachments.first.container url = '' added_to = '' case container.class.name when 'Version' - url = url_for(:only_path => false, :host => Setting.host_name, :controller => 'projects', :action => 'list_files', :id => container.project_id) + url = {:only_path => false, :host => Setting.host_name, :controller => 'projects', :action => 'list_files', :id => container.project_id} added_to = "#{l(:label_version)}: #{container.name}" when 'Document' - url = url_for(:only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => container.id) + url = {:only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => container.id} added_to = "#{l(:label_document)}: #{container.title}" - when 'Issue' - url = url = url_for(:only_path => false, :host => Setting.host_name, :controller => 'issues', :action => 'show', :id => container.id) - added_to = "#{container.tracker.name} ##{container.id}: #{container.subject}" end @recipients = container.project.users.collect { |u| u.mail if u.mail_notification }.compact @from = Setting.mail_from |