Adds styles to comment and reply emails

This commit is contained in:
Alberto Garcia Cabeza
2015-08-26 18:51:29 +02:00
parent 46bd0f2c7f
commit 4e8b281a23
8 changed files with 89 additions and 20 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -1,5 +1,42 @@
<html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<body> <html lang="es">
<%= yield %> <head>
</body> <title>Gobierno abierto</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" id="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,maximum-scale=10.0"/>
</head>
<body style="background: #fff; font-family:font-family: 'Open Sans','Helvetica Neue',arial,sans-serif !important; margin: 0 10px; padding: 0; text-align: left;">
<table cellpadding="0" cellspacing="0" border="0" style="background: #fff; margin: 0 auto; max-width: 700px; width:100%;">
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" style="width: 100%;">
<tr>
<td style="border-bottom: 1px solid #dadfe1; padding: 20px 0;">
<a href="#" target="_blank">
<%= image_tag('logo_email_gobierno_abierto.png', style: "border: 0; display: block; width: 100%;max-width: 370px") %>
</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<%= yield %>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" style="margin: 0 auto; max-width: 700px; width:100%; margin-bottom: 40px; padding: 0 20px;">
<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;">
<a href="#" style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;margin: 0;padding: 0;color: #398fd1;text-decoration: none;">Preguntas frecuentes</a>&nbsp;<span style="color:#398fd1;">&bullet;</span>&nbsp;<a href="mailto:#" style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;margin: 0;padding: 0;color: #398fd1;text-decoration: none;">tec.gobiernoabierto@madrid.es</a></p>
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; margin: 0;padding: 0;line-height: 1.5em;color: #797f7f; font-size: 12px;">
&copy; 2015 Ayuntamiento de Madrid</p>
</td>
</tr>
</tbody>
</table>
</body>
</html> </html>

View File

@@ -1,6 +1,18 @@
<%= t('mailers.comment.hi', recipient: @debate.author.name) %> <td style="padding-bottom: 20px; padding-left: 10px;">
<div><%= link_to @debate.title, debate_url(@debate) %></div> <h1 style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;">
<div><%= t('mailers.comment.new_comment_by', commenter: @comment.author.name) %></div> <%= t("mailers.comment.title") %>
</h1>
<div><%= @comment.body %></div> <p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 14px;font-weight: normal;line-height: 24px;">
<%= t("mailers.comment.hi") %> <strong><%= @debate.author.name %></strong>,
</p>
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 14px;font-weight: normal;line-height: 24px;">
<%= t("mailers.comment.new_comment_by_html", commenter: @comment.author.name) %> <%= link_to @debate.title, debate_url(@debate), style: "color: #2895F1; text-decoration:none;" %>
</p>
<p style="border-left: 2px solid #DEE0E3;font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 14px;font-style: italic;font-weight: normal;line-height: 24px;margin-left: 20px;padding: 10px;">
<%= @comment.body %>
</p>
</td>

View File

@@ -1,6 +1,18 @@
<%= t('mailers.reply.hi', recipient: @recipient.name) %> <td style="padding-bottom: 20px; padding-left: 10px;">
<div><%= link_to @debate.title, debate_url(@debate) %></div> <h1 style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;">
<div><%= t('mailers.reply.new_reply_by', commenter: @reply.author.name) %></div> <%= t("mailers.reply.title") %>
</h1>
<div><%= @reply.body %></div> <p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 14px;font-weight: normal;line-height: 24px;">
<%= t("mailers.reply.hi") %> <strong><%= @recipient.name %></strong>,
</p>
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 14px;font-weight: normal;line-height: 24px;">
<%= t("mailers.reply.new_reply_by_html", commenter: @reply.author.name) %> <%= link_to @debate.title, debate_url(@debate), style: "color: #2895F1; text-decoration:none;" %>
</p>
<p style="border-left: 2px solid #DEE0E3;font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 14px;font-style: italic;font-weight: normal;line-height: 24px;margin-left: 20px;padding: 10px;">
<%= @reply.body %>
</p>
</td>

View File

@@ -11,12 +11,14 @@ en:
confirm_link: "Confirm my account" confirm_link: "Confirm my account"
reset_password_instructions: reset_password_instructions:
hello: "Hello" hello: "Hello"
title: Change your password
text: "Someone has requested a link to change your password. You can do this through the link below." text: "Someone has requested a link to change your password. You can do this through the link below."
change_link: "Change my password" change_link: "Change my password"
ignore_text: "If you didn't request this, please ignore this email." ignore_text: "If you didn't request this, please ignore this email."
info_text: "Your password won't change until you access the link above and create a new one." info_text: "Your password won't change until you access the link above and create a new one."
unlock_instructions: unlock_instructions:
hello: "Hello" hello: "Hello"
title: Your account has been locked
info_text: "Your account has been locked due to an excessive number of unsuccessful sign in attempts." info_text: "Your account has been locked due to an excessive number of unsuccessful sign in attempts."
instructions_text: "Click the link below to unlock your account:" instructions_text: "Click the link below to unlock your account:"
unlock_link: "Unlock my account" unlock_link: "Unlock my account"

View File

@@ -11,12 +11,14 @@ es:
confirm_link: "Confirmar mi cuenta" confirm_link: "Confirmar mi cuenta"
reset_password_instructions: reset_password_instructions:
hello: "Hola" hello: "Hola"
title: "Cambiar tu contraseña"
text: "Se ha solicitado un enlace para cambiar tu contraseña, puedes hacerlo en el siguiente enlace:" text: "Se ha solicitado un enlace para cambiar tu contraseña, puedes hacerlo en el siguiente enlace:"
change_link: "cambiar mi contraseña" change_link: "cambiar mi contraseña"
ignore_text: "Si tu no lo has solicitado, puedes ignorar este email" ignore_text: "Si tu no lo has solicitado, puedes ignorar este email"
info_text: "Tu contraseña no cambiará hasta que no accedas al enlace y la modifiques." info_text: "Tu contraseña no cambiará hasta que no accedas al enlace y la modifiques."
unlock_instructions: unlock_instructions:
hello: "Hola" hello: "Hola"
title: Tu cuenta ha sido bloqueada
info_text: "Tu cuenta ha sido bloqueada debido a un excesivo número de intentos fallidos de alta." info_text: "Tu cuenta ha sido bloqueada debido a un excesivo número de intentos fallidos de alta."
instructions_text: "Sigue el siguiente enlace para desbloquear tu cuenta:" instructions_text: "Sigue el siguiente enlace para desbloquear tu cuenta:"
unlock_link: "Desbloquear mi cuenta" unlock_link: "Desbloquear mi cuenta"

View File

@@ -1,8 +1,10 @@
en: en:
mailers: mailers:
comment: comment:
hi: "Hello, %{recipient}" hi: Hello
new_comment_by: "There'is a new comment by %{commenter}" title: New comment on your debate
new_comment_by_html: "There'is a new comment by <b<%{commenter}</b> on"
reply: reply:
hi: "Hello, %{recipient}" hi: Hello
new_reply_by: "There'is a new reply by %{commenter} to your comment" title: New reply on your comment
new_reply_by_html: "There'is a new reply by <b>%{commenter}</b> to your comment on"

View File

@@ -1,8 +1,10 @@
es: es:
mailers: mailers:
comment: comment:
hi: "Hola, %{recipient}" hi: Hola
new_comment_by: "Hay un nuevo comentario de %{commenter}" title: Nuevo comentario en tu debate
new_comment_by_html: "Hay un nuevo comentario de <b>%{commenter}</b> en"
reply: reply:
hi: "Hola, %{recipient}" hi: Hola
new_reply_by: "Hay una nueva respuesta de %{commenter} a tu comentario" title: Nueva respuesta a tu comentario
new_reply_by_html: "Hay una nueva respuesta de <b>%{commenter}</b> a tu comentario en"