diff --git a/app/components/application_component.rb b/app/components/application_component.rb index aa9c5eb56..8d88db6c2 100644 --- a/app/components/application_component.rb +++ b/app/components/application_component.rb @@ -1,7 +1,12 @@ class ApplicationComponent < ViewComponent::Base include ViewComponent::Translatable + include FlipperHelper def class_names(class_names) class_names.to_a.filter_map { |(class_name, flag)| class_name if flag }.join(' ') end + + def current_user + controller.current_user + end end diff --git a/app/components/editable_champ/champ_label_content_component/champ_label_content_component.html.haml b/app/components/editable_champ/champ_label_content_component/champ_label_content_component.html.haml index 9ac355378..81c5df6c8 100644 --- a/app/components/editable_champ/champ_label_content_component/champ_label_content_component.html.haml +++ b/app/components/editable_champ/champ_label_content_component/champ_label_content_component.html.haml @@ -6,6 +6,6 @@ %span.updated-at{ class: highlight_if_unseen_class } = "modifié le #{try_format_datetime(@champ.updated_at)}" -- if @champ.rebased_at.present? && @champ.rebased_at > (@seen_at || @champ.updated_at) && controller.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 Le type de ce @champ où sa description a été modifiée par l'administration. Vérifier son contenu.