Merge pull request #4864 from consul/unsubscribe_emails
Add helpers for mailer footer styles
This commit is contained in:
@@ -24,6 +24,10 @@ module MailerHelper
|
||||
"font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;"
|
||||
end
|
||||
|
||||
def mailer_footer_spacing
|
||||
"margin: 0;padding: 0;line-height: 1.5em;"
|
||||
end
|
||||
|
||||
def css_for_mailer_heading
|
||||
mailer_font_family + "font-size: 48px;"
|
||||
end
|
||||
@@ -36,6 +40,14 @@ module MailerHelper
|
||||
mailer_font_family + "font-size: 14px;font-weight: normal;line-height: 24px;"
|
||||
end
|
||||
|
||||
def css_for_mailer_org
|
||||
mailer_font_family + mailer_footer_spacing + "color: #797f7f; font-size: 12px;"
|
||||
end
|
||||
|
||||
def css_for_mailer_footer
|
||||
mailer_font_family + mailer_footer_spacing + "color: #222; font-size: 10px; margin-top: 12px;"
|
||||
end
|
||||
|
||||
def css_for_mailer_button
|
||||
mailer_font_family + "background: #004a83;border-radius: 6px;color: #fff!important;display: inline-block;font-weight: bold;margin: 0;min-width: 200px;padding: 10px 15px;text-align: center;text-decoration: none;"
|
||||
end
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
class ApplicationMailer < ActionMailer::Base
|
||||
helper :settings
|
||||
helper :application
|
||||
helper :mailer
|
||||
default from: proc { "#{Setting["mailer_from_name"]} <#{Setting["mailer_from_address"]}>" }
|
||||
layout "mailer"
|
||||
end
|
||||
|
||||
@@ -2,7 +2,6 @@ class Mailer < ApplicationMailer
|
||||
after_action :prevent_delivery_to_users_without_email
|
||||
|
||||
helper :text_with_links
|
||||
helper :mailer
|
||||
helper :users
|
||||
|
||||
def comment(comment)
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: center; border-top: 1px solid #dadfe1; padding-top: 20px;">
|
||||
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; margin: 0;padding: 0;line-height: 1.5em;color: #797f7f; font-size: 12px;">
|
||||
<%= setting["org_name"] %></p>
|
||||
<p style="<%= css_for_mailer_org %>">
|
||||
<%= setting["org_name"] %>
|
||||
</p>
|
||||
|
||||
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; margin: 0;padding: 0;line-height: 1.5em;color: #222; font-size: 10px; margin-top: 12px;">
|
||||
<%= t("mailers.no_reply") %></p>
|
||||
<p style="<%= css_for_mailer_footer %>">
|
||||
<%= t("mailers.no_reply") %>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user