Class: Megatron::NavigationHelper::Nav
- Defined in:
- app/helpers/megatron/navigation_helper.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from Helper
Instance Method Details
#icon_label(text) ⇒ Object
23 24 25 |
# File 'app/helpers/megatron/navigation_helper.rb', line 23 def icon_label(text) content_tag(:span, class: 'icon_label') { text } end |
#item(text, href, options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/helpers/megatron/navigation_helper.rb', line 4 def item(text, href, = {}) [:class] = add_class([:class], "#{nav_class}-item") nav_icon = .delete(:icon) link_up href, do concat nav_icon(nav_icon) unless nav_icon.nil? concat ' ' if [:link_label] == false concat icon_label(text) else concat link_label(text) end end end |
#link_label(text) ⇒ Object
19 20 21 |
# File 'app/helpers/megatron/navigation_helper.rb', line 19 def link_label(text) content_tag(:span, class: 'link_label icon_label') { text } end |