2020-09-08 12:35:44 +02:00
|
|
|
.card.mb-4
|
|
|
|
%h2.card-title Publiez votre démarche
|
|
|
|
= form_tag admin_procedure_publish_path(procedure_id: procedure.id), method: :put, class: 'form' do
|
2021-11-24 11:09:58 +01:00
|
|
|
- publication_errors = procedure_publication_errors(procedure)
|
|
|
|
- if publication_errors.present?
|
|
|
|
.card.warning
|
|
|
|
.card-title Des problèmes empêchent la publication de la démarche
|
|
|
|
- publication_errors.each do |_attribute, full_messages|
|
|
|
|
%p= full_messages.to_sentence
|
|
|
|
|
2022-10-19 09:28:23 +02:00
|
|
|
- if procedure.draft_changed?
|
|
|
|
- if procedure.close?
|
|
|
|
%p.mb-2 Publiez une nouvelle version de votre démarche. Les modifications suivantes seront appliquées :
|
|
|
|
= render partial: 'revision_changes', locals: { changes: procedure.revision_changes }
|
|
|
|
= render partial: 'publication_form_inputs', locals: { procedure: procedure, closed_procedures: @closed_procedures }
|
2022-06-02 15:26:12 +02:00
|
|
|
|
2022-10-19 09:28:23 +02:00
|
|
|
- else
|
|
|
|
%p.mb-2 Publiez une nouvelle version de votre démarche. Les modifications suivantes seront appliquées :
|
|
|
|
= render partial: 'revision_changes', locals: { changes: procedure.revision_changes }
|
2022-06-02 15:26:12 +02:00
|
|
|
|
2021-06-18 11:15:10 +02:00
|
|
|
- else
|
2022-06-02 15:26:12 +02:00
|
|
|
= render partial: 'publication_form_inputs', locals: { procedure: procedure, closed_procedures: @closed_procedures }
|
2020-09-08 12:35:44 +02:00
|
|
|
|
|
|
|
.flex.justify-end
|
2021-11-24 11:09:58 +01:00
|
|
|
= submit_tag procedure_publish_label(procedure, :submit), { disabled: publication_errors.present?, class: "button primary", id: 'publish' }
|