]> git.openstreetmap.org Git - rails.git/commitdiff
Add an HTML version of the message notification email
authorTom Hughes <tom@compton.nu>
Thu, 1 Dec 2011 19:17:16 +0000 (19:17 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 1 Dec 2011 19:17:16 +0000 (19:17 +0000)
app/models/notifier.rb
app/views/notifier/message_notification.html.erb [new file with mode: 0644]

index 2b6574a977aafd3926602af9e841d58bdaa166b0..1223d54b1c00f48b0ffa4230f48e88b779e3bff2 100644 (file)
@@ -2,6 +2,7 @@ class Notifier < ActionMailer::Base
   default :from => EMAIL_FROM,
           :return_path => EMAIL_RETURN_PATH,
           :auto_submitted => "auto-generated"
+  helper :application
 
   def signup_confirm(user, token)
     @locale = user.preferred_language_from(I18n.available_locales)
diff --git a/app/views/notifier/message_notification.html.erb b/app/views/notifier/message_notification.html.erb
new file mode 100644 (file)
index 0000000..ef55b9b
--- /dev/null
@@ -0,0 +1,12 @@
+<p><%= t'notifier.message_notification.hi', :to_user => @to_user %></p>
+
+<p><%= raw t'notifier.message_notification.header', :from_user => link_to(@from_user, :host => SERVER_URL, :controller => :user, :action => :view, :display_name => @from_user), :subject => @title %></p>
+
+==
+<%= htmlize @text %>
+==
+
+<p>
+  <%= raw t'notifier.message_notification.footer1', :readurl => link_to(@readurl, @readurl) %>
+  <%= raw t'notifier.message_notification.footer2', :replyurl => link_to(@replyurl, @replyurl) %>
+</p>