From 4e8b281a238d388c7b39560fe2f730fa69271c7e Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 26 Aug 2015 18:51:29 +0200 Subject: [PATCH] Adds styles to comment and reply emails --- .../images/logo_email_gobierno_abierto.png | Bin 0 -> 4122 bytes app/views/layouts/mailer.html.erb | 45 ++++++++++++++++-- app/views/mailer/comment.html.erb | 20 ++++++-- app/views/mailer/reply.html.erb | 20 ++++++-- config/locales/devise_views.en.yml | 2 + config/locales/devise_views.es.yml | 2 + config/locales/mailers.en.yml | 10 ++-- config/locales/mailers.es.yml | 10 ++-- 8 files changed, 89 insertions(+), 20 deletions(-) create mode 100644 app/assets/images/logo_email_gobierno_abierto.png diff --git a/app/assets/images/logo_email_gobierno_abierto.png b/app/assets/images/logo_email_gobierno_abierto.png new file mode 100644 index 0000000000000000000000000000000000000000..8fe100fce606c7a388c1dea75be3a31ba0dab54e GIT binary patch literal 4122 zcmaJ^c|4Tu*SCcsdu0iY@r#5R>oE3Z49b#Sg)lRAX3Pv`WEVzdB%;U`N<38dq?2FI$`Fk;Te6mS^gKPk_m8*t{@kDYKG*qtzu$ANbDck~lYGI-l!r@A&BUamPsDm4{m}%VC)(RLNEfv7;x!29i_!%-saq;p zVvW&0zGmS#v|YHBJu=)M2}6PO^?*7=ErviKn&1H>1_lJ-wTQZ)pSoHM`_K&m0e?aW z{<@&QlXAAa05rzn&_H!CR1v8J)c|V1z{=_x8fqE}Kouorb%>HGL{&*qMO8~pNlQ%y z_|F4kM8l!Hv~1yse_}CKx*#6{0jmXpgoTBH!&Jc-oHs-n27^JAR3IuUiVTDzo)kpz zASwporGF{F(Rd`z7fbNP1OX2fJv=cX1YHm#)4#V6i2YYK2>(x+7zKk6J+KgEu+rg{ zegQ2l|9@y;;J;`*!501BeE&~jygdnvhS;LiKiE#KegqVZe3f4HdM=c4&rE`*T`Zsl~?O}AT_@c7(&^-z1kr}t|J*UAd*xe4cI zok+!j5vOhWGp7Q*WKVG~ykK3S(@1?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81%GLj2A`b<+yJYFJ@O8qoSAb(jKz5ZDC-uhhHk1D}D zjvDM}NH6e7o9g#WgAb6gut?*{`Ks`5W0BV*-ek$7sw{;*aMbr|rDnh7C<$x|liGOn z5qKpkaJ#p!-;fDe`wBd$R#gkwxt8c35p`_m1lv`Qd0M1Hz+XI-$3un%!frbh4*J4e z%Qww)?vixy=qqXN#*+fDDd@Mvb#2rsF>6?RwoBCmmWh@jlMUSv^E`j#fSkwSQv ze{jCC(3F4Uc?|5UYIugKe%0s@Z^kEh1td66R3~`iyYne&-hnvWMW*`>l4bez>(&lG z@YNf65|%G3P7^G2G_+*8qV3CbouJkqQ5JRn^J8QBe?Fy4qW1{r!b2O%!KBI?ch_Y6 zs!taWwYruK^J@OpVp|zKcyU9sLp*IoR&eJx>4Sv}&CE^?9Ny;bIgDnEX2e$Dbe33}Fe{=^KPrp;)b+k2EX|O_$uD8? z2^~k`zPG<58vtR4SN&1E8Rc*YxYlvxa0q~d8S}v3L%_D{S}GGO)9aTUCfxGx=MJZJ Na}z6grICBw{{VaPTuuN0 literal 0 HcmV?d00001 diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb index 991cf0ffa..91f31ab18 100644 --- a/app/views/layouts/mailer.html.erb +++ b/app/views/layouts/mailer.html.erb @@ -1,5 +1,42 @@ - - - <%= yield %> - + + + + Gobierno abierto + + + + + + + + + + + <%= yield %> + +
+ + + + +
+ + <%= image_tag('logo_email_gobierno_abierto.png', style: "border: 0; display: block; width: 100%;max-width: 370px") %> + +
+
+ + + + + + + +
+

+ Preguntas frecuentes  tec.gobiernoabierto@madrid.es

+

+ © 2015 Ayuntamiento de Madrid

+
+ diff --git a/app/views/mailer/comment.html.erb b/app/views/mailer/comment.html.erb index eb95c8031..959b8e0a0 100644 --- a/app/views/mailer/comment.html.erb +++ b/app/views/mailer/comment.html.erb @@ -1,6 +1,18 @@ -<%= t('mailers.comment.hi', recipient: @debate.author.name) %> + -
<%= link_to @debate.title, debate_url(@debate) %>
-
<%= t('mailers.comment.new_comment_by', commenter: @comment.author.name) %>
+

+ <%= t("mailers.comment.title") %> +

-
<%= @comment.body %>
+

+ <%= t("mailers.comment.hi") %> <%= @debate.author.name %>, +

+ +

+ <%= t("mailers.comment.new_comment_by_html", commenter: @comment.author.name) %> <%= link_to @debate.title, debate_url(@debate), style: "color: #2895F1; text-decoration:none;" %> +

+ +

+ <%= @comment.body %> +

+ diff --git a/app/views/mailer/reply.html.erb b/app/views/mailer/reply.html.erb index 21cfeba1e..924234f02 100644 --- a/app/views/mailer/reply.html.erb +++ b/app/views/mailer/reply.html.erb @@ -1,6 +1,18 @@ -<%= t('mailers.reply.hi', recipient: @recipient.name) %> + -
<%= link_to @debate.title, debate_url(@debate) %>
-
<%= t('mailers.reply.new_reply_by', commenter: @reply.author.name) %>
+

+ <%= t("mailers.reply.title") %> +

-
<%= @reply.body %>
+

+ <%= t("mailers.reply.hi") %> <%= @recipient.name %>, +

+ +

+ <%= t("mailers.reply.new_reply_by_html", commenter: @reply.author.name) %> <%= link_to @debate.title, debate_url(@debate), style: "color: #2895F1; text-decoration:none;" %> +

+ +

+ <%= @reply.body %> +

+ diff --git a/config/locales/devise_views.en.yml b/config/locales/devise_views.en.yml index f0e1eb33a..9c9fbec5a 100644 --- a/config/locales/devise_views.en.yml +++ b/config/locales/devise_views.en.yml @@ -11,12 +11,14 @@ en: confirm_link: "Confirm my account" reset_password_instructions: hello: "Hello" + title: Change your password text: "Someone has requested a link to change your password. You can do this through the link below." change_link: "Change my password" 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." unlock_instructions: 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." instructions_text: "Click the link below to unlock your account:" unlock_link: "Unlock my account" diff --git a/config/locales/devise_views.es.yml b/config/locales/devise_views.es.yml index 49d304748..5a9fa4e01 100644 --- a/config/locales/devise_views.es.yml +++ b/config/locales/devise_views.es.yml @@ -11,12 +11,14 @@ es: confirm_link: "Confirmar mi cuenta" reset_password_instructions: hello: "Hola" + title: "Cambiar tu contraseña" text: "Se ha solicitado un enlace para cambiar tu contraseña, puedes hacerlo en el siguiente enlace:" change_link: "cambiar mi contraseña" 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." unlock_instructions: 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." instructions_text: "Sigue el siguiente enlace para desbloquear tu cuenta:" unlock_link: "Desbloquear mi cuenta" diff --git a/config/locales/mailers.en.yml b/config/locales/mailers.en.yml index cbc6c5bd6..d0550aca9 100644 --- a/config/locales/mailers.en.yml +++ b/config/locales/mailers.en.yml @@ -1,8 +1,10 @@ en: mailers: comment: - hi: "Hello, %{recipient}" - new_comment_by: "There'is a new comment by %{commenter}" + hi: Hello + title: New comment on your debate + new_comment_by_html: "There'is a new comment by on" reply: - hi: "Hello, %{recipient}" - new_reply_by: "There'is a new reply by %{commenter} to your comment" \ No newline at end of file + hi: Hello + title: New reply on your comment + new_reply_by_html: "There'is a new reply by %{commenter} to your comment on" diff --git a/config/locales/mailers.es.yml b/config/locales/mailers.es.yml index e595967c4..8efa1dc22 100644 --- a/config/locales/mailers.es.yml +++ b/config/locales/mailers.es.yml @@ -1,8 +1,10 @@ es: mailers: comment: - hi: "Hola, %{recipient}" - new_comment_by: "Hay un nuevo comentario de %{commenter}" + hi: Hola + title: Nuevo comentario en tu debate + new_comment_by_html: "Hay un nuevo comentario de %{commenter} en" reply: - hi: "Hola, %{recipient}" - new_reply_by: "Hay una nueva respuesta de %{commenter} a tu comentario" \ No newline at end of file + hi: Hola + title: Nueva respuesta a tu comentario + new_reply_by_html: "Hay una nueva respuesta de %{commenter} a tu comentario en"