2022-04-25 12:40:16 +02:00
|
|
|
class ApplicationComponent < ViewComponent::Base
|
|
|
|
include ViewComponent::Translatable
|
2022-10-12 11:48:24 +02:00
|
|
|
include FlipperHelper
|
2022-06-16 14:56:53 +02:00
|
|
|
|
|
|
|
def class_names(class_names)
|
|
|
|
class_names.to_a.filter_map { |(class_name, flag)| class_name if flag }.join(' ')
|
|
|
|
end
|
2022-10-12 11:48:24 +02:00
|
|
|
|
|
|
|
def current_user
|
|
|
|
controller.current_user
|
|
|
|
end
|
2022-11-21 12:22:41 +01:00
|
|
|
|
|
|
|
def current_administrateur
|
|
|
|
controller.current_administrateur
|
|
|
|
end
|
2022-04-25 12:40:16 +02:00
|
|
|
end
|