module Interage::BootstrapHelper

Public Instance Methods

bootstrap_alert(type, message) click to toggle source
# File lib/interage/bootstrap_helper.rb, line 5
def bootstrap_alert(type, message)
  icon = t("bootstrap.alert.icons.#{type}", default: type)

  content_tag :div, class: "no-margin alert alert-#{type}" do
    app_icon_text(icon, message)
  end
end
bootstrap_alert_danger(message) click to toggle source
# File lib/interage/bootstrap_helper.rb, line 29
def bootstrap_alert_danger(message)
  bootstrap_alert(:danger, message)
end
bootstrap_alert_default(message) click to toggle source
# File lib/interage/bootstrap_helper.rb, line 13
def bootstrap_alert_default(message)
  bootstrap_alert(:default, message)
end
bootstrap_alert_info(message) click to toggle source
# File lib/interage/bootstrap_helper.rb, line 17
def bootstrap_alert_info(message)
  bootstrap_alert(:info, message)
end
bootstrap_alert_not_found(gender, model) click to toggle source
# File lib/interage/bootstrap_helper.rb, line 33
def bootstrap_alert_not_found(gender, model)
  bootstrap_alert_info(text_not_found(gender, model))
end
bootstrap_alert_not_found_female(model) click to toggle source
# File lib/interage/bootstrap_helper.rb, line 41
def bootstrap_alert_not_found_female(model)
  bootstrap_alert_not_found(:female, model)
end
bootstrap_alert_not_found_male(model) click to toggle source
# File lib/interage/bootstrap_helper.rb, line 37
def bootstrap_alert_not_found_male(model)
  bootstrap_alert_not_found(:male, model)
end
bootstrap_alert_success(message) click to toggle source
# File lib/interage/bootstrap_helper.rb, line 25
def bootstrap_alert_success(message)
  bootstrap_alert(:success, message)
end
bootstrap_alert_warning(message) click to toggle source
# File lib/interage/bootstrap_helper.rb, line 21
def bootstrap_alert_warning(message)
  bootstrap_alert(:warning, message)
end
text_not_found(gender, model) click to toggle source
# File lib/interage/bootstrap_helper.rb, line 45
def text_not_found(gender, model)
  default_not_found = t('bootstrap.alert.not_found', default: '')

  t("bootstrap.alert.#{gender}.not_found", model: tm(model).downcase,
                                           default: default_not_found)
end
text_not_found_female(model) click to toggle source
# File lib/interage/bootstrap_helper.rb, line 56
def text_not_found_female(model)
  text_not_found(:female, model)
end
text_not_found_male(model) click to toggle source
# File lib/interage/bootstrap_helper.rb, line 52
def text_not_found_male(model)
  text_not_found(:male, model)
end