Module: Gaku::AdminHelper
Instance Method Summary
collapse
#can_edit?, #disabled?, #genders, #render_flash, #state_load
#preset_checked?
Instance Method Details
#badge_count(count, text, css_class) ⇒ Object
18
19
20
21
22
23
24
|
# File 'app/helpers/gaku/admin_helper.rb', line 18
def badge_count(count, text, css_class)
if count != 0
"#{text}<span class='badge pull-right #{css_class}'>#{count}</span>".html_safe
else
"#{text}<span class='badge pull-right #{css_class}'></span>".html_safe
end
end
|
#grading_methods_with_i18n ⇒ Object
11
12
13
14
15
16
|
# File 'app/helpers/gaku/admin_helper.rb', line 11
def grading_methods_with_i18n
Hash[*Gaku::GradingMethod::Types.map do |k|
[I18n.t("grading_method.#{k}"), k.to_s]
end.flatten]
end
|
7
8
9
|
# File 'app/helpers/gaku/admin_helper.rb', line 7
def (text)
content_tag :h4, text
end
|