2022-12-08 09:44:29 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class NavigationMenuSiteSetting < EnumSiteSetting
|
|
|
|
SIDEBAR = "sidebar"
|
|
|
|
HEADER_DROPDOWN = "header dropdown"
|
|
|
|
LEGACY = "legacy"
|
|
|
|
|
|
|
|
def self.valid_value?(val)
|
|
|
|
values.any? { |v| v[:value] == val }
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.values
|
|
|
|
@values ||= [
|
|
|
|
{ name: "admin.navigation_menu.sidebar", value: SIDEBAR },
|
|
|
|
{ name: "admin.navigation_menu.header_dropdown", value: HEADER_DROPDOWN },
|
2023-01-09 20:20:10 +08:00
|
|
|
{ name: "admin.navigation_menu.legacy", value: LEGACY },
|
2022-12-08 09:44:29 +08:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.translate_names?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|