demarches-normaliennes/app/views/administrateurs/procedures/_publication_form.html.haml

45 lines
2.4 KiB
Text
Raw Normal View History

2023-07-17 16:27:59 +02:00
= form_for procedure,
url: admin_procedure_publish_path(procedure_id: procedure.id),
method: :put,
html: { class: 'form' } do |f|
= render Procedure::ErrorsSummary.new(procedure: @procedure, validation_context: :publication)
.mt-2
- if procedure.draft_changed?
2023-07-17 16:27:59 +02:00
%p.mb-2= t('.draft_changed_procedure_alert')
= render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-mb-2w') do |c|
2024-01-08 11:22:38 +01:00
- c.with_body do
= render Procedure::RevisionChangesComponent.new new_revision: procedure.draft_revision, previous_revision: procedure.published_revision
- if procedure.close?
2023-07-17 16:27:59 +02:00
= render partial: 'publication_form_inputs', locals: { procedure: procedure, closed_procedures: @closed_procedures, form: f }
- elsif @procedure.brouillon? && @procedure.missing_steps.empty?
= render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-mb-2w') do |c|
2024-01-08 11:22:38 +01:00
- c.with_body do
%p
= t('.faq_test_alert')
= link_to t('.faq_test_alert_link'), t('.faq_test_alert_link_url')
2023-07-17 16:27:59 +02:00
= render partial: 'publication_form_inputs', locals: { procedure: procedure, closed_procedures: @closed_procedures, form: f }
= render Dsfr::CalloutComponent.new(title: t('.dpd_title'), heading_level: 'h2') do |c|
- c.with_body do
%p.fr-mb-2w
2023-07-17 16:27:59 +02:00
= t('.dpd_part_1')
%a{ href:'https://www.cnil.fr/fr/protection-des-donnees-les-bons-reflexes', target:'_blank' }
https://www.cnil.fr/fr/protection-des-donnees-les-bons-reflexes
%p.fr-mb-2w
2023-07-17 16:27:59 +02:00
= t('.dpd_part_2')
%p.fr-mb-2w
2023-07-17 16:27:59 +02:00
= t('.dpd_part_3')
%a{ href:'https://www.cnil.fr/fr/RGDP-le-registre-des-activites-de-traitement', target:'_blank' }
https://www.cnil.fr/fr/RGDP-le-registre-des-activites-de-traitement
%p.fr-mb-2w
2023-07-17 16:27:59 +02:00
= t('.dpd_part_4')
- else
2023-07-17 16:27:59 +02:00
= render partial: 'publication_form_inputs', locals: { procedure: procedure, closed_procedures: @closed_procedures, form: f }
%ul.fr-btns-group.fr-btns-group--inline-md.fr-btns-group--icon-left
2023-07-17 16:27:59 +02:00
= f.submit t('.submit'), { disabled: procedure.errors.present?, class: "fr-btn fr-btn--primary", id: 'publish' }
= link_to t('.back_to_procedure'), admin_procedure_path(id: @procedure), class: 'fr-btn fr-btn--secondary fr-btn--icon-left fr-icon-arrow-go-back-line fr-ml-1w'