def panel(title, options = { }, &block)
      options = {
          type: 'primary',
          size: 6,
          offset: 3,
          open_body: true
      }.merge(options || {})

      options[:type] = options[:type].to_s.downcase
      options[:type] = 'primary' unless %w(primary success info warning danger).include?(options[:type])
      options[:size] = 6 unless (1..12).include?(options[:size])
      options[:offset] = 3 unless (0..12).include?(options[:offset])

      ret = "<div class=\"col-md-#{options[:size]} col-md-offset-#{options[:offset]}\"><div class=\"panel panel-#{options[:type]}\"><div class=\"panel-heading\"><h4 class=\"panel-title\">#{h title}</h4></div>"
      ret += '<div class="panel-body">' if options[:open_body]

      if block_given?
        content = capture { block.call }
        content = CGI::escape_html(content) unless content.html_safe?
        ret += content
      end

      ret += '</div>' if options[:open_body]
      ret += '</div></div>'

      ret.html_safe
    end
def panel(title, options = { }, &block)
      options = {
          type: 'primary',
          size: 6,
          offset: 3,
          open_body: true
      }.merge(options || {})

      options[:type] = options[:type].to_s.downcase
      options[:type] = 'primary' unless %w(primary success info warning danger).include?(options[:type])
      options[:size] = 6 unless (1..12).include?(options[:size])
      options[:offset] = 3 unless (0..12).include?(options[:offset])

      ret = "<div class=\"col-md-#{options[:size]} col-md-offset-#{options[:offset]}\"><div class=\"panel panel-#{options[:type]}\"><div class=\"panel-heading\"><h4 class=\"panel-title\">#{h title}</h4></div>"
      ret += '<div class="panel-body">' if options[:open_body]

      if block_given?
        content = capture { block.call }
        content = CGI::escape_html(content) unless content.html_safe?
        ret += content
      end

      ret += '</div>' if options[:open_body]
      ret += '</div></div>'

      ret.html_safe
    end
Creates a panel with the specified title.

 Valid options:
 type::
     Type can be :primary, :success, :info, :warning, or :danger.  Default value is :primary.
 size::
     Size can be any value from 1 through 12.  Default value is 6.
 offset::
     Offset can be any value from 1 through 12.  Default value is 3.
     Common sense is required, for instance you would likely never use an offset of 12, but it is available.
     Likewise an offset of 8 with a size of 8 would usually have the same effect as an offset of 12 because
     there are only 12 columns to fit your 8 column wide panel in.
 open_body::
     This can be true or false.  Default value is true.
     If true, the body division is opened (and closed) by this helper.
     If false, then the panel is opened and closed, but the body division is not created.
     This allows you to add tables and divisions as you see fit.

 Provide a block to render content within the panel.