Module: Trestle::PanelHelper
- Defined in:
- app/helpers/trestle/panel_helper.rb
Instance Method Summary collapse
Instance Method Details
#panel(options = {}, &block) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/helpers/trestle/panel_helper.rb', line 3 def panel(={}, &block) html_class = .fetch(:class) { "panel-default" } content_tag(:div, class: ["panel", html_class]) do if [:title] concat content_tag(:div, [:title], class: "panel-heading") end concat content_tag(:div, class: "panel-body", &block) if [:footer] concat content_tag(:div, [:footer], class: "panel-footer") end end end |
#well(options = {}, &block) ⇒ Object
19 20 21 22 |
# File 'app/helpers/trestle/panel_helper.rb', line 19 def well(={}, &block) html_class = ["well", [:class]].compact content_tag(:div, .merge(class: html_class), &block) end |