Use a case statement in _champs.html.haml

This commit is contained in:
gregoirenovel 2017-11-20 16:23:43 +01:00
parent c9cdf48cbc
commit 9b0415eed7

View file

@ -1,11 +1,12 @@
%table.table.vertical.dossier-champs
%tbody
- champs.each do |c|
- champs.reject { |c| c.type_champ == "explication" }.each do |c|
%tr
- if c.type_champ == "header_section"
- case c.type_champ
- when "header_section"
%th.header-section{ colspan: 2 }
= c.libelle
- elsif c.type_champ != "explication"
- else
%th.libelle
= "#{c.libelle} :"
%td.rich-text