jbox-web/redmine_bootstrap_kit

View on GitHub
app/helpers/bootstrap/dropdown_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Bootstrap::DropdownHelper

  def dropdown_menu(id, &block)
    content_tag(:div, id: id, class: 'dropdown dropdown-tip dropdown-relative') do
      content_tag(:ul, class: 'dropdown-menu') do
        yield block
      end
    end
  end


  def dropdown_button(target, opts = {})
    options = opts.merge({type: 'button', data: { dropdown: "##{target}" }})
    content = ' '.html_safe
    button_tag(content, options)
  end

end