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)}"]],
2022-08-17 13:53:07 +02:00
metadatas: true }
2020-07-20 10:37:08 +02:00
.container.procedure-admin-container
2022-09-01 14:46:47 +02:00
- if @procedure.draft_revision.valid?
- if !@procedure.brouillon?
= link_to admin_procedure_archives_path(@procedure), class: 'button', id: "archive-procedure" do
%span.icon.download
Télécharger
2022-06-23 13:51:58 +02:00
2022-12-01 13:29:08 +01:00
= link_to commencer_dossier_vide_for_revision_path(@procedure.active_revision), target: "_blank", rel: "noopener", class: 'button', id: "pdf-procedure" do
2022-09-01 14:46:47 +02:00
%span.icon.printer
PDF
2022-04-22 15:49:34 +02:00
2022-09-01 14:46:47 +02:00
= link_to apercu_admin_procedure_path(@procedure), target: "_blank", rel: "noopener", class: 'button', id: "preview-procedure" do
%span.icon.preview
Prévisualiser
2020-07-15 10:48:11 +02:00
2022-09-01 14:46:47 +02:00
- if @procedure.brouillon? || @procedure.draft_changed?
= link_to sanitize_url(@procedure_lien_test), target: :blank, rel: :noopener, class: 'button' do
%span.icon.in-progress
Tester
2020-07-20 10:37:08 +02:00
2022-09-01 14:46:47 +02:00
- if @procedure.publiee? || @procedure.brouillon?
= link_to admin_procedure_transfert_path(@procedure), class: 'button' do
%span.icon.reply
Envoyer une copie
2020-07-29 17:05:19 +02:00
2022-09-01 14:46:47 +02:00
- if !@procedure.publiee? && !@procedure.close? && !@procedure.depubliee?
= link_to 'Publier', admin_procedure_publication_path(@procedure), class: 'button primary', id: 'publish-procedure-link', data: { disable_with: "Publication..." }
2020-07-20 10:37:08 +02:00
2022-09-01 14:46:47 +02:00
- if (@procedure.close? || @procedure.depubliee?) && !@procedure.draft_changed?
= link_to 'Réactiver', admin_procedure_publication_path(@procedure), class: 'button primary', id: 'publish-procedure-link', data: { disable_with: "Publication..." }
2020-09-08 12:35:44 +02:00
2022-09-01 14:46:47 +02:00
- if @procedure.locked? && !@procedure.close?
= link_to admin_procedure_archive_path(procedure_id: @procedure.id), method: :put, class: 'button', id: "close-procedure-link", data: { confirm: "Voulez-vous vraiment clore la démarche ? \nLes dossiers en cours pourront être instruits, mais aucun nouveau dossier ne pourra plus être déposé.", disable_with: "Archivage..."} do
%span.icon.archive
Clore
2020-07-15 10:48:11 +02:00
2022-06-28 12:14:32 +02:00
.container
= render TypesDeChampEditor::ErrorsSummary.new(revision: @procedure.draft_revision)
2022-11-02 10:03:10 +01:00
- if @procedure.draft_changed?
2021-06-23 18:56:04 +02:00
.container
.card.featured
.card-title
2021-11-25 16:26:55 +01:00
= t(:has_changes, scope: [:administrateurs, :revision_changes])
2021-06-23 18:56:04 +02:00
= render partial: 'revision_changes', locals: { changes: @procedure.revision_changes }
2022-07-06 12:37:08 +02:00
.flex.mt-2.justify-end
2022-10-06 14:42:14 +02:00
= button_to "Réinitialiser les modifications", admin_procedure_reset_draft_path(@procedure), class: 'fr-btn fr-btn--secondary fr-mr-2w', method: :put
2022-11-02 10:03:10 +01:00
= 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?, method: :get
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 }
2020-07-15 10:48:11 +02:00
.container
2022-10-14 16:55:29 +02:00
%h2.fr-mt-5w.fr-mb-3w.fr-h1 Indispensable avant publication
.fr-grid-row.fr-grid-row--gutters
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
2022-10-14 16:55:29 +02:00
%h2.fr-mt-5w.fr-mb-3w.fr-h1 Pour aller plus loin
.fr-grid-row.fr-grid-row--gutters
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)
= render Procedure::Card::MonAvisComponent.new(procedure: @procedure)
= render Procedure::Card::DossierSubmittedMessageComponent.new(procedure: @procedure)
2022-02-04 14:40:16 +01:00