From 501f30dae99f553c9298a6d5269f32a9f1a98fa7 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 24 Sep 2019 20:14:25 -0300 Subject: [PATCH] =?UTF-8?q?enviar=20m=C3=A1s=20info=20en=20la=20invitaci?= =?UTF-8?q?=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mailer/invitation_instructions.haml | 23 +++++++++++++++---- .../mailer/invitation_instructions.text.haml | 21 +++++++++++++---- .../confirmation_required.html.haml | 5 ---- .../confirmation_required.txt.haml | 5 ---- config/locales/devise_invitable.es.yml | 2 +- 5 files changed, 36 insertions(+), 20 deletions(-) delete mode 100644 app/views/invitadx_mailer/confirmation_required.html.haml delete mode 100644 app/views/invitadx_mailer/confirmation_required.txt.haml diff --git a/app/views/devise/mailer/invitation_instructions.haml b/app/views/devise/mailer/invitation_instructions.haml index bd0f144f..dc939ae7 100644 --- a/app/views/devise/mailer/invitation_instructions.haml +++ b/app/views/devise/mailer/invitation_instructions.haml @@ -1,6 +1,19 @@ -%p= t("devise.mailer.invitation_instructions.hello", email: @resource.email) -%p= t("devise.mailer.invitation_instructions.someone_invited_you", url: @resource.sites.first.name) -%p= link_to t("devise.mailer.invitation_instructions.accept"), accept_invitation_url(@resource, invitation_token: @token) +- site = @resources.sites.last + +%p= t('devise.mailer.invitation_instructions.hello', + email: @resource.email) +%p= t('devise.mailer.invitation_instructions.someone_invited_you', + url: site.hostname) + +%h1= site.title +%p= site.description + +%p= link_to t('devise.mailer.invitation_instructions.accept'), + accept_invitation_url(@resource, invitation_token: @token) + - if @resource.invitation_due_at - %p= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :'devise.mailer.invitation_instructions.accept_until_format')) -%p= t("devise.mailer.invitation_instructions.ignore") + %p= t('devise.mailer.invitation_instructions.accept_until', + due_date: l(@resource.invitation_due_at, + format: :'devise.mailer.invitation_instructions.accept_until_format')) + +%p= t('devise.mailer.invitation_instructions.ignore') diff --git a/app/views/devise/mailer/invitation_instructions.text.haml b/app/views/devise/mailer/invitation_instructions.text.haml index e45dcefe..9735863a 100644 --- a/app/views/devise/mailer/invitation_instructions.text.haml +++ b/app/views/devise/mailer/invitation_instructions.text.haml @@ -1,6 +1,19 @@ -= t("devise.mailer.invitation_instructions.hello", email: @resource.email) -= t("devise.mailer.invitation_instructions.someone_invited_you", url: @resource.sites.first.name) +- site = @resources.sites.last + += t('devise.mailer.invitation_instructions.hello', email: @resource.email) +\ += t('devise.mailer.invitation_instructions.someone_invited_you', + url: site.hostname) +\ += site.title +\ += site.description +\ = accept_invitation_url(@resource, invitation_token: @token) +\ - if @resource.invitation_due_at - = t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :'devise.mailer.invitation_instructions.accept_until_format')) -= t("devise.mailer.invitation_instructions.ignore") + = t('devise.mailer.invitation_instructions.accept_until', + due_date: l(@resource.invitation_due_at, + format: :'devise.mailer.invitation_instructions.accept_until_format')) +\ += t('devise.mailer.invitation_instructions.ignore') diff --git a/app/views/invitadx_mailer/confirmation_required.html.haml b/app/views/invitadx_mailer/confirmation_required.html.haml deleted file mode 100644 index 78764d85..00000000 --- a/app/views/invitadx_mailer/confirmation_required.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -%h1= t('.hi') - -%p= t('.body') - -%code= site_invitadx_confirmation_url(@site, @invitadx, confirmation_token: @invitadx.confirmation_token) diff --git a/app/views/invitadx_mailer/confirmation_required.txt.haml b/app/views/invitadx_mailer/confirmation_required.txt.haml deleted file mode 100644 index c082b77a..00000000 --- a/app/views/invitadx_mailer/confirmation_required.txt.haml +++ /dev/null @@ -1,5 +0,0 @@ -= t('.hi') - -= t('.body') - -= site_invitadx_confirmation_url(@site, @invitadx, confirmation_token: @invitadx.confirmation_token) diff --git a/config/locales/devise_invitable.es.yml b/config/locales/devise_invitable.es.yml index f12bf2a2..144d6df6 100644 --- a/config/locales/devise_invitable.es.yml +++ b/config/locales/devise_invitable.es.yml @@ -21,7 +21,7 @@ es: hello: "Hola %{email}" someone_invited_you: "Alguien te ha invitado a colaborar en %{url}, podés aceptar la invitación con el enlace a continuación." accept: "Aceptar la invitación" - accept_until: "La invitación vencerá en %{due_date}." + accept_until: "La invitación vencerá el %{due_date}." ignore: "Si no querés aceptar la invitación, por favor ignora este correo. Tu cuenta no será creada hasta que aceptes la invitación y configures una contraseña." time: formats: