2022-03-16 16:23:53 +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)],
|
2024-05-28 14:56:32 +02:00
|
|
|
['Champs du formulaire', champs_admin_procedure_path(@procedure)],
|
2024-05-22 16:31:42 +02:00
|
|
|
['Historique des modifications du formulaire']] }
|
|
|
|
.fr-container
|
2024-05-28 14:56:32 +02:00
|
|
|
.fr-mb-3w
|
|
|
|
= link_to "Champs du formulaire", champs_admin_procedure_path(@procedure), class: "fr-link fr-icon-arrow-left-line fr-link--icon-left"
|
2024-05-22 16:31:42 +02:00
|
|
|
%h1.fr-h2
|
2022-03-16 16:23:53 +01:00
|
|
|
Historique des modifications du formulaire
|
|
|
|
|
2024-05-22 16:31:42 +02:00
|
|
|
.fr-container
|
2022-03-16 16:23:53 +01:00
|
|
|
- previous_revision = nil
|
|
|
|
- @procedure.revisions.each do |revision|
|
|
|
|
- if previous_revision.present? && !revision.draft?
|
2022-12-23 10:30:02 +01:00
|
|
|
- dossiers = revision.dossiers.visible_by_administration
|
|
|
|
- dossiers_en_construction_count = dossiers.state_en_construction.count
|
|
|
|
- dossiers_en_instruction_count = dossiers.state_en_instruction.count
|
2022-09-06 09:58:09 +02:00
|
|
|
.card.mb-4
|
|
|
|
%h2.card-title= "Modifications publiées le #{l(revision.published_at, format: '%d %B %Y à %R')}"
|
2022-12-23 10:30:02 +01:00
|
|
|
- if !dossiers_en_construction_count.zero? && !dossiers_en_instruction_count.zero?
|
|
|
|
%p
|
|
|
|
- if dossiers_en_construction_count == 1
|
|
|
|
= t('.dossier_en_construction_and_dossiers_en_instruction', count: dossiers_en_instruction_count)
|
|
|
|
- elsif dossiers_en_instruction_count == 1
|
|
|
|
= t('.dossier_en_instruction_and_dossiers_en_construction', count: dossiers_en_construction_count)
|
|
|
|
- else
|
|
|
|
= t('.dossiers_en_construction_and_dossiers_en_instruction', en_construction_count: dossiers_en_construction_count, en_instruction_count: dossiers_en_instruction_count)
|
|
|
|
- elsif !dossiers_en_construction_count.zero?
|
|
|
|
%p= t('.dossiers_en_construction', count: dossiers_en_construction_count)
|
|
|
|
- elsif !dossiers_en_instruction_count.zero?
|
|
|
|
%p= t('.dossiers_en_instruction', count: dossiers_en_instruction_count)
|
2024-06-05 17:30:33 +02:00
|
|
|
= render Procedure::RevisionChangesComponent.new new_revision: revision, previous_revision:
|
2022-03-16 16:23:53 +01:00
|
|
|
- previous_revision = revision
|
2024-05-22 16:31:42 +02:00
|
|
|
|
2024-05-27 17:56:05 +02:00
|
|
|
= render Procedure::FixedFooterComponent.new(procedure: @procedure)
|