2017-10-16 17:37:19 +02:00
|
|
|
|
%table.table.vertical.dossier-champs
|
2017-07-11 16:50:29 +02:00
|
|
|
|
%tbody
|
2017-11-20 16:23:43 +01:00
|
|
|
|
- champs.reject { |c| c.type_champ == "explication" }.each do |c|
|
2017-07-11 16:50:29 +02:00
|
|
|
|
%tr
|
2017-11-20 16:23:43 +01:00
|
|
|
|
- case c.type_champ
|
|
|
|
|
- when "header_section"
|
2017-07-11 16:50:29 +02:00
|
|
|
|
%th.header-section{ colspan: 2 }
|
|
|
|
|
= c.libelle
|
2017-11-20 16:30:32 +01:00
|
|
|
|
- when "multiple_drop_down_list"
|
|
|
|
|
%th.libelle
|
|
|
|
|
= "#{c.libelle} :"
|
|
|
|
|
%td.rich-text
|
2017-11-21 10:01:29 +01:00
|
|
|
|
- if c.value.present?
|
|
|
|
|
%ul
|
|
|
|
|
- c.value.split(", ").each do |item|
|
|
|
|
|
%li
|
|
|
|
|
= item
|
2017-11-21 17:20:52 +01:00
|
|
|
|
- when "dossier_link"
|
|
|
|
|
%th.libelle
|
|
|
|
|
= "#{c.libelle} :"
|
|
|
|
|
%td.rich-text
|
|
|
|
|
- dossier = Dossier.includes(:procedure).find_by(id: c.value)
|
|
|
|
|
- if dossier
|
2017-12-12 16:44:30 +01:00
|
|
|
|
- path = dossier_linked_path(current_gestionnaire, dossier)
|
|
|
|
|
- if path.present?
|
|
|
|
|
= link_to("Dossier nº #{dossier.id}", path, target: '_blank')
|
|
|
|
|
- else
|
|
|
|
|
Dossier nº #{dossier.id}
|
2017-11-21 17:20:52 +01:00
|
|
|
|
%br
|
|
|
|
|
= dossier.text_summary
|
|
|
|
|
- else
|
|
|
|
|
Pas de dossier associé
|
2017-11-20 16:23:43 +01:00
|
|
|
|
- else
|
2017-10-16 17:37:19 +02:00
|
|
|
|
%th.libelle
|
2017-07-11 16:50:29 +02:00
|
|
|
|
= "#{c.libelle} :"
|
2017-10-25 15:37:59 +02:00
|
|
|
|
%td.rich-text
|
2017-10-13 14:54:38 +02:00
|
|
|
|
= sanitize(c.value)
|