Class: Decidim::DecidimAwesome::ContentBlocks::LandingMenuCell
- Inherits:
-
ContentBlocks::BaseCell
- Object
- ContentBlocks::BaseCell
- Decidim::DecidimAwesome::ContentBlocks::LandingMenuCell
- Defined in:
- app/cells/decidim/decidim_awesome/content_blocks/landing_menu_cell.rb
Instance Method Summary collapse
- #alignment ⇒ Object
- #block_id ⇒ Object
- #i18n_scope ⇒ Object
- #menu_items ⇒ Object
- #show ⇒ Object
- #show_on_mobile? ⇒ Boolean
- #sticky? ⇒ Boolean
Instance Method Details
#alignment ⇒ Object
21 22 23 |
# File 'app/cells/decidim/decidim_awesome/content_blocks/landing_menu_cell.rb', line 21 def alignment model.settings.alignment.presence || "center" end |
#block_id ⇒ Object
29 30 31 |
# File 'app/cells/decidim/decidim_awesome/content_blocks/landing_menu_cell.rb', line 29 def block_id "awesome-landing-menu-#{model.id}" end |
#i18n_scope ⇒ Object
33 34 35 |
# File 'app/cells/decidim/decidim_awesome/content_blocks/landing_menu_cell.rb', line 33 def i18n_scope "decidim.decidim_awesome.content_blocks.landing_menu" end |
#menu_items ⇒ Object
13 14 15 |
# File 'app/cells/decidim/decidim_awesome/content_blocks/landing_menu_cell.rb', line 13 def @menu_items ||= (model.settings.).select { |item| item[:visible] } end |
#show ⇒ Object
7 8 9 10 11 |
# File 'app/cells/decidim/decidim_awesome/content_blocks/landing_menu_cell.rb', line 7 def show return if .empty? render end |
#show_on_mobile? ⇒ Boolean
25 26 27 |
# File 'app/cells/decidim/decidim_awesome/content_blocks/landing_menu_cell.rb', line 25 def show_on_mobile? model.settings.show_on_mobile end |
#sticky? ⇒ Boolean
17 18 19 |
# File 'app/cells/decidim/decidim_awesome/content_blocks/landing_menu_cell.rb', line 17 def sticky? model.settings.sticky end |