module Shikigami::ViewHelpers

Public Instance Methods

bootstrap_button(action, path, options = {}) click to toggle source
# File lib/shikigami/view_helpers.rb, line 13
def bootstrap_button(action, path, options = {})
  button = Shikigami::BootstrapButton.new(action, options)
  link_to t("actions.#{action}"), path, button.options
end
Also aliased as: bs_btn
bootstrap_dropdown_toggle(title) click to toggle source
# File lib/shikigami/view_helpers.rb, line 5
def bootstrap_dropdown_toggle(title)
  content_tag :a, bootstrap_dropdown_toggle_hash do
    concat title
    concat content_tag :span, nil, class: "caret"
  end
end
Also aliased as: bs_dd_toggle
bs_btn(action, path, options = {})
Alias for: bootstrap_button
bs_dd_toggle(title)
no_data_alert(message = t("warnings.no_data")) click to toggle source
# File lib/shikigami/view_helpers.rb, line 19
def no_data_alert(message = t("warnings.no_data"))
  content_tag :div, message, class: "alert alert-warning"
end

Private Instance Methods

bootstrap_dropdown_toggle_hash() click to toggle source
# File lib/shikigami/view_helpers.rb, line 25
def bootstrap_dropdown_toggle_hash
  {
    "class": "dropdown-toggle",
    "data-toggle": "dropdown",
    "role": "button",
    "aria-haspopup": "true",
    "aria-expanded": "false",
  }
end