Module: PhantomHelpers::ViewHelpers::HtmlHelper
- Defined in:
- lib/phantom_helpers/view_helpers/html_helper.rb
Instance Method Summary collapse
- #hr ⇒ Object
- #index_body(&block) ⇒ Object
- #index_header(&block) ⇒ Object
- #panel_div(color = 'default', title = nil, footer = nil, &block) ⇒ Object
- #well_div(&block) ⇒ Object
Instance Method Details
#hr ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/phantom_helpers/view_helpers/html_helper.rb', line 5 def hr content_tag :div, class: "row" do content_tag :div, class: "col-md-12" do content_tag :hr end end end |
#index_body(&block) ⇒ Object
49 50 51 52 53 54 55 |
# File 'lib/phantom_helpers/view_helpers/html_helper.rb', line 49 def index_body(&block) content_tag :div, class: "row" do content_tag :div, class: "col-md-12" do block.call end end end |
#index_header(&block) ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/phantom_helpers/view_helpers/html_helper.rb', line 57 def index_header(&block) content_tag :div, class: "row" do content_tag :div, class: "col-md-12" do block.call end end end |
#panel_div(color = 'default', title = nil, footer = nil, &block) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/phantom_helpers/view_helpers/html_helper.rb', line 23 def panel_div(color = 'default', title = nil, = nil, &block) content_tag :div, class: "row" do content_tag :div, class: "col-md-12" do content_tag :div, class: "panel panel-#{color}" do [ if title content_tag :div, class: "panel-heading" do content_tag :h3, class: "panel-title" do title end end end, content_tag(:div, class: "panel-body") do block.call end, if content_tag :div, class: "panel-footer" do end end ].join.html_safe end end end end |
#well_div(&block) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/phantom_helpers/view_helpers/html_helper.rb', line 13 def well_div(&block) content_tag :div, class: "row" do content_tag :div, class: "col-md-12" do content_tag :div, class: "well" do block.call end end end end |