2017-10-16 17:37:19 +02:00
|
|
|
|
%table.table.vertical.dossier-champs
|
2017-07-11 16:50:29 +02:00
|
|
|
|
%tbody
|
2018-08-28 16:22:34 +02:00
|
|
|
|
- champs.reject { |c| c.type_champ == TypeDeChamp.type_champs.fetch(: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
|
2018-08-28 16:22:34 +02:00
|
|
|
|
- when TypeDeChamp.type_champs.fetch(: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
|
2018-08-28 16:22:34 +02:00
|
|
|
|
- when TypeDeChamp.type_champs.fetch(:multiple_drop_down_list)
|
2017-11-20 16:30:32 +01:00
|
|
|
|
%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
|
2018-08-28 16:22:34 +02:00
|
|
|
|
- when TypeDeChamp.type_champs.fetch(:linked_drop_down_list)
|
2018-06-22 09:42:14 +02:00
|
|
|
|
%th.libelle
|
|
|
|
|
= "#{c.libelle} :"
|
|
|
|
|
%td= c.for_display
|
2018-08-28 16:22:34 +02:00
|
|
|
|
- when TypeDeChamp.type_champs.fetch(:dossier_link)
|
2017-11-21 17:20:52 +01:00
|
|
|
|
%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-08-28 16:22:34 +02:00
|
|
|
|
- when TypeDeChamp.type_champs.fetch(:piece_justificative)
|
2018-01-30 19:17:16 +01:00
|
|
|
|
%th.libelle
|
|
|
|
|
= "#{c.libelle} :"
|
|
|
|
|
%td.rich-text
|
|
|
|
|
- pj = c.piece_justificative_file
|
2018-02-26 10:48:10 +01:00
|
|
|
|
- if pj.attached?
|
2018-05-11 14:59:20 +02:00
|
|
|
|
= render partial: "shared/champs/piece_justificative/pj_link", locals: { champ: c, user_can_upload: false }
|
2018-02-26 10:48:10 +01:00
|
|
|
|
- else
|
|
|
|
|
Pièce justificative non fournie
|
2018-08-28 16:22:34 +02:00
|
|
|
|
- when TypeDeChamp.type_champs.fetch(:textarea)
|
2018-03-15 10:55:10 +01:00
|
|
|
|
%th.libelle
|
|
|
|
|
= "#{c.libelle} :"
|
|
|
|
|
%td.rich-text
|
|
|
|
|
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
|
|
|
|
= simple_format(c.value)
|
2018-08-28 16:22:34 +02:00
|
|
|
|
- when TypeDeChamp.type_champs.fetch(:siret)
|
2018-04-05 18:54:33 +02:00
|
|
|
|
%th.libelle
|
|
|
|
|
= "#{c.libelle} :"
|
|
|
|
|
%td.rich-text
|
|
|
|
|
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
2018-05-30 15:03:44 +02:00
|
|
|
|
- if c.etablissement.present?
|
2018-10-17 12:12:32 +02:00
|
|
|
|
= render partial: "shared/dossiers/identite_entreprise", locals: { etablissement: c.etablissement, profile: profile }
|
2018-10-17 12:06:27 +02:00
|
|
|
|
- when TypeDeChamp.type_champs.fetch(:carte)
|
|
|
|
|
%th.libelle
|
|
|
|
|
= "#{c.libelle} :"
|
|
|
|
|
%td.rich-text
|
|
|
|
|
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
|
|
|
|
- if c.value.present?
|
|
|
|
|
= render partial: "shared/champs/carte/show", locals: { champ: c }
|
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)
|
2018-08-28 16:22:34 +02:00
|
|
|
|
- if c.type_champ != TypeDeChamp.type_champs.fetch(:header_section)
|
2017-12-05 16:07:05 +01:00
|
|
|
|
%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")
|