70 lines
4.1 KiB
Text
70 lines
4.1 KiB
Text
|
|
= render partial: 'administrateurs/breadcrumbs',
|
|
locals: { steps: [['Démarches', admin_procedures_back_path(@procedure)],
|
|
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
|
|
['Publier']] }
|
|
.fr-container
|
|
.fr-grid-row
|
|
.fr-col-12.fr-col-offset-md-2.fr-col-md-8
|
|
- if @procedure.draft_revision.types_de_champ_public.dubious.present?
|
|
= render Dsfr::AlertComponent.new(state: :warning, title: t('.dubious_fields'), extra_class_names: 'fr-mb-2w') do |c|
|
|
- c.body do
|
|
%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
|
|
= t('.publish_title')
|
|
|
|
%div{ style: 'margin-top: 30px;' }
|
|
- if @procedure.close? || @procedure.depubliee?
|
|
%p.mb-4= t('.closed_procedure_html')
|
|
= render partial: 'publication_form', locals: { procedure: @procedure, administrateur: @current_administrateur }
|
|
- elsif @procedure.draft_changed?
|
|
%p.mb-4= t('.draft_changed_procedure_html')
|
|
= render partial: 'publication_form', locals: { procedure: @procedure, administrateur: @current_administrateur }
|
|
- elsif @procedure.publiee?
|
|
%p= t('.published_procedure_html')
|
|
= link_to commencer_url(@procedure.path), commencer_url(@procedure.path), target: :blank, rel: :noopener, class: "mb-4"
|
|
|
|
= render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-my-2w') do |c|
|
|
- c.body do
|
|
%p= t('.public_link_procedure_html', link: APPLICATION_NAME)
|
|
|
|
- elsif @procedure.brouillon?
|
|
- if @procedure.missing_steps.empty?
|
|
= render partial: 'publication_form', locals: { procedure: @procedure, administrateur: @current_administrateur }
|
|
|
|
- else
|
|
= render Dsfr::AlertComponent.new(state: :warning, title: t('.missing_information_title'), heading_level: :h2) do |c|
|
|
- c.body do
|
|
%p= t('.missing_information_content')
|
|
%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))
|
|
= 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'
|
|
|
|
- else
|
|
- if @procedure.missing_steps.include?(:service)
|
|
= render Dsfr::AlertComponent.new(state: :warning, size: :sm, extra_class_names: 'fr-my-2w') do |c|
|
|
- c.body do
|
|
%p
|
|
= 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)))
|
|
|
|
- if @procedure.missing_steps.include?(:instructeurs)
|
|
= render Dsfr::AlertComponent.new(state: :warning, size: :sm, extra_class_names: 'fr-my-2w') do |c|
|
|
- c.body do
|
|
%p
|
|
= t('.missing_information_instructeurs')
|
|
= link_to t('.click_here'), admin_procedure_groupe_instructeur_path(@procedure, @procedure.defaut_groupe_instructeur)
|
|
= render Dsfr::AlertComponent.new(state: :warning, size: :sm, extra_class_names: 'fr-my-2w') do |c|
|
|
- c.body do
|
|
%p
|
|
= t('.missing_link')
|
|
|
|
= 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'
|