33 lines
1.1 KiB
Text
33 lines
1.1 KiB
Text
%table.table.vertical.dossier-champs
|
||
%tbody
|
||
- champs.reject { |c| c.type_champ == "explication" }.each do |c|
|
||
%tr
|
||
- case c.type_champ
|
||
- when "header_section"
|
||
%th.header-section{ colspan: 2 }
|
||
= c.libelle
|
||
- when "multiple_drop_down_list"
|
||
%th.libelle
|
||
= "#{c.libelle} :"
|
||
%td.rich-text
|
||
- if c.value.present?
|
||
%ul
|
||
- c.value.split(", ").each do |item|
|
||
%li
|
||
= item
|
||
- when "dossier_link"
|
||
%th.libelle
|
||
= "#{c.libelle} :"
|
||
%td.rich-text
|
||
- dossier = Dossier.includes(:procedure).find_by(id: c.value)
|
||
- if dossier
|
||
= link_to("Dossier nº #{dossier.id}", dossier_path(dossier.procedure, dossier), target: '_blank')
|
||
%br
|
||
= dossier.text_summary
|
||
- else
|
||
Pas de dossier associé
|
||
- else
|
||
%th.libelle
|
||
= "#{c.libelle} :"
|
||
%td.rich-text
|
||
= sanitize(c.value)
|