From 6efd9ae7475ba20d6a0b61f1cd67b807832c8b00 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Wed, 21 Aug 2024 17:28:11 +0200 Subject: [PATCH] refactor(admin): rename procedures/_unpublished_changes_{navbar,sticky} partial --- ...r.html.haml => _unpublished_changes_sticky_header.html.haml} | 0 app/views/administrateurs/procedures/champs.html.haml | 2 +- .../administrateurs/types_de_champ/_insert.turbo_stream.haml | 2 +- config/locales/views/administrateurs/procedures/en.yml | 2 +- config/locales/views/administrateurs/procedures/fr.yml | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename app/views/administrateurs/procedures/{_unpublished_changes_navbar.html.haml => _unpublished_changes_sticky_header.html.haml} (100%) diff --git a/app/views/administrateurs/procedures/_unpublished_changes_navbar.html.haml b/app/views/administrateurs/procedures/_unpublished_changes_sticky_header.html.haml similarity index 100% rename from app/views/administrateurs/procedures/_unpublished_changes_navbar.html.haml rename to app/views/administrateurs/procedures/_unpublished_changes_sticky_header.html.haml diff --git a/app/views/administrateurs/procedures/champs.html.haml b/app/views/administrateurs/procedures/champs.html.haml index fb85b6aee..e2a33167f 100644 --- a/app/views/administrateurs/procedures/champs.html.haml +++ b/app/views/administrateurs/procedures/champs.html.haml @@ -1,7 +1,7 @@ - if @procedure.draft_changed? - content_for(:sticky_header) do - = render partial: 'administrateurs/procedures/unpublished_changes_navbar', locals: { procedure: @procedure } + = render partial: 'administrateurs/procedures/unpublished_changes_sticky_header', locals: { procedure: @procedure } = render partial: 'administrateurs/breadcrumbs', locals: { steps: [['Démarches', admin_procedures_back_path(@procedure)], [@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)], diff --git a/app/views/administrateurs/types_de_champ/_insert.turbo_stream.haml b/app/views/administrateurs/types_de_champ/_insert.turbo_stream.haml index ccf49114e..7a246c79a 100644 --- a/app/views/administrateurs/types_de_champ/_insert.turbo_stream.haml +++ b/app/views/administrateurs/types_de_champ/_insert.turbo_stream.haml @@ -52,7 +52,7 @@ - if @procedure.draft_changed? = turbo_stream.update "sticky-header" do - = render partial: "administrateurs/procedures/unpublished_changes_navbar", locals: { procedure: @procedure } + = render partial: "administrateurs/procedures/unpublished_changes_sticky_header", locals: { procedure: @procedure } - else = turbo_stream.update "sticky-header", "" diff --git a/config/locales/views/administrateurs/procedures/en.yml b/config/locales/views/administrateurs/procedures/en.yml index 24fb5ebe0..0f043ce36 100644 --- a/config/locales/views/administrateurs/procedures/en.yml +++ b/config/locales/views/administrateurs/procedures/en.yml @@ -71,7 +71,7 @@ en: path_not_available: owner: This URL is identical to another of your published procedures. If you publish this procedure, the old one will be unpublished and will no longer be accessible to the public. not_owner: This URL is identical to another procedure, you must modify it. - unpublished_changes_navbar: + unpublished_changes_sticky_header: intro_html: Changes made will only be visible after the next publication see_changes: View changes publish_changes: Publish changes diff --git a/config/locales/views/administrateurs/procedures/fr.yml b/config/locales/views/administrateurs/procedures/fr.yml index 18c934906..320daad34 100644 --- a/config/locales/views/administrateurs/procedures/fr.yml +++ b/config/locales/views/administrateurs/procedures/fr.yml @@ -71,7 +71,7 @@ fr: path_not_available: owner: Cette url est identique à celle d’une autre de vos démarches publiées. Si vous publiez cette démarche, l’ancienne sera dépubliée et ne sera plus accessible au public. not_owner: Cette url est identique à celle d’une autre démarche, vous devez la modifier afin de pouvoir publier votre démarche. - unpublished_changes_navbar: + unpublished_changes_sticky_header: intro_html: Les modifications effectuées ne seront visibles qu'à la prochaine publication see_changes: Voir les modifications publish_changes: Publier les modifications