2018-08-18 07:19:57 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-02-12 23:31:55 -05:00
|
|
|
module VersionCheckHelper
|
|
|
|
def version_status_badge
|
2018-09-07 10:32:28 -04:00
|
|
|
return unless Rails.env.production?
|
|
|
|
return unless Gitlab::CurrentSettings.version_check_enabled
|
|
|
|
return if User.single_user&.requires_usage_stats_consent?
|
|
|
|
|
|
|
|
image_url = VersionCheck.new.url
|
|
|
|
image_tag image_url, class: 'js-version-status-badge'
|
2015-02-12 23:31:55 -05:00
|
|
|
end
|
|
|
|
end
|