diff --git a/app/services/filters/server/websites.rb b/app/services/filters/server/websites.rb index ffc0ca85fae8c86121195b1ca634cfa7e0c47975..45062805f5ce5a1b319a5f1ad43553d0ef0086bb 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