Class: Spree::BackendConfiguration
- Inherits:
-
Preferences::Configuration
- Object
- Preferences::Configuration
- Spree::BackendConfiguration
- Defined in:
- lib/spree/backend_configuration.rb,
lib/spree/backend_configuration/menu_item.rb
Defined Under Namespace
Classes: MenuItem
Instance Attribute Summary collapse
-
#admin_updated_navbar ⇒ Boolean
Should the updated navbar be used in admin (default:
false
). -
#menu_items ⇒ Array<Spree::BackendConfiguration::MenuItem>
Return the menu items which should be drawn in the menu.
-
#prefer_menu_item_partials ⇒ Boolean
Whether or not to prefer menu item partials when both a partial and children are present.
-
#theme ⇒ String
Default admin theme name.
-
#themes ⇒ Hash
A hash containing the themes that are available for the admin panel.
Instance Method Summary collapse
Instance Attribute Details
#admin_updated_navbar ⇒ Boolean
Returns Should the updated navbar be used in admin (default: false
).
28 |
# File 'lib/spree/backend_configuration.rb', line 28 versioned_preference :admin_updated_navbar, :boolean, initial_value: false, boundaries: { "4.2.0" => true } |
#menu_items ⇒ Array<Spree::BackendConfiguration::MenuItem>
Return the menu items which should be drawn in the menu
66 |
# File 'lib/spree/backend_configuration.rb', line 66 attr_writer :menu_items |
#prefer_menu_item_partials ⇒ Boolean
Returns Whether or not to prefer menu item partials when both a partial and children are present.
42 |
# File 'lib/spree/backend_configuration.rb', line 42 versioned_preference :prefer_menu_item_partials, :boolean, initial_value: true, boundaries: { "4.2.0" => false } |
#theme ⇒ String
Returns Default admin theme name.
19 |
# File 'lib/spree/backend_configuration.rb', line 19 versioned_preference :theme, :string, initial_value: 'classic', boundaries: { "4.2.0" => "solidus_admin" } |
#themes ⇒ Hash
Returns A hash containing the themes that are available for the admin panel.
12 13 14 15 |
# File 'lib/spree/backend_configuration.rb', line 12 preference :themes, :hash, default: { classic: 'spree/backend/all', solidus_admin: 'spree/backend/themes/solidus_admin' } |
Instance Method Details
#theme_path(user_theme = nil) ⇒ Object
21 22 23 |
# File 'lib/spree/backend_configuration.rb', line 21 def theme_path(user_theme = nil) user_theme ? themes.fetch(user_theme.to_sym) : themes.fetch(theme.to_sym) end |