Mercurial > hg > soundsoftware-site
diff app/models/mailer.rb @ 909:cbb26bc654de redmine-1.3
Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author | Chris Cannam |
---|---|
date | Fri, 24 Feb 2012 19:09:32 +0000 |
parents | cbce1fd3b1b7 |
children | 5e80956cc792 5f33065ddc4b |
line wrap: on
line diff
--- a/app/models/mailer.rb Fri Feb 24 18:36:29 2012 +0000 +++ b/app/models/mailer.rb Fri Feb 24 19:09:32 2012 +0000 @@ -74,7 +74,7 @@ subject s body :issue => issue, :journal => journal, - :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue) + :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue, :anchor => "change-#{journal.id}") render_multipart('issue_edit', body) end @@ -85,7 +85,9 @@ subject l(:mail_subject_reminder, :count => issues.size, :days => days) body :issues => issues, :days => days, - :issues_url => url_for(:controller => 'issues', :action => 'index', :set_filter => 1, :assigned_to_id => user.id, :sort => 'due_date:asc') + :issues_url => url_for(:controller => 'issues', :action => 'index', + :set_filter => 1, :assigned_to_id => user.id, + :sort => 'due_date:asc') render_multipart('reminder', body) end @@ -198,7 +200,9 @@ cc(wiki_content.page.wiki.watcher_recipients - recipients) subject "[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_added, :id => wiki_content.page.pretty_title)}" body :wiki_content => wiki_content, - :wiki_content_url => url_for(:controller => 'wiki', :action => 'show', :project_id => wiki_content.project, :id => wiki_content.page.title) + :wiki_content_url => url_for(:controller => 'wiki', :action => 'show', + :project_id => wiki_content.project, + :id => wiki_content.page.title) render_multipart('wiki_content_added', body) end @@ -215,8 +219,12 @@ cc(wiki_content.page.wiki.watcher_recipients + wiki_content.page.watcher_recipients - recipients) subject "[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_updated, :id => wiki_content.page.pretty_title)}" body :wiki_content => wiki_content, - :wiki_content_url => url_for(:controller => 'wiki', :action => 'show', :project_id => wiki_content.project, :id => wiki_content.page.title), - :wiki_diff_url => url_for(:controller => 'wiki', :action => 'diff', :project_id => wiki_content.project, :id => wiki_content.page.title, :version => wiki_content.version) + :wiki_content_url => url_for(:controller => 'wiki', :action => 'show', + :project_id => wiki_content.project, + :id => wiki_content.page.title), + :wiki_diff_url => url_for(:controller => 'wiki', :action => 'diff', + :project_id => wiki_content.project, :id => wiki_content.page.title, + :version => wiki_content.version) render_multipart('wiki_content_updated', body) end @@ -245,7 +253,9 @@ recipients User.active.find(:all, :conditions => {:admin => true}).collect { |u| u.mail }.compact subject l(:mail_subject_account_activation_request, Setting.app_title) body :user => user, - :url => url_for(:controller => 'users', :action => 'index', :status => User::STATUS_REGISTERED, :sort_key => 'created_on', :sort_order => 'desc') + :url => url_for(:controller => 'users', :action => 'index', + :status => User::STATUS_REGISTERED, + :sort_key => 'created_on', :sort_order => 'desc') render_multipart('account_activation_request', body) end @@ -368,7 +378,7 @@ headers 'X-Mailer' => 'Redmine', 'X-Redmine-Host' => Setting.host_name, 'X-Redmine-Site' => Setting.app_title, - 'Precedence' => 'bulk', + 'X-Auto-Response-Suppress' => 'OOF', 'Auto-Submitted' => 'auto-generated' end @@ -410,11 +420,16 @@ def render_multipart(method_name, body) if Setting.plain_text_mail? content_type "text/plain" - body render(:file => "#{method_name}.text.plain.rhtml", :body => body, :layout => 'mailer.text.plain.erb') + body render(:file => "#{method_name}.text.erb", + :body => body, + :layout => 'mailer.text.erb') else content_type "multipart/alternative" - part :content_type => "text/plain", :body => render(:file => "#{method_name}.text.plain.rhtml", :body => body, :layout => 'mailer.text.plain.erb') - part :content_type => "text/html", :body => render_message("#{method_name}.text.html.rhtml", body) + part :content_type => "text/plain", + :body => render(:file => "#{method_name}.text.erb", + :body => body, :layout => 'mailer.text.erb') + part :content_type => "text/html", + :body => render_message("#{method_name}.html.erb", body) end end @@ -446,7 +461,7 @@ end def mylogger - RAILS_DEFAULT_LOGGER + Rails.logger end end