diff --git a/app/components/procedure/card/modifications_component.rb b/app/components/procedure/card/modifications_component.rb deleted file mode 100644 index 35b90a624..000000000 --- a/app/components/procedure/card/modifications_component.rb +++ /dev/null @@ -1,9 +0,0 @@ -class Procedure::Card::ModificationsComponent < ApplicationComponent - def initialize(procedure:) - @procedure = procedure - end - - def render? - @procedure.revised? - end -end diff --git a/app/components/procedure/card/modifications_component/modifications_component.fr.yml b/app/components/procedure/card/modifications_component/modifications_component.fr.yml deleted file mode 100644 index 676fc64cd..000000000 --- a/app/components/procedure/card/modifications_component/modifications_component.fr.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -fr: - title: - one: Modification du formulaire - other: Modifications du formulaire diff --git a/app/components/procedure/card/modifications_component/modifications_component.html.haml b/app/components/procedure/card/modifications_component/modifications_component.html.haml deleted file mode 100644 index 9dc203c17..000000000 --- a/app/components/procedure/card/modifications_component/modifications_component.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -.fr-col-6.fr-col-md-4.fr-col-lg-3 - = link_to modifications_admin_procedure_path(@procedure), id: 'modifications', class: 'fr-tile fr-enlarge-link' do - .fr-tile__body.flex.column.align-center.justify-between - %p.fr-badge.fr-badge--success Activée - %div - .line-count.fr-my-1w - %p.fr-tag= @procedure.revisions_count - %h3.fr-h6 - = t('.title', count: @procedure.revisions_count) - - %p.fr-tile-subtitle Historique des modifications apportées au formulaire - %p.fr-btn.fr-btn--tertiary Voir diff --git a/app/views/administrateurs/procedures/champs.html.haml b/app/views/administrateurs/procedures/champs.html.haml index 95ddf2860..1d397ebb0 100644 --- a/app/views/administrateurs/procedures/champs.html.haml +++ b/app/views/administrateurs/procedures/champs.html.haml @@ -4,7 +4,11 @@ ['Champs du formulaire']], preview: @procedure.draft_revision.valid? } .fr-container - %h1.fr-h2 Champs du formulaire + .flex.justify-between.align-center.fr-mb-3w + %h1.fr-h2 Champs du formulaire + - if @procedure.revised? + = link_to "Voir l'historique des modifications du formulaire", modifications_admin_procedure_path(@procedure), class: 'fr-link' + = render NestedForms::FormOwnerComponent.new .fr-grid-row = render partial: 'champs_summary' diff --git a/app/views/administrateurs/procedures/modifications.html.haml b/app/views/administrateurs/procedures/modifications.html.haml index ea9e9c32b..978fee30f 100644 --- a/app/views/administrateurs/procedures/modifications.html.haml +++ b/app/views/administrateurs/procedures/modifications.html.haml @@ -1,8 +1,11 @@ = render partial: 'administrateurs/breadcrumbs', locals: { steps: [['Démarches', admin_procedures_back_path(@procedure)], [@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)], + ['Champs du formulaire', champs_admin_procedure_path(@procedure)], ['Historique des modifications du formulaire']] } .fr-container + .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" %h1.fr-h2 Historique des modifications du formulaire diff --git a/app/views/administrateurs/procedures/show.html.haml b/app/views/administrateurs/procedures/show.html.haml index a4c1f16d3..c510fa022 100644 --- a/app/views/administrateurs/procedures/show.html.haml +++ b/app/views/administrateurs/procedures/show.html.haml @@ -75,7 +75,6 @@ = 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) %h3.fr-h6 Pour aller plus loin .fr-grid-row.fr-grid-row--gutters.fr-mb-5w