2020-09-08 12:35:44 +02:00
|
|
|
|
2021-11-25 16:26:55 +01:00
|
|
|
= render partial: 'administrateurs/breadcrumbs',
|
2022-12-08 17:28:48 +01:00
|
|
|
locals: { steps: [['Démarches', admin_procedures_back_path(@procedure)],
|
2022-09-09 13:08:24 +02:00
|
|
|
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
|
2023-07-17 10:41:38 +02:00
|
|
|
['Publier']] }
|
|
|
|
.fr-container
|
|
|
|
.fr-grid-row
|
2023-07-17 16:27:59 +02:00
|
|
|
.fr-col-12.fr-col-offset-md-2.fr-col-md-8
|
2023-07-17 10:41:38 +02:00
|
|
|
- if @procedure.draft_revision.types_de_champ_public.dubious.present?
|
2023-07-17 16:27:59 +02:00
|
|
|
= render Dsfr::AlertComponent.new(state: :warning, title: t('.dubious_fields'), extra_class_names: 'fr-mb-2w') do |c|
|
2024-01-08 11:22:38 +01:00
|
|
|
- c.with_body do
|
2023-07-17 10:41:38 +02:00
|
|
|
%ul
|
|
|
|
- @procedure.draft_revision.types_de_champ_public.dubious.each do |dubious_champs|
|
|
|
|
%li.dubious-champs= "#{dubious_champs.libelle} (#{dubious_champs.description})"
|
|
|
|
.lien-demarche
|
|
|
|
%h1
|
2023-07-17 16:27:59 +02:00
|
|
|
= t('.publish_title')
|
2020-09-08 12:35:44 +02:00
|
|
|
|
2023-07-17 10:41:38 +02:00
|
|
|
%div{ style: 'margin-top: 30px;' }
|
|
|
|
- if @procedure.close? || @procedure.depubliee?
|
2023-07-17 16:27:59 +02:00
|
|
|
%p.mb-4= t('.closed_procedure_html')
|
2023-07-17 10:41:38 +02:00
|
|
|
= render partial: 'publication_form', locals: { procedure: @procedure, administrateur: @current_administrateur }
|
|
|
|
- elsif @procedure.draft_changed?
|
2023-07-17 16:27:59 +02:00
|
|
|
%p.mb-4= t('.draft_changed_procedure_html')
|
2023-07-17 10:41:38 +02:00
|
|
|
= render partial: 'publication_form', locals: { procedure: @procedure, administrateur: @current_administrateur }
|
|
|
|
- elsif @procedure.publiee?
|
2023-07-17 16:27:59 +02:00
|
|
|
%p= t('.published_procedure_html')
|
2023-07-17 10:41:38 +02:00
|
|
|
= link_to commencer_url(@procedure.path), commencer_url(@procedure.path), target: :blank, rel: :noopener, class: "mb-4"
|
2020-09-08 12:35:44 +02:00
|
|
|
|
2023-07-17 10:41:38 +02:00
|
|
|
= render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-my-2w') do |c|
|
2024-01-08 11:22:38 +01:00
|
|
|
- c.with_body do
|
2024-03-20 11:34:54 +01:00
|
|
|
%p= t('.public_link_procedure_html', link: Current.application_name)
|
2023-07-17 16:27:59 +02:00
|
|
|
|
2023-07-17 10:41:38 +02:00
|
|
|
- elsif @procedure.brouillon?
|
|
|
|
- if @procedure.missing_steps.empty?
|
|
|
|
= render partial: 'publication_form', locals: { procedure: @procedure, administrateur: @current_administrateur }
|
2020-09-08 12:35:44 +02:00
|
|
|
|
2023-07-17 10:41:38 +02:00
|
|
|
- else
|
2023-07-17 16:27:59 +02:00
|
|
|
= render Dsfr::AlertComponent.new(state: :warning, title: t('.missing_information_title'), heading_level: :h2) do |c|
|
2024-01-08 11:22:38 +01:00
|
|
|
- c.with_body do
|
2023-07-17 16:27:59 +02:00
|
|
|
%p= t('.missing_information_content')
|
2023-07-17 10:41:38 +02:00
|
|
|
%ul
|
|
|
|
- if @procedure.missing_zones?
|
|
|
|
%li= link_to("une ou plusieurs zones", zones_admin_procedure_path(id: @procedure.id))
|
|
|
|
- if @procedure.missing_instructeurs?
|
|
|
|
%li= link_to("des instructeurs", admin_procedure_groupe_instructeur_path(@procedure, @procedure.defaut_groupe_instructeur))
|
|
|
|
- if @procedure.service.nil?
|
|
|
|
%li= link_to("un service", admin_services_path(procedure_id: @procedure))
|
2024-09-20 15:21:22 +02:00
|
|
|
- if @procedure.service_siret_test?
|
|
|
|
%li= link_to("un service avec un SIRET valide", admin_services_path(procedure_id: @procedure))
|
2023-07-17 16:27:59 +02:00
|
|
|
= 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-mt-2w'
|
2020-09-08 12:35:44 +02:00
|
|
|
|
2023-07-17 10:41:38 +02:00
|
|
|
- else
|
|
|
|
- if @procedure.missing_steps.include?(:service)
|
|
|
|
= render Dsfr::AlertComponent.new(state: :warning, size: :sm, extra_class_names: 'fr-my-2w') do |c|
|
2024-01-08 11:22:38 +01:00
|
|
|
- c.with_body do
|
2023-07-17 10:41:38 +02:00
|
|
|
%p
|
2023-07-17 16:27:59 +02:00
|
|
|
= t('.missing_information_service')
|
|
|
|
= link_to t('.click_here'), (@current_administrateur.services.present? ? url_for(admin_services_path(procedure_id: @procedure.id)) : url_for(new_admin_service_path(procedure_id: @procedure.id)))
|
2020-09-08 12:35:44 +02:00
|
|
|
|
2023-07-17 10:41:38 +02:00
|
|
|
- if @procedure.missing_steps.include?(:instructeurs)
|
|
|
|
= render Dsfr::AlertComponent.new(state: :warning, size: :sm, extra_class_names: 'fr-my-2w') do |c|
|
2024-01-08 11:22:38 +01:00
|
|
|
- c.with_body do
|
2023-07-17 10:41:38 +02:00
|
|
|
%p
|
2023-07-17 16:27:59 +02:00
|
|
|
= t('.missing_information_instructeurs')
|
|
|
|
= link_to t('.click_here'), admin_procedure_groupe_instructeur_path(@procedure, @procedure.defaut_groupe_instructeur)
|
2023-07-17 10:41:38 +02:00
|
|
|
= render Dsfr::AlertComponent.new(state: :warning, size: :sm, extra_class_names: 'fr-my-2w') do |c|
|
2024-01-08 11:22:38 +01:00
|
|
|
- c.with_body do
|
2023-07-17 10:41:38 +02:00
|
|
|
%p
|
2023-07-17 16:27:59 +02:00
|
|
|
= t('.missing_link')
|
2020-09-08 12:35:44 +02:00
|
|
|
|
2023-07-17 16:27:59 +02:00
|
|
|
= 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-mt-2w'
|