From 1d70434de529d87d43501f7f36b3307589b88caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Wed, 9 Dec 2015 19:45:46 +0100 Subject: [PATCH] use light email template for staged users --- app/mailers/user_notifications.rb | 5 ++++- config/locales/server.en.yml | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/app/mailers/user_notifications.rb b/app/mailers/user_notifications.rb index 0ddc47f64..8f381dfc1 100644 --- a/app/mailers/user_notifications.rb +++ b/app/mailers/user_notifications.rb @@ -289,7 +289,10 @@ class UserNotifications < ActionMailer::Base end template = "user_notifications.user_#{notification_type}" - template << "_pm" if post.topic.private_message? + if post.topic.private_message? + template << "_pm" + template << "_staged" if user.staged? + end email_opts = { topic_title: title, diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index bbe2307d8..c419a44fc 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1916,6 +1916,22 @@ en: Please visit this link to view the message: %{base_url}%{url} + user_invited_to_private_message_pm_staged: + subject_template: "[%{site_name}] %{username} invited you to a message '%{topic_title}'" + text_body_template: | + + %{username} invited you to a message + + > **%{topic_title}** + > + > %{topic_excerpt} + + at + + > %{site_title} -- %{site_description} + + Please visit this link to view the message: %{base_url}%{url} + user_invited_to_topic: subject_template: "[%{site_name}] %{username} invited you to a topic '%{topic_title}'" text_body_template: | @@ -2004,6 +2020,15 @@ en: --- %{respond_instructions} + user_posted_pm_staged: + subject_template: "%{optional_re}%{topic_title}" + text_body_template: | + + %{message} + + --- + %{respond_instructions} + digest: why: "A brief summary of %{site_link} since your last visit on %{last_seen_at}" subject_template: "[%{site_name}] Digest"