From c1ebae3ee80ad829a8ca8e434ed0b882d22a5e83 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Fri, 28 Dec 2018 16:23:49 +0100 Subject: [PATCH] Extract the textarea champ view in a partial --- app/views/shared/champs/textarea/_show.html.haml | 1 + app/views/shared/dossiers/_champs.html.haml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 app/views/shared/champs/textarea/_show.html.haml diff --git a/app/views/shared/champs/textarea/_show.html.haml b/app/views/shared/champs/textarea/_show.html.haml new file mode 100644 index 000000000..cd7684777 --- /dev/null +++ b/app/views/shared/champs/textarea/_show.html.haml @@ -0,0 +1 @@ += simple_format(champ.to_s) diff --git a/app/views/shared/dossiers/_champs.html.haml b/app/views/shared/dossiers/_champs.html.haml index 566ee19a9..491361855 100644 --- a/app/views/shared/dossiers/_champs.html.haml +++ b/app/views/shared/dossiers/_champs.html.haml @@ -29,7 +29,7 @@ = "#{c.libelle} :" %td.rich-text %span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) } - = simple_format(c.to_s) + = render partial: "shared/champs/text_area/show", locals: { champ: c } - when TypeDeChamp.type_champs.fetch(:siret) %th.libelle = "#{c.libelle} :"