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
This commit is contained in:
Jean-Philippe Lang
2007-10-12 18:04:56 +00:00
parent 0682b8cfc4
commit dead6a28f8
32 changed files with 25 additions and 131 deletions
+4 -7
View File
@@ -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