mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-25 21:21:49 +00:00
Merge branch 'issue-13247' of https://0xacab.org/sutty/sutty into panel.sutty.nl
This commit is contained in:
commit
323299d2da
3 changed files with 8 additions and 2 deletions
|
@ -50,6 +50,12 @@ class Usuarie < ApplicationRecord
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Les usuaries necesitan link de invitación si no tenían cuenta
|
||||||
|
# o todavía no la confirmaron
|
||||||
|
def needs_invitation_link?
|
||||||
|
(created_by_invite? && !invitation_accepted?) || !confirmed?
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def lang_from_locale!
|
def lang_from_locale!
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
%h1= site.title
|
%h1= site.title
|
||||||
%p= site.description
|
%p= site.description
|
||||||
|
|
||||||
- if @resource.created_by_invite? && !@resource.invitation_accepted?
|
- if @resource.needs_invitation_link?
|
||||||
%p= link_to t('devise.mailer.invitation_instructions.accept'),
|
%p= link_to t('devise.mailer.invitation_instructions.accept'),
|
||||||
accept_invitation_url(@resource, invitation_token: @token, change_locale_to: @resource.lang)
|
accept_invitation_url(@resource, invitation_token: @token, change_locale_to: @resource.lang)
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
\
|
\
|
||||||
= site.description
|
= site.description
|
||||||
\
|
\
|
||||||
- if @resource.created_by_invite? && !@resource.invitation_accepted?
|
- if @resource.needs_invitation_link?
|
||||||
= accept_invitation_url(@resource, invitation_token: @token, change_locale_to: @resource.lang)
|
= accept_invitation_url(@resource, invitation_token: @token, change_locale_to: @resource.lang)
|
||||||
\
|
\
|
||||||
- if @resource.invitation_due_at
|
- if @resource.invitation_due_at
|
||||||
|
|
Loading…
Reference in a new issue