EditableChamp: seen_at is optional

This commit is contained in:
simon lehericey 2018-02-21 17:17:11 +01:00
parent 990b8c09ce
commit 5aa9a5ac6c
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@
- if champ.mandatory?
%span.mandatory *
- if champ.updated_at.present?
- if champ.updated_at.present? && seen_at.present?
%span.updated-at{ class: highlight_if_unseen_class(seen_at, champ.updated_at) }
= "modifié le #{champ.updated_at.strftime('%d/%m/%Y à %H:%M')}"

View file

@ -1,6 +1,6 @@
.editable-champ
- if is_not_header_nor_explication?(champ)
= render partial: 'new_gestionnaire/dossiers/editable_champs/champ_label', locals: { form: form, champ: champ, seen_at: seen_at }
= render partial: 'new_gestionnaire/dossiers/editable_champs/champ_label', locals: { form: form, champ: champ, seen_at: defined?(seen_at) ? seen_at : nil }
= render partial: "new_gestionnaire/dossiers/editable_champs/#{champ.type_champ}",
locals: { champ: champ, form: form }