2023-06-05 11:11:09 +02:00
|
|
|
|
= render partial: 'administrateurs/breadcrumbs',
|
2023-05-31 12:15:53 +02:00
|
|
|
|
locals: { steps: [['Démarches', admin_procedures_back_path(@procedure)],
|
|
|
|
|
["#{@procedure.libelle.truncate_words(10)}"]],
|
|
|
|
|
metadatas: true }
|
|
|
|
|
|
2023-06-05 11:11:09 +02:00
|
|
|
|
.fr-container.procedure-admin-container
|
|
|
|
|
%ul.fr-btns-group.fr-btns-group--inline-sm.fr-btns-group--icon-left
|
|
|
|
|
- if @procedure.draft_revision.valid?
|
|
|
|
|
- if !@procedure.brouillon?
|
|
|
|
|
= link_to 'Télécharger', admin_procedure_archives_path(@procedure), class: 'fr-btn fr-btn--tertiary fr-btn--icon-left fr-icon-download-line', id: "archive-procedure"
|
2023-05-31 12:15:53 +02:00
|
|
|
|
|
2023-06-05 11:11:09 +02:00
|
|
|
|
= link_to 'PDF', commencer_dossier_vide_for_revision_path(@procedure.active_revision), target: "_blank", rel: "noopener", class: 'fr-btn fr-btn--tertiary fr-btn--icon-left fr-icon-printer-line', id: "pdf-procedure"
|
2023-05-31 12:15:53 +02:00
|
|
|
|
|
2023-06-05 11:11:09 +02:00
|
|
|
|
- if @procedure.brouillon? || @procedure.draft_changed?
|
2023-07-19 15:51:11 +02:00
|
|
|
|
= link_to 'Tester la démarche', commencer_url(@procedure.path, test: true), target: :blank, rel: :noopener, class: 'fr-btn fr-btn--tertiary fr-btn--icon-left fr-icon-flashlight-line'
|
2023-05-31 12:15:53 +02:00
|
|
|
|
|
2023-06-05 11:11:09 +02:00
|
|
|
|
- if @procedure.publiee? || @procedure.brouillon?
|
2023-07-19 15:51:11 +02:00
|
|
|
|
= link_to 'Envoyer une copie', admin_procedure_transfert_path(@procedure), class: 'fr-btn fr-btn--tertiary fr-btn--icon-left fr-icon-send-plane-line'
|
2023-05-31 12:15:53 +02:00
|
|
|
|
|
2023-06-05 11:11:09 +02:00
|
|
|
|
- if !@procedure.publiee? && !@procedure.close? && !@procedure.depubliee?
|
|
|
|
|
= link_to 'Publier', admin_procedure_publication_path(@procedure), class: 'fr-btn fr-btn--primary fr-btn--icon-left fr-icon-success-line', id: 'publish-procedure-link', data: { disable_with: "Publication..." }
|
2023-05-31 12:15:53 +02:00
|
|
|
|
|
2023-06-05 11:11:09 +02:00
|
|
|
|
- if (@procedure.close? || @procedure.depubliee?) && !@procedure.draft_changed?
|
|
|
|
|
= link_to 'Réactiver', admin_procedure_publication_path(@procedure), class: 'fr-btn fr-btn--primary fr-btn--icon-left fr-icon-success-line', id: 'publish-procedure-link', data: { disable_with: "Publication..." }
|
2023-05-31 12:15:53 +02:00
|
|
|
|
|
2023-06-05 11:11:09 +02:00
|
|
|
|
- if @procedure.locked? && !@procedure.close?
|
2023-11-28 13:05:42 +01:00
|
|
|
|
= link_to 'Clore', admin_procedure_close_path(procedure_id: @procedure.id), class: 'fr-btn fr-btn--tertiary fr-btn--icon-left fr-icon-calendar-close-fill', id: "close-procedure-link"
|
2023-05-31 12:15:53 +02:00
|
|
|
|
|
|
|
|
|
.fr-container
|
2022-06-28 12:14:32 +02:00
|
|
|
|
= render TypesDeChampEditor::ErrorsSummary.new(revision: @procedure.draft_revision)
|
|
|
|
|
|
2022-11-02 10:03:10 +01:00
|
|
|
|
- if @procedure.draft_changed?
|
2023-05-31 12:15:53 +02:00
|
|
|
|
.fr-container
|
2023-06-21 12:24:45 +02:00
|
|
|
|
= render Dsfr::CalloutComponent.new(title: t(:has_changes, scope: [:administrateurs, :revision_changes]), icon: "fr-fi-information-line") do |c|
|
2024-01-08 11:22:38 +01:00
|
|
|
|
- c.with_body do
|
2023-06-21 12:24:45 +02:00
|
|
|
|
= render Procedure::RevisionChangesComponent.new changes: @procedure.revision_changes, previous_revision: @procedure.published_revision
|
|
|
|
|
|
2023-12-05 18:31:20 +01:00
|
|
|
|
= render Procedure::PublicationWarningComponent.new(procedure: @procedure)
|
|
|
|
|
|
2024-01-08 11:22:38 +01:00
|
|
|
|
- c.with_bottom do
|
2023-06-21 12:24:45 +02:00
|
|
|
|
%ul.fr-mt-2w.fr-btns-group.fr-btns-group--inline
|
2023-11-06 17:46:22 +01:00
|
|
|
|
- if @procedure.publiee?
|
2023-12-05 18:31:20 +01:00
|
|
|
|
%li= button_to 'Publier les modifications', admin_procedure_publish_revision_path(@procedure), class: 'fr-btn', id: 'publish-procedure-link', data: { disable_with: "Publication...", confirm: 'Êtes-vous sûr de vouloir publier les modifications ?' }, disabled: !@procedure.draft_revision.valid? || @procedure.errors.present?, method: :put
|
2023-11-06 17:46:22 +01:00
|
|
|
|
- else
|
2023-12-05 18:31:20 +01:00
|
|
|
|
%li= button_to 'Publier les modifications', admin_procedure_publication_path(@procedure), class: 'fr-btn', id: 'publish-procedure-link', data: { disable_with: "Publication..." }, disabled: !@procedure.draft_revision.valid? || @procedure.errors.present?, method: :get
|
2023-09-28 18:38:03 +02:00
|
|
|
|
%li= button_to "Réinitialiser les modifications", admin_procedure_reset_draft_path(@procedure), class: 'fr-btn fr-btn--secondary fr-mr-2w', data: { confirm: 'Êtes-vous sûr de vouloir réinitialiser les modifications ?' }, method: :put
|
2021-06-18 11:15:10 +02:00
|
|
|
|
|
2022-02-22 16:09:00 +01:00
|
|
|
|
- if !@procedure.procedure_expires_when_termine_enabled?
|
|
|
|
|
= render partial: 'administrateurs/procedures/suggest_expires_when_termine', locals: { procedure: @procedure }
|
2024-02-15 11:10:23 +01:00
|
|
|
|
|
|
|
|
|
- if @procedure.close?
|
|
|
|
|
.fr-container
|
|
|
|
|
= render Dsfr::AlertComponent.new(title: 'cette démarche est close', state: (:warning), heading_level: 'h2', extra_class_names: 'fr-my-2w') do |c|
|
|
|
|
|
- c.with_body do
|
|
|
|
|
%p
|
|
|
|
|
Les dossiers en cours peuvent être instruits, mais aucun nouveau dossier ne peut plus être déposé.
|
|
|
|
|
- if @procedure.closing_reason == 'internal_procedure'
|
|
|
|
|
- new_procedure = Procedure.find_by(id: @procedure.replaced_by_procedure_id)
|
|
|
|
|
%p
|
|
|
|
|
= "Cette démarche est remplacée par une autre démarche dans Démarches simplifiées :"
|
2024-03-19 16:47:06 +01:00
|
|
|
|
= link_to(new_procedure.libelle, admin_procedure_path(new_procedure))
|
2024-02-15 11:10:23 +01:00
|
|
|
|
- if @procedure.closing_reason == 'other'
|
|
|
|
|
%p
|
|
|
|
|
= "Plus d'informations dans la #{link_to('page de fermeture', closing_details_path(@procedure.path))}, visible par les usagers."
|
|
|
|
|
- if @procedure.closing_notification_brouillon? || @procedure.closing_notification_en_cours?
|
|
|
|
|
= "Un email a été envoyé pour informer les usagers le #{ l(@procedure.closed_at.to_date) }"
|
|
|
|
|
|
2023-05-31 12:15:53 +02:00
|
|
|
|
.fr-container
|
2023-06-22 15:38:49 +02:00
|
|
|
|
%h2= "Gestion de la démarche № #{@procedure.id}"
|
|
|
|
|
%h3.fr-h6 Indispensable avant publication
|
|
|
|
|
.fr-grid-row.fr-grid-row--gutters.fr-mb-5w
|
2022-11-01 13:31:53 +01:00
|
|
|
|
= render Procedure::Card::PresentationComponent.new(procedure: @procedure)
|
2022-12-20 09:22:28 +01:00
|
|
|
|
= render Procedure::Card::ZonesComponent.new(procedure: @procedure) if Rails.application.config.ds_zonage_enabled
|
2022-11-01 13:31:53 +01:00
|
|
|
|
= render Procedure::Card::ChampsComponent.new(procedure: @procedure)
|
|
|
|
|
= render Procedure::Card::ServiceComponent.new(procedure: @procedure, administrateur: current_administrateur)
|
|
|
|
|
= render Procedure::Card::AdministrateursComponent.new(procedure: @procedure)
|
|
|
|
|
= render Procedure::Card::InstructeursComponent.new(procedure: @procedure)
|
|
|
|
|
= render Procedure::Card::ModificationsComponent.new(procedure: @procedure)
|
2022-03-16 16:23:53 +01:00
|
|
|
|
|
2023-06-22 15:38:49 +02:00
|
|
|
|
%h3.fr-h6 Pour aller plus loin
|
|
|
|
|
.fr-grid-row.fr-grid-row--gutters.fr-mb-5w
|
2022-11-01 13:31:53 +01:00
|
|
|
|
= render Procedure::Card::AttestationComponent.new(procedure: @procedure)
|
|
|
|
|
= render Procedure::Card::ExpertsComponent.new(procedure: @procedure)
|
|
|
|
|
= render Procedure::Card::EmailsComponent.new(procedure: @procedure)
|
|
|
|
|
= render Procedure::Card::AnnotationsComponent.new(procedure: @procedure)
|
|
|
|
|
= render Procedure::Card::APIEntrepriseComponent.new(procedure: @procedure)
|
|
|
|
|
= render Procedure::Card::APIParticulierComponent.new(procedure: @procedure)
|
2024-04-18 16:03:31 +02:00
|
|
|
|
= render Procedure::Card::SVASVRComponent.new(procedure: @procedure)
|
2022-11-01 13:31:53 +01:00
|
|
|
|
= render Procedure::Card::MonAvisComponent.new(procedure: @procedure)
|
|
|
|
|
= render Procedure::Card::DossierSubmittedMessageComponent.new(procedure: @procedure)
|
2023-08-28 14:31:12 +02:00
|
|
|
|
= render Procedure::Card::ChorusComponent.new(procedure: @procedure)
|
2024-03-19 17:26:57 +01:00
|
|
|
|
= render Procedure::Card::AccuseLectureComponent.new(procedure: @procedure)
|