module Interage::BootstrapAlertHelper

Public Instance Methods

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

  tag.div class: "alert alert-#{type} m-0" do
    concat app_icon(icon)
    concat tag.b(" #{subtitles}: ") if subtitles.present?
    concat message
  end
end
Also aliased as: bs_alert
bootstrap_alert_danger(message) click to toggle source
# File lib/interage/bootstrap_alert_helper.rb, line 37
def bootstrap_alert_danger(message)
  bs_alert(:danger, message)
end
Also aliased as: bs_alert_danger
bootstrap_alert_default(message) click to toggle source
# File lib/interage/bootstrap_alert_helper.rb, line 17
def bootstrap_alert_default(message)
  bs_alert(:default, message)
end
Also aliased as: bs_alert_default
bootstrap_alert_info(message) click to toggle source
# File lib/interage/bootstrap_alert_helper.rb, line 22
def bootstrap_alert_info(message)
  bs_alert(:info, message)
end
Also aliased as: bs_alert_info
bootstrap_alert_not_found(gender, model) click to toggle source
# File lib/interage/bootstrap_alert_helper.rb, line 42
def bootstrap_alert_not_found(gender, model)
  bs_alert_info(text404(gender, model))
end
Also aliased as: bs_text404
bootstrap_alert_not_found_female(model) click to toggle source
# File lib/interage/bootstrap_alert_helper.rb, line 52
def bootstrap_alert_not_found_female(model)
  bs_text404(:female, model)
end
Also aliased as: bs_female404
bootstrap_alert_not_found_male(model) click to toggle source
# File lib/interage/bootstrap_alert_helper.rb, line 47
def bootstrap_alert_not_found_male(model)
  bs_text404(:male, model)
end
Also aliased as: bs_male404
bootstrap_alert_success(message) click to toggle source
# File lib/interage/bootstrap_alert_helper.rb, line 32
def bootstrap_alert_success(message)
  bs_alert(:success, message)
end
Also aliased as: bs_alert_success
bootstrap_alert_warning(message) click to toggle source
# File lib/interage/bootstrap_alert_helper.rb, line 27
def bootstrap_alert_warning(message)
  bs_alert(:warning, message)
end
Also aliased as: bs_alert_warning
bs_alert(type, message)
Alias for: bootstrap_alert
bs_alert_danger(message)
bs_alert_default(message)
bs_alert_info(message)
bs_alert_success(message)
bs_alert_warning(message)
bs_female404(model)
bs_male404(model)
bs_text404(gender, model)
default404()
Alias for: default_not_found
default_not_found() click to toggle source
# File lib/interage/bootstrap_alert_helper.rb, line 64
def default_not_found
  t('bootstrap.alert.not_found', default: '')
end
Also aliased as: default404
female404(model)
male404(model)
Alias for: text_not_found_male
text404(gender, model)
Alias for: text_not_found
text_not_found(gender, model) click to toggle source
# File lib/interage/bootstrap_alert_helper.rb, line 57
def text_not_found(gender, model)
  attributes = { model: tm(model).downcase, default: default404 }

  t("bootstrap.alert.#{gender}.not_found", **attributes)
end
Also aliased as: text404
text_not_found_female(model) click to toggle source
# File lib/interage/bootstrap_alert_helper.rb, line 74
def text_not_found_female(model)
  text404(:female, model)
end
Also aliased as: female404
text_not_found_male(model) click to toggle source
# File lib/interage/bootstrap_alert_helper.rb, line 69
def text_not_found_male(model)
  text404(:male, model)
end
Also aliased as: male404