demarches-normaliennes/app/views/administrateurs/procedures/show.html.haml

78 lines
4.4 KiB
Text
Raw Normal View History

= render partial: 'administrateurs/breadcrumbs',
locals: { steps: [['Démarches', admin_procedures_path],
["#{@procedure.libelle.truncate_words(10)}"]],
metadatas: true }
2020-07-20 10:37:08 +02:00
.container.procedure-admin-container
- 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
= link_to @procedure.active_revision.draft? ? commencer_dossier_vide_test_path(path: @procedure.path) : commencer_dossier_vide_path(path: @procedure.path), target: "_blank", rel: "noopener", class: 'button', id: "pdf-procedure" do
%span.icon.printer
PDF
= link_to apercu_admin_procedure_path(@procedure), target: "_blank", rel: "noopener", class: 'button', id: "preview-procedure" do
%span.icon.preview
Prévisualiser
- 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
- if @procedure.publiee? || @procedure.brouillon?
= link_to admin_procedure_transfert_path(@procedure), class: 'button' do
%span.icon.reply
Envoyer une copie
- 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
- 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..." }
- 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
2022-06-28 12:14:32 +02:00
.container
= render TypesDeChampEditor::ErrorsSummary.new(revision: @procedure.draft_revision)
- if @procedure.draft_changed? && @procedure.draft_revision.valid?
2021-06-23 18:56:04 +02:00
.container
.card.featured
.card-title
= t(:has_changes, scope: [:administrateurs, :revision_changes])
2021-06-23 18:56:04 +02:00
= render partial: 'revision_changes', locals: { changes: @procedure.revision_changes }
.flex.mt-2.justify-end
= button_to "Réinitialiser les modifications", admin_procedure_reset_draft_path(@procedure), class: 'button mr-1', method: :put
= link_to 'Publier les modifications', admin_procedure_publication_path(@procedure), class: 'button primary', id: 'publish-procedure-link', data: { disable_with: "Publication..." }
2021-06-18 11:15:10 +02:00
- if !@procedure.procedure_expires_when_termine_enabled?
= render partial: 'administrateurs/procedures/suggest_expires_when_termine', locals: { procedure: @procedure }
.container
2020-07-20 10:37:08 +02:00
%h2.procedure-admin-explanation Indispensable avant publication
.procedure-grid
= render Procedure::Card::PresentationComponent.new(procedure: @procedure)
= 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)
2020-07-20 10:37:08 +02:00
%h2.procedure-admin-explanation Pour aller plus loin
.procedure-grid
= 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)