From 09d479321b95653bb7b7ab0aba2567e2837115bb Mon Sep 17 00:00:00 2001 From: Kara Diaby Date: Mon, 18 Mar 2024 09:48:39 +0000 Subject: [PATCH] =?UTF-8?q?corrections=20apr=C3=A8s=20retours?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/experts/avis_controller.rb | 4 ++-- app/views/experts/avis/notification_settings.html.haml | 10 +++++----- config/locales/views/experts/avis/en.yml | 6 +++--- config/locales/views/experts/avis/fr.yml | 6 +++--- db/schema.rb | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/controllers/experts/avis_controller.rb b/app/controllers/experts/avis_controller.rb index 0f94a3bd4..5c9ecb34c 100644 --- a/app/controllers/experts/avis_controller.rb +++ b/app/controllers/experts/avis_controller.rb @@ -68,7 +68,7 @@ module Experts end def expert_procedure - ExpertsProcedure.find_by(expert_id: current_expert.id, procedure_id: @procedure.id) + ExpertsProcedure.find_by!(expert_id: current_expert.id, procedure_id: @procedure.id) end def notification_settings @@ -188,7 +188,7 @@ module Experts end def set_procedure - @procedure = current_expert.procedures.find_by(id: params[:procedure_id]) + @procedure = current_expert.procedures.find(params[:procedure_id]) end def check_messaging_allowed diff --git a/app/views/experts/avis/notification_settings.html.haml b/app/views/experts/avis/notification_settings.html.haml index d6601289e..7a02cdd36 100644 --- a/app/views/experts/avis/notification_settings.html.haml +++ b/app/views/experts/avis/notification_settings.html.haml @@ -8,7 +8,7 @@ .procedure-header %h1.fr-h3= procedure_libelle @procedure -.container +.fr-container %h1.fr-h3 = t('.title') @@ -16,7 +16,7 @@ = render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-mb-2w') do |c| - c.with_body do %p - = t('.subtitle', procedure_libelle: @procedure.libelle) + = t('.subtitle') %fieldset.fr-fieldset %legend.fr-fieldset__legend @@ -55,6 +55,6 @@ %label.fr-label{ for: 'notify_on_new_message_false' } = t('.utils.negative') - .send-wrapper - = link_to t('.buttons.back_to_procedure', procedure_id: @procedure.id), procedure_expert_avis_index_path(@procedure), class: 'fr-btn fr-btn--secondary fr-mr-2w' - = form.submit t('.buttons.save'), class: "fr-btn" + %ul.fr-btns-group.fr-btns-group--inline + %li= form.submit t('.buttons.save'), class: "fr-btn" + %li= link_to t('.buttons.back_to_procedure', procedure_id: @procedure.id), procedure_expert_avis_index_path(@procedure), class: 'fr-btn fr-btn--secondary' diff --git a/config/locales/views/experts/avis/en.yml b/config/locales/views/experts/avis/en.yml index 10f6d4d80..c4497bd84 100644 --- a/config/locales/views/experts/avis/en.yml +++ b/config/locales/views/experts/avis/en.yml @@ -2,13 +2,13 @@ en: experts: avis: procedure: - management: notification management of the procedure %{procedure_id} + management: Notification management of the procedure notification_settings: utils: positive: Yes negative: No title: Email Notifications - subtitle: "Configure on this page the notifications you wish to receive by email for: %{procedure_libelle}" + subtitle: Configure on this page the notifications you wish to receive by email for_each_avis_submitted: title: Receive a notification for each avis requested from you notice_1: This email alerts you that an avis is requested from you. @@ -18,5 +18,5 @@ en: notice_1: This email notifies you that a new message is available in the messaging system. notice_2: It is sent every time an instructor or user sends a message. buttons: - back_to_procedure: Return to the procedure notices %{procedure_id} + back_to_procedure: Return to the procedure notices save: Save diff --git a/config/locales/views/experts/avis/fr.yml b/config/locales/views/experts/avis/fr.yml index cdcf94d20..e78d332ef 100644 --- a/config/locales/views/experts/avis/fr.yml +++ b/config/locales/views/experts/avis/fr.yml @@ -2,13 +2,13 @@ fr: experts: avis: procedure: - management: gestion des notifications de la démarche %{procedure_id} + management: Gestion des notifications de la démarche notification_settings: utils: positive: Oui negative: Non title: Notifications par email - subtitle: "Configurez sur cette page les notifications que vous souhaitez recevoir par email pour : %{procedure_libelle}" + subtitle: Configurez sur cette page les notifications que vous souhaitez recevoir par email for_each_avis_submitted: title: Recevoir une notification à chaque avis qui vous est demandé notice_1: Cet email vous signale qu'un avis vous est demandé. @@ -18,5 +18,5 @@ fr: notice_1: Cet email vous signale qu'un nouveau message est disponible dans la messagerie. notice_2: Il est envoyé à chaque fois qu’un instructeur ou usager envoie un message. buttons: - back_to_procedure: Revenir sur les avis de la démarche %{procedure_id} + back_to_procedure: Revenir sur les avis de la démarche save: Enregistrer diff --git a/db/schema.rb b/db/schema.rb index 1ee745928..0c952d372 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1232,7 +1232,7 @@ ActiveRecord::Schema[7.0].define(version: 2024_03_16_065520) do add_foreign_key "dossiers", "groupe_instructeurs" add_foreign_key "dossiers", "procedure_revisions", column: "revision_id" add_foreign_key "dossiers", "users" -add_foreign_key "etablissements", "dossiers" + add_foreign_key "etablissements", "dossiers" add_foreign_key "experts", "users" add_foreign_key "experts_procedures", "experts" add_foreign_key "experts_procedures", "procedures"