diff --git a/app/views/devise/mailer/invitation_instructions.haml b/app/views/devise/mailer/invitation_instructions.haml index bd0f144..dc939ae 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 e45dcef..9735863 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 78764d8..0000000 --- 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 c082b77..0000000 --- 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 f12bf2a..144d6df 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: