Class: Spree::PageSections::ImageBanner
Constant Summary
collapse
- TOP_PADDING_DEFAULT =
0
- BOTTOM_PADDING_DEFAULT =
0
Spree::PageSection::BACKGROUND_COLOR_DEFAULT, Spree::PageSection::BORDER_COLOR_DEFAULT, Spree::PageSection::BOTTOM_BORDER_WIDTH_DEFAULT, Spree::PageSection::TEXT_COLOR_DEFAULT, Spree::PageSection::TOP_BORDER_WIDTH_DEFAULT
Instance Method Summary
collapse
#image_alt
#can_be_deleted?, #can_be_sorted?, #copy_rich_text_fields_from, #deep_clone, #deep_clone_links, #display_name, #dup, #lazy?, #lazy_path, #restore_design_settings_to_defaults, #rich_text_fields, role, #role, #theme, #to_partial_path
Instance Method Details
#available_blocks_to_add ⇒ Object
32
33
34
35
36
37
38
|
# File 'app/models/spree/page_sections/image_banner.rb', line 32
def available_blocks_to_add
[
Spree::PageBlocks::Buttons,
Spree::PageBlocks::Heading,
Spree::PageBlocks::Text
]
end
|
#blocks_available? ⇒ Boolean
40
41
42
|
# File 'app/models/spree/page_sections/image_banner.rb', line 40
def blocks_available?
true
end
|
#can_sort_blocks? ⇒ Boolean
44
45
46
|
# File 'app/models/spree/page_sections/image_banner.rb', line 44
def can_sort_blocks?
true
end
|
#default_blocks ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'app/models/spree/page_sections/image_banner.rb', line 14
def default_blocks
[
Spree::PageBlocks::Heading.new(
text: Spree.t('page_sections.image_banner.heading_default'),
preferred_text_alignment: 'center',
preferred_container_alignment: 'center',
preferred_width_desktop: 50
),
Spree::PageBlocks::Text.new(
text: Spree.t('page_sections.image_banner.text_default'),
preferred_text_alignment: 'center',
preferred_container_alignment: 'center',
preferred_width_desktop: 50
),
Spree::PageBlocks::Buttons.new
]
end
|
#icon_name ⇒ Object
48
49
50
|
# File 'app/models/spree/page_sections/image_banner.rb', line 48
def icon_name
'slideshow'
end
|