Use a case statement in _champs.html.haml
This commit is contained in:
parent
c9cdf48cbc
commit
9b0415eed7
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue