diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-01-28 03:30:27 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-01-28 03:37:44 -0500 |
commit | fe831dcd6f4af535abba1a9dc350c4d8a0f809e9 (patch) | |
tree | d1633e058a956cb91f7d47c7ef6954affec9cfce /app/helpers/icons_helper.rb | |
parent | 8633bbc9b852d8809f20db86a3cdfa2cd3b8dd95 (diff) | |
download | gitlab-ce-fe831dcd6f4af535abba1a9dc350c4d8a0f809e9.tar.gz |
Move `spinner` helper into IconsHelper
Also updates it to use the new `icon` method.
Diffstat (limited to 'app/helpers/icons_helper.rb')
-rw-r--r-- | app/helpers/icons_helper.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index 61c03d90072..18260f0ed4d 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -8,6 +8,15 @@ module IconsHelper fa_icon(names, options) end + def spinner(text = nil, visible = false) + css_class = 'loading' + css_class << ' hide' unless visible + + content_tag :div, class: css_class do + icon('spinner spin') + text + end + end + def boolean_to_icon(value) if value.to_s == "true" icon('circle', class: 'cgreen') |