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 000000000..8fe100fce
Binary files /dev/null and b/app/assets/images/logo_email_gobierno_abierto.png differ
diff --git a/app/views/devise/mailer/confirmation_instructions.html.erb b/app/views/devise/mailer/confirmation_instructions.html.erb
index 1f504444d..c81e6fc74 100644
--- a/app/views/devise/mailer/confirmation_instructions.html.erb
+++ b/app/views/devise/mailer/confirmation_instructions.html.erb
@@ -1,5 +1,18 @@
-
<%= t("devise_views.mailer.confirmation_instructions.welcome") %> <%= @email %>
+
- <%= t("devise_views.mailer.confirmation_instructions.text") %>
+
+ <%= t("devise_views.mailer.confirmation_instructions.title") %>
+
-<%= link_to t("devise_views.mailer.confirmation_instructions.confirm_link"), confirmation_url(@resource, confirmation_token: @token) %>
+
+ <%= t("devise_views.mailer.confirmation_instructions.welcome") %> <%= @email %>
+
+
+
+ <%= t("devise_views.mailer.confirmation_instructions.text") %>
+
+
+
+ <%= link_to t("devise_views.mailer.confirmation_instructions.confirm_link"), confirmation_url(@resource, confirmation_token: @token), style: "color: #2895F1; text-decoration:none;" %>
+
+ |
diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb
index 78923ce92..a67e77f08 100644
--- a/app/views/devise/mailer/reset_password_instructions.html.erb
+++ b/app/views/devise/mailer/reset_password_instructions.html.erb
@@ -1,8 +1,22 @@
-<%= t("devise_views.mailer.reset_password_instructions.hello") %> <%= @resource.email %>
+
- <%= t("devise_views.mailer.reset_password_instructions.text") %>
+
+ <%= t("devise_views.mailer.reset_password_instructions.title") %>
+
-<%= link_to t("devise_views.mailer.reset_password_instructions.change_link"), edit_password_url(@resource, reset_password_token: @token) %>
+
+ <%= t("devise_views.mailer.reset_password_instructions.hello") %> <%= @resource.email %>
+
-<%= t("devise_views.mailer.reset_password_instructions.ignore_text") %>
-<%= t("devise_views.mailer.reset_password_instructions.info_text") %>
+
+ <%= t("devise_views.mailer.reset_password_instructions.text") %>
+
+
+
+ <%= link_to t("devise_views.mailer.reset_password_instructions.change_link"), edit_password_url(@resource, reset_password_token: @token), style: "color: #2895F1; text-decoration:none;" %>
+
+
+
+ <%= t("devise_views.mailer.reset_password_instructions.ignore_text") %> <%= t("devise_views.mailer.reset_password_instructions.info_text") %>
+
+ |
diff --git a/app/views/devise/mailer/unlock_instructions.html.erb b/app/views/devise/mailer/unlock_instructions.html.erb
index 12f4d2b62..41ddc2f19 100644
--- a/app/views/devise/mailer/unlock_instructions.html.erb
+++ b/app/views/devise/mailer/unlock_instructions.html.erb
@@ -1,7 +1,22 @@
-<%= t("devise_views.mailer.unlock_instructions.hello") %> <%= @resource.email %>
+
- <%= t("devise_views.mailer.unlock_instructions.info_text") %>
+
+ <%= t("devise_views.mailer.unlock_instructions.title") %>
+
-<%= t("devise_views.mailer.unlock_instructions.instructions_text") %>
+
+ <%= t("devise_views.mailer.unlock_instructions.hello") %> <%= @resource.email %>
+
-<%= link_to t("devise_views.mailer.unlock_instructions.unlock_link"), unlock_url(@resource, unlock_token: @token) %>
+
+ <%= t("devise_views.mailer.unlock_instructions.info_text") %>
+
+
+
+ <%= t("devise_views.mailer.unlock_instructions.instructions_text") %>
+
+
+
+ <%= link_to t("devise_views.mailer.unlock_instructions.unlock_link"), unlock_url(@resource, unlock_token: @token), style: "color: #2895F1; text-decoration:none;" %>
+
+ |
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 %>
+
+
+
+
+
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/environments/development.rb b/config/environments/development.rb
index d2f4d1c4b..566d4ebc5 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -16,6 +16,7 @@ Rails.application.configure do
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
+ config.action_mailer.asset_host = "http://localhost:3000"
# Deliver emails to a development mailbox at /letter_opener
config.action_mailer.delivery_method = :letter_opener
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 40f3e50b3..6b1c860a9 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -266,3 +266,7 @@ Devise.setup do |config|
# so you need to do it manually. For the users scope, it would be:
# config.omniauth_path_prefix = '/my_engine/users/auth'
end
+
+Rails.application.config.to_prepare do
+ Devise::Mailer.layout "mailer" # email.haml or email.erb
+end
\ No newline at end of file
diff --git a/config/locales/devise_views.en.yml b/config/locales/devise_views.en.yml
index f0e1eb33a..08a303834 100644
--- a/config/locales/devise_views.en.yml
+++ b/config/locales/devise_views.en.yml
@@ -6,17 +6,20 @@ en:
submit: "Resend confirmation instructions"
mailer:
confirmation_instructions:
+ title: "Welcome to open government"
welcome: "Welcome"
text: "You can confirm your account email through the link below:"
confirm_link: "Confirm my account"
reset_password_instructions:
hello: "Hello"
- text: "Someone has requested a link to change your password. You can do this through the link below."
+ title: Change your password
+ text: "Someone has requested 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..6ab6ebbb5 100644
--- a/config/locales/devise_views.es.yml
+++ b/config/locales/devise_views.es.yml
@@ -6,17 +6,20 @@ es:
submit: "Reenviar instrucciones de confirmación"
mailer:
confirmation_instructions:
- welcome: "Bienvenido"
+ title: "Bienvenido/a a gobierno abierto"
+ welcome: "Bienvenido/a"
text: "Puedes confirmar tu cuenta de correo electrónico en el siguiente enlace:"
confirm_link: "Confirmar mi cuenta"
reset_password_instructions:
hello: "Hola"
- 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"
+ title: "Cambiar tu contraseña"
+ text: "Se ha solicitado 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"