Commit fe831dcd authored by Robert Speicher's avatar Robert Speicher

Move `spinner` helper into IconsHelper

Also updates it to use the new `icon` method.
parent 8633bbc9
...@@ -247,15 +247,6 @@ module ApplicationHelper ...@@ -247,15 +247,6 @@ module ApplicationHelper
Gitlab::MarkdownHelper.gitlab_markdown?(filename) Gitlab::MarkdownHelper.gitlab_markdown?(filename)
end end
def spinner(text = nil, visible = false)
css_class = 'loading'
css_class << ' hide' unless visible
content_tag :div, class: css_class do
content_tag(:i, nil, class: 'fa fa-spinner fa-spin') + text
end
end
def link_to(name = nil, options = nil, html_options = nil, &block) def link_to(name = nil, options = nil, html_options = nil, &block)
begin begin
uri = URI(options) uri = URI(options)
......
...@@ -8,6 +8,15 @@ module IconsHelper ...@@ -8,6 +8,15 @@ module IconsHelper
fa_icon(names, options) fa_icon(names, options)
end 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) def boolean_to_icon(value)
if value.to_s == "true" if value.to_s == "true"
icon('circle', class: 'cgreen') icon('circle', class: 'cgreen')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment