94 lines
3.9 KiB
Text
94 lines
3.9 KiB
Text
- content_for(:title, t('.profile'))
|
||
|
||
= render partial: 'administrateurs/breadcrumbs',
|
||
locals: { steps: [['Tableau de bord', tableau_de_bord_helper_path],
|
||
[t('.profile')]] }
|
||
|
||
#profil-page.container
|
||
%h1= t('.profile')
|
||
|
||
- if @waiting_merge_emails.present?
|
||
.card
|
||
.card-title Demande de fusion de comptes
|
||
%p
|
||
Acceptez-vous d’absorber le compte de
|
||
%span.email-address= @waiting_merge_emails.join(', ')
|
||
|
||
= 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 ?" }
|
||
|
||
.card
|
||
.card-title= t('.contact')
|
||
%p
|
||
= t('.your_email')
|
||
%span.email-address= current_user.email
|
||
|
||
- waiting_email = current_user.unconfirmed_email || current_user.requested_merge_into&.email
|
||
|
||
- if waiting_email.present?
|
||
%p.mb-4
|
||
= t('.pending_change')
|
||
%span.email-address= waiting_email
|
||
%br
|
||
= t('.finalize_email_change')
|
||
|
||
- 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(', '))
|
||
|
||
= form_for current_user, url: update_email_path, method: :patch, html: { class: 'form' } do |f|
|
||
= f.email_field :email, value: nil, placeholder: t('.new_email_address'), required: true
|
||
= f.submit t('.change_address'), class: 'fr-btn fr-btn--secondary'
|
||
|
||
- 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
|
||
= submit_tag t('.transfer_my_files'), class: 'fr-btn fr-btn--secondary', data: { confirm: t('.transfer_confirmation') }
|
||
|
||
- if @waiting_transfers.present?
|
||
.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)
|
||
|
||
- if current_administrateur.present?
|
||
.card
|
||
.card-title Jeton d’identification de l’API (token)
|
||
%p Ce jeton est nécessaire pour effectuer des appels vers l’API de #{APPLICATION_NAME}.
|
||
|
||
- if defined?(@token)
|
||
%p Jeton : <b>#{@token}</b>
|
||
%p Pour des raisons de sécurité, ce jeton ne sera plus ré-affiché, notez-le bien.
|
||
|
||
- else
|
||
%p Pour des raisons de sécurité, nous ne pouvons vous l’afficher que lors de sa génération.
|
||
%p Attention, si vous avez déjà des applications qui utilisent votre jeton, le regénérer bloquera leurs accès à l’API.
|
||
|
||
= link_to "Regénérer et afficher mon jeton",
|
||
renew_api_token_path,
|
||
method: :post,
|
||
class: "fr-btn fr-btn--secondary",
|
||
data: { confirm: "Confirmez-vous la regénération de votre jeton ? Les applications qui l’utilisent actuellement seront bloquées.",
|
||
disable: true }
|
||
|
||
- 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})
|
||
= link_to t('.forbid_access'),
|
||
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'
|