diff --git a/app/views/admin/layouts/themes/_pure.html.erb b/app/views/admin/layouts/themes/_pure.html.erb index b6e54cbba664e91fd9a116ee58858d6cf35de1f0..347aaf379a7dac7469876a86821ff4534e657ca8 100644 --- a/app/views/admin/layouts/themes/_pure.html.erb +++ b/app/views/admin/layouts/themes/_pure.html.erb @@ -3,15 +3,7 @@ <%= render "admin/layouts/themes/pure/hero" %> <%= render 'application/notice' %> <main class="container-fluid"> - <% unless current_user.confirmed? %> - <div class="alert alert-warning"> - <div class="alert-message"> - <%= t('admin.users_alerts.pending_confirmation_html', duration: distance_of_time_in_words(Rails.configuration.devise.allow_unconfirmed_access_for)) %> - <br> - <%= link_to t('devise.confirmations.new.resend_confirmation_instructions'), resend_user_confirmation_path, method: :post, class: 'alert-link' %> - </div> - </div> - <% end %> + <%= render "admin/layouts/themes/pure/user_unconfirmed" %> <div class="position-relative"> <%= yield %> </div> diff --git a/app/views/admin/layouts/themes/pure/_user_unconfirmed.html.erb b/app/views/admin/layouts/themes/pure/_user_unconfirmed.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..4cbdf225aab36b66bc567dc52550b9ae573e22cd --- /dev/null +++ b/app/views/admin/layouts/themes/pure/_user_unconfirmed.html.erb @@ -0,0 +1,20 @@ +<% unless current_user.confirmed? %> + <div class="row"> + <div class="col-xl-6"> + <div class="alert alert-warning mb-4"> + <div class="alert-message"> + <%= t('admin.users_alerts.pending_confirmation_html', + duration: distance_of_time_in_words( + Rails.configuration.devise.allow_unconfirmed_access_for + ) + ) %> + <br> + <%= link_to t('devise.confirmations.new.resend_confirmation_instructions'), + resend_user_confirmation_path, + method: :post, + class: 'alert-link' %> + </div> + </div> + </div> + </div> +<% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index a17fc0017a3d0d2ac35a7c0833ad603f5bbc65da..c2342f7884e8009b2a40a95dc5b0ff40dc0a691f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -130,7 +130,7 @@ en: users_alerts: already_confirmed: "Your account has already been confirmed." not_locked_html: '<i>%{model}</i> was not locked.' - pending_confirmation_html: "Your account has not been <b>confirmed</b> yet.<br>You have received an e-mail with a confirmation link. If you don't confirm, your account will stop working after <b>%{duration}</b>." + pending_confirmation_html: "Your account has not been <b>confirmed</b> yet. You have received an e-mail with a confirmation link. If you don't confirm, your account will stop working after <b>%{duration}</b>." successfully_unlocked_html: "<i>%{model}</i> was successfully unlocked." will_be_published_html: "<i>%{model}</i> will soon be published." batch_selectable: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 1844ef2ec3bc1244f1ff5c88fd7992de71f45b64..1c6bb55a146ce7c1eeae3c8af796d5e195d6fed6 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -130,7 +130,7 @@ fr: users_alerts: already_confirmed: "Votre compte est déjà confirmé." not_locked_html: "<i>%{model}</i> n'était pas verrouillé(e)." - pending_confirmation_html: "Votre compte n'a pas encore été <b>confirmé</b>.<br>Vous avez reçu un e-mail contenant un lien de confirmation. En l'absence de confirmation, votre compte cessera de fonctionner après <b>%{duration}</b>." + pending_confirmation_html: "Votre compte n'a pas encore été <b>confirmé</b>. Vous avez reçu un e-mail contenant un lien de confirmation. En l'absence de confirmation, votre compte cessera de fonctionner après <b>%{duration}</b>." successfully_unlocked_html: "<i>%{model}</i> a bien été déverrouillé(e)." will_be_published_html: "<i>%{model}</i> va bientôt être publié(e)." batch_selectable: