refactor(fork): feedback to user that a modification must be submitted

This commit is contained in:
Colin Darie 2023-04-27 11:35:18 +02:00
parent c35176703f
commit f135df0c74
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
3 changed files with 13 additions and 3 deletions

View file

@ -0,0 +1,5 @@
---
en:
changes_to_save: "modifications to submit"
modified_at: "modified on %{datetime}"
check_content_rebased: The type of this field or its description has been modified by the administration. Check its content.

View file

@ -0,0 +1,5 @@
---
fr:
changes_to_save: "modification à déposer"
modified_at: "modifié le %{datetime}"
check_content_rebased: Le type de ce champ ou sa description ont été modifiés par l'administration. Vérifier son contenu.

View file

@ -4,11 +4,11 @@
- if @champ.forked_with_changes? - if @champ.forked_with_changes?
%span.updated-at.highlighted %span.updated-at.highlighted
= @champ.updated_at > 1.minutes.ago ? "modifié à linstant" : "modification à déposer" = t('.changes_to_save')
- elsif @champ.updated_at.present? && @seen_at.present? - elsif @champ.updated_at.present? && @seen_at.present?
%span.updated-at{ class: highlight_if_unseen_class } %span.updated-at{ class: highlight_if_unseen_class }
= "modifié le #{try_format_datetime(@champ.updated_at)}" = t('.modified_at', datetime: try_format_datetime(@champ.updated_at))
- if @champ.rebased_at.present? && @champ.rebased_at > (@seen_at || @champ.updated_at) && current_user.owns_or_invite?(@champ.dossier) - if @champ.rebased_at.present? && @champ.rebased_at > (@seen_at || @champ.updated_at) && current_user.owns_or_invite?(@champ.dossier)
%span.updated-at.highlighted %span.updated-at.highlighted
Le type de ce champ ou sa description ont été modifiés par l'administration. Vérifier son contenu. = t('.check_content_rebased')