2022-11-08 11:08:09 +01:00
|
|
|
|
- content_for(:title, t('.profile'))
|
|
|
|
|
|
2021-11-25 16:26:55 +01:00
|
|
|
|
= render partial: 'administrateurs/breadcrumbs',
|
2022-08-17 13:53:07 +02:00
|
|
|
|
locals: { steps: [['Tableau de bord', tableau_de_bord_helper_path],
|
2022-11-08 11:08:09 +01:00
|
|
|
|
[t('.profile')]] }
|
2019-07-02 18:15:03 +02:00
|
|
|
|
|
|
|
|
|
#profil-page.container
|
2022-11-08 11:08:09 +01:00
|
|
|
|
%h1= t('.profile')
|
2019-07-02 18:15:03 +02:00
|
|
|
|
|
2021-11-16 14:54:09 +01:00
|
|
|
|
- if @waiting_merge_emails.present?
|
2021-10-26 13:22:51 +02:00
|
|
|
|
.card
|
|
|
|
|
.card-title Demande de fusion de comptes
|
|
|
|
|
%p
|
|
|
|
|
Acceptez-vous d’absorber le compte de
|
|
|
|
|
%span.email-address= @waiting_merge_emails.join(', ')
|
|
|
|
|
|
2022-11-07 17:16:00 +01:00
|
|
|
|
= link_to 'Refuser la fusion', refuse_merge_path, method: :post, class: 'fr-btn fr-btn--secondary', data: { confirm: "Confirmez-vous le refus ?" }
|
|
|
|
|
= link_to 'Accepter la fusion', accept_merge_path, method: :post, class: 'fr-btn fr-btn--secondary', data: { confirm: "Confirmez-vous la fusion des comptes ?" }
|
2021-10-26 13:22:51 +02:00
|
|
|
|
|
2019-07-08 10:40:50 +02:00
|
|
|
|
.card
|
2022-11-08 11:08:09 +01:00
|
|
|
|
.card-title= t('.contact')
|
2019-07-09 16:21:45 +02:00
|
|
|
|
%p
|
2022-11-08 11:08:09 +01:00
|
|
|
|
= t('.your_email')
|
2019-07-09 16:21:45 +02:00
|
|
|
|
%span.email-address= current_user.email
|
2021-10-26 10:12:15 +02:00
|
|
|
|
|
2021-10-26 16:18:12 +02:00
|
|
|
|
- waiting_email = current_user.unconfirmed_email || current_user.requested_merge_into&.email
|
2021-10-26 10:12:15 +02:00
|
|
|
|
|
2021-10-26 16:18:12 +02:00
|
|
|
|
- if waiting_email.present?
|
2021-10-26 10:12:15 +02:00
|
|
|
|
%p.mb-4
|
2022-11-08 11:08:09 +01:00
|
|
|
|
= t('.pending_change')
|
2021-10-26 16:18:12 +02:00
|
|
|
|
%span.email-address= waiting_email
|
2021-10-26 10:12:15 +02:00
|
|
|
|
%br
|
2022-11-08 11:08:09 +01:00
|
|
|
|
= t('.finalize_email_change')
|
2019-07-08 10:40:50 +02:00
|
|
|
|
|
2021-10-18 12:03:13 +02:00
|
|
|
|
- if current_user.instructeur?
|
|
|
|
|
%p.mb-4
|
|
|
|
|
= t('.email_explications_html',
|
|
|
|
|
contact_email: CONTACT_EMAIL,
|
|
|
|
|
application_name: APPLICATION_NAME,
|
|
|
|
|
legit_admin_domains: LEGIT_ADMIN_DOMAINS.join(', '))
|
|
|
|
|
|
2021-11-16 14:54:09 +01:00
|
|
|
|
= form_for current_user, url: update_email_path, method: :patch, html: { class: 'form' } do |f|
|
2022-11-08 11:08:09 +01:00
|
|
|
|
= f.email_field :email, value: nil, placeholder: t('.new_email_address'), required: true
|
|
|
|
|
= f.submit t('.change_address'), class: 'fr-btn fr-btn--secondary'
|
2019-07-08 10:40:50 +02:00
|
|
|
|
|
2021-09-20 13:57:55 +02:00
|
|
|
|
- if !instructeur_signed_in?
|
|
|
|
|
.card
|
|
|
|
|
.card-title= t('.transfer_title')
|
|
|
|
|
= t('.transfer_explication_html')
|
|
|
|
|
|
|
|
|
|
= form_tag transfer_all_dossiers_path, class: 'form' do
|
|
|
|
|
= email_field_tag :next_owner, nil, required: true
|
2022-11-08 11:08:09 +01:00
|
|
|
|
= submit_tag t('.transfer_my_files'), class: 'fr-btn fr-btn--secondary', data: { confirm: t('.transfer_confirmation') }
|
2021-09-20 13:57:55 +02:00
|
|
|
|
|
2021-11-16 14:54:09 +01:00
|
|
|
|
- if @waiting_transfers.present?
|
2021-09-20 13:57:55 +02:00
|
|
|
|
.card.warning
|
|
|
|
|
.card-title= t('.waiting_transfers')
|
|
|
|
|
%ul
|
|
|
|
|
- @waiting_transfers.each do |email, nb_dossier|
|
|
|
|
|
%li= t('.one_waiting_transfer', email: email, count: nb_dossier)
|
2021-09-20 13:26:57 +02:00
|
|
|
|
|
2022-11-30 10:13:17 +01:00
|
|
|
|
= render Profile::APITokenCardComponent.new
|
2022-11-07 17:18:42 +01:00
|
|
|
|
|
|
|
|
|
- if @france_connect_informations.present?
|
|
|
|
|
.card
|
|
|
|
|
.card-title= t('.identities', count: @france_connect_informations.count, application_name: APPLICATION_NAME)
|
|
|
|
|
%p= t('.linked_identities', count: @france_connect_informations.count, application_name: APPLICATION_NAME)
|
|
|
|
|
%ul
|
|
|
|
|
- @france_connect_informations.each do |fci|
|
|
|
|
|
%li
|
|
|
|
|
#{fci.given_name} #{fci.family_name} (#{fci.email_france_connect})
|
2022-11-08 11:08:09 +01:00
|
|
|
|
= link_to t('.forbid_access'),
|
2022-11-07 17:18:42 +01:00
|
|
|
|
france_connect_information_path(fci_id: fci.id),
|
|
|
|
|
method: :delete,
|
|
|
|
|
data: { confirm: t('.unlink_confirmation', full_name: fci.full_name) },
|
|
|
|
|
class: 'fr-btn fr-btn--secondary fr-ml-2w'
|
2023-05-26 11:08:35 +02:00
|
|
|
|
|
|
|
|
|
- content_for :footer do
|
|
|
|
|
= render partial: 'users/dossiers/index_footer'
|