From 214a23932751973b1a3d6c3bca49853897183355 Mon Sep 17 00:00:00 2001 From: pabois <pierreandre.boissinot@noesya.coop> Date: Fri, 9 Feb 2024 19:06:31 +0100 Subject: [PATCH] fix cc --- app/services/filters/server/websites.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/services/filters/server/websites.rb b/app/services/filters/server/websites.rb index ffc0ca85f..45062805f 100644 --- a/app/services/filters/server/websites.rb +++ b/app/services/filters/server/websites.rb @@ -3,6 +3,14 @@ module Filters def initialize(user) super add_search + add_for_theme_version + add_for_update + add_for_updatable_theme + end + + private + + def add_for_theme_version add :for_theme_version, ::Communication::Website.all.pluck(:theme_version).uniq.sort, I18n.t( @@ -18,6 +26,9 @@ module Filters 'filters.attributes.element', element: I18n.t('server_admin.websites.production_status').downcase ) + end + + def add_for_update add :for_update, [ { to_s: I18n.t('server_admin.websites.autoupdate_theme.true'), id: 'true' }, @@ -27,6 +38,9 @@ module Filters 'filters.attributes.element', element: I18n.t('server_admin.websites.update_mode').downcase ) + end + + def add_for_updatable_theme add :for_updatable_theme, [ { to_s: I18n.t('server_admin.websites.updatable_theme_filter.value'), id: 'true' } @@ -35,7 +49,7 @@ module Filters 'filters.attributes.element', element: I18n.t('server_admin.websites.updatable_theme_filter.element').downcase ) - end + end end -- GitLab