Add highlights to all champs
This commit is contained in:
parent
20ea577a66
commit
004cdd4c43
1 changed files with 23 additions and 20 deletions
|
@ -10,35 +10,38 @@
|
||||||
%th.libelle
|
%th.libelle
|
||||||
= "#{c.libelle} :"
|
= "#{c.libelle} :"
|
||||||
%td.rich-text
|
%td.rich-text
|
||||||
- if c.to_s.present?
|
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
||||||
%ul
|
- if c.to_s.present?
|
||||||
- c.to_s.split(", ").each do |item|
|
%ul
|
||||||
%li
|
- c.to_s.split(", ").each do |item|
|
||||||
= item
|
%li
|
||||||
|
= item
|
||||||
- when TypeDeChamp.type_champs.fetch(:dossier_link)
|
- when TypeDeChamp.type_champs.fetch(:dossier_link)
|
||||||
%th.libelle
|
%th.libelle
|
||||||
= "#{c.libelle} :"
|
= "#{c.libelle} :"
|
||||||
%td.rich-text
|
%td.rich-text
|
||||||
- dossier = Dossier.includes(:procedure).find_by(id: c.to_s)
|
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
||||||
- if dossier
|
- dossier = Dossier.includes(:procedure).find_by(id: c.to_s)
|
||||||
- path = dossier_linked_path(current_gestionnaire, dossier)
|
- if dossier
|
||||||
- if path.present?
|
- path = dossier_linked_path(current_gestionnaire, dossier)
|
||||||
= link_to("Dossier nº #{dossier.id}", path, target: '_blank')
|
- if path.present?
|
||||||
|
= link_to("Dossier nº #{dossier.id}", path, target: '_blank')
|
||||||
|
- else
|
||||||
|
Dossier nº #{dossier.id}
|
||||||
|
%br
|
||||||
|
= sanitize(dossier.text_summary)
|
||||||
- else
|
- else
|
||||||
Dossier nº #{dossier.id}
|
Pas de dossier associé
|
||||||
%br
|
|
||||||
= sanitize(dossier.text_summary)
|
|
||||||
- else
|
|
||||||
Pas de dossier associé
|
|
||||||
- when TypeDeChamp.type_champs.fetch(:piece_justificative)
|
- when TypeDeChamp.type_champs.fetch(:piece_justificative)
|
||||||
%th.libelle
|
%th.libelle
|
||||||
= "#{c.libelle} :"
|
= "#{c.libelle} :"
|
||||||
%td.rich-text
|
%td.rich-text
|
||||||
- pj = c.piece_justificative_file
|
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
||||||
- if pj.attached?
|
- pj = c.piece_justificative_file
|
||||||
= render partial: "shared/champs/piece_justificative/pj_link", locals: { champ: c, user_can_upload: false }
|
- if pj.attached?
|
||||||
- else
|
= render partial: "shared/champs/piece_justificative/pj_link", locals: { champ: c, user_can_upload: false }
|
||||||
Pièce justificative non fournie
|
- else
|
||||||
|
Pièce justificative non fournie
|
||||||
- when TypeDeChamp.type_champs.fetch(:textarea)
|
- when TypeDeChamp.type_champs.fetch(:textarea)
|
||||||
%th.libelle
|
%th.libelle
|
||||||
= "#{c.libelle} :"
|
= "#{c.libelle} :"
|
||||||
|
|
Loading…
Reference in a new issue