diff options
author | jessib <jessib@riseup.net> | 2013-12-17 12:02:07 -0800 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2013-12-17 12:02:07 -0800 |
commit | 98a247acb4d1be484c2982d48ec038eed3de3d55 (patch) | |
tree | f176092fa43145b9d8ce00a180fab70cf62da456 /app/helpers/application_helper.rb | |
parent | 634db9875cc8f6f6b9a4a83dfc6b8d53728eb2b5 (diff) | |
parent | 83cd3d95b78b6df9ac33a8ee169e570f4d3e2eeb (diff) |
Merge branch 'develop' into feature/billing-no-authenticated-payments
Conflicts:
billing/config/locales/en.yml
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1e79990..90e649a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -19,18 +19,25 @@ module ApplicationHelper # http://twitter.github.io/bootstrap/base-css.html#icons # def icon(name, color=nil) + "<i class=\"icon-#{name} #{color_class(color)}\"></i> ".html_safe + end + + def big_icon(name, color=nil) + "<i class=\"big-icon-#{name} #{color_class(color)}\"></i> ".html_safe + end + + def huge_icon(name, color=nil) + "<i class=\"huge-icon-#{name} #{color_class(color)}\"></i> ".html_safe + end + + def color_class(color) if color.nil? - color_class = nil + nil elsif color == :black - color_class = 'icon-black' + 'icon-black' elsif color == :white - color_class = 'icon-white' + 'icon-white' end - "<i class=\"icon-#{name} #{color_class}\"></i> ".html_safe - end - - def big_icon(name, color=nil) - "<i class=\"big-icon-#{name}\"></i> ".html_safe end def format_flash(msg) |