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-12-05 16:07:05 +01:00
|
|
|
|
%th.header-section{ colspan: 3 }
|
2017-07-11 16:50:29 +02:00
|
|
|
|
= 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
|
2018-01-20 15:19:43 +01:00
|
|
|
|
= sanitize(dossier.text_summary)
|
2017-11-21 17:20:52 +01:00
|
|
|
|
- else
|
|
|
|
|
Pas de dossier associé
|
2018-01-30 19:17:16 +01:00
|
|
|
|
- when "piece_justificative"
|
|
|
|
|
%th.libelle
|
|
|
|
|
= "#{c.libelle} :"
|
|
|
|
|
%td.rich-text
|
|
|
|
|
- pj = c.piece_justificative_file
|
2018-02-26 10:48:10 +01:00
|
|
|
|
- if pj.attached?
|
|
|
|
|
%a{ href: url_for(pj), target: '_blank' }
|
|
|
|
|
= pj.filename.to_s
|
|
|
|
|
- else
|
|
|
|
|
Pièce justificative non fournie
|
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-12-05 16:07:05 +01:00
|
|
|
|
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
|
|
|
|
= sanitize(c.value)
|
|
|
|
|
- if c.type_champ != "header_section"
|
|
|
|
|
%td.updated-at
|
|
|
|
|
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
|
|
|
|
modifié le
|
|
|
|
|
= c.updated_at.localtime.strftime("%d/%m/%Y à %H:%M")
|