From e4f10a3d2d176108a2b42174b06723245fba63cc Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Fri, 28 Dec 2018 16:36:16 +0100 Subject: [PATCH] Order a case statement alphabetically --- app/views/shared/dossiers/_champs.html.haml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/views/shared/dossiers/_champs.html.haml b/app/views/shared/dossiers/_champs.html.haml index 4ccd02fbd..b1cfb1f23 100644 --- a/app/views/shared/dossiers/_champs.html.haml +++ b/app/views/shared/dossiers/_champs.html.haml @@ -11,18 +11,18 @@ %td.rich-text %span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) } - case c.type_champ - - when TypeDeChamp.type_champs.fetch(:multiple_drop_down_list) - = render partial: "shared/champs/multiple_drop_down_list/show", locals: { champ: c } - - when TypeDeChamp.type_champs.fetch(:dossier_link) - = render partial: "shared/champs/dossier_link/show", locals: { champ: c } - - when TypeDeChamp.type_champs.fetch(:piece_justificative) - = render partial: "shared/champs/piece_justificative/show", locals: { champ: c } - - when TypeDeChamp.type_champs.fetch(:textarea) - = render partial: "shared/champs/text_area/show", locals: { champ: c } - - when TypeDeChamp.type_champs.fetch(:siret) - = render partial: "shared/champs/siret/show", locals: { champ: c, profile: profile } - when TypeDeChamp.type_champs.fetch(:carte) = render partial: "shared/champs/carte/show", locals: { champ: c } + - when TypeDeChamp.type_champs.fetch(:dossier_link) + = render partial: "shared/champs/dossier_link/show", locals: { champ: c } + - when TypeDeChamp.type_champs.fetch(:multiple_drop_down_list) + = render partial: "shared/champs/multiple_drop_down_list/show", locals: { champ: c } + - when TypeDeChamp.type_champs.fetch(:piece_justificative) + = render partial: "shared/champs/piece_justificative/show", locals: { champ: c } + - when TypeDeChamp.type_champs.fetch(:siret) + = render partial: "shared/champs/siret/show", locals: { champ: c, profile: profile } + - when TypeDeChamp.type_champs.fetch(:textarea) + = render partial: "shared/champs/text_area/show", locals: { champ: c } - else = sanitize(c.to_s) - if c.type_champ != TypeDeChamp.type_champs.fetch(:header_section)