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
|
||||
= "#{c.libelle} :"
|
||||
%td.rich-text
|
||||
- if c.to_s.present?
|
||||
%ul
|
||||
- c.to_s.split(", ").each do |item|
|
||||
%li
|
||||
= item
|
||||
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
||||
- if c.to_s.present?
|
||||
%ul
|
||||
- c.to_s.split(", ").each do |item|
|
||||
%li
|
||||
= item
|
||||
- when TypeDeChamp.type_champs.fetch(:dossier_link)
|
||||
%th.libelle
|
||||
= "#{c.libelle} :"
|
||||
%td.rich-text
|
||||
- dossier = Dossier.includes(:procedure).find_by(id: c.to_s)
|
||||
- if dossier
|
||||
- path = dossier_linked_path(current_gestionnaire, dossier)
|
||||
- if path.present?
|
||||
= link_to("Dossier nº #{dossier.id}", path, target: '_blank')
|
||||
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
||||
- dossier = Dossier.includes(:procedure).find_by(id: c.to_s)
|
||||
- if dossier
|
||||
- path = dossier_linked_path(current_gestionnaire, dossier)
|
||||
- if path.present?
|
||||
= link_to("Dossier nº #{dossier.id}", path, target: '_blank')
|
||||
- else
|
||||
Dossier nº #{dossier.id}
|
||||
%br
|
||||
= sanitize(dossier.text_summary)
|
||||
- else
|
||||
Dossier nº #{dossier.id}
|
||||
%br
|
||||
= sanitize(dossier.text_summary)
|
||||
- else
|
||||
Pas de dossier associé
|
||||
Pas de dossier associé
|
||||
- when TypeDeChamp.type_champs.fetch(:piece_justificative)
|
||||
%th.libelle
|
||||
= "#{c.libelle} :"
|
||||
%td.rich-text
|
||||
- pj = c.piece_justificative_file
|
||||
- if pj.attached?
|
||||
= render partial: "shared/champs/piece_justificative/pj_link", locals: { champ: c, user_can_upload: false }
|
||||
- else
|
||||
Pièce justificative non fournie
|
||||
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
||||
- pj = c.piece_justificative_file
|
||||
- if pj.attached?
|
||||
= render partial: "shared/champs/piece_justificative/pj_link", locals: { champ: c, user_can_upload: false }
|
||||
- else
|
||||
Pièce justificative non fournie
|
||||
- when TypeDeChamp.type_champs.fetch(:textarea)
|
||||
%th.libelle
|
||||
= "#{c.libelle} :"
|
||||
|
|
Loading…
Reference in a new issue