summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-09-23 16:26:15 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-09-23 16:28:51 -0400
commitbe142e6bd687d223dd4a543295d18676f408b7e3 (patch)
tree3b85972eadbe88aecff9237b73757ce78d5e9de8 /app
parent48cfad9013f1aa4745bf2b07bfd07e34724ba037 (diff)
downloadgitlab-ce-be142e6bd687d223dd4a543295d18676f408b7e3.tar.gz
Move the `version_check_enabled` check from view to helper
Diffstat (limited to 'app')
-rw-r--r--app/helpers/version_check_helper.rb2
-rw-r--r--app/views/help/index.html.haml3
2 files changed, 2 insertions, 3 deletions
diff --git a/app/helpers/version_check_helper.rb b/app/helpers/version_check_helper.rb
index f64d730b448..a674564c4ec 100644
--- a/app/helpers/version_check_helper.rb
+++ b/app/helpers/version_check_helper.rb
@@ -1,6 +1,6 @@
module VersionCheckHelper
def version_status_badge
- if Rails.env.production?
+ if Rails.env.production? && current_application_settings.version_check_enabled
image_tag VersionCheck.new.url
end
end
diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml
index abffabfc41d..2333e6fdf1d 100644
--- a/app/views/help/index.html.haml
+++ b/app/views/help/index.html.haml
@@ -5,8 +5,7 @@
- if current_user && current_user.admin?
%span= Gitlab::VERSION
%small= Gitlab::REVISION
- - if current_application_settings.version_check_enabled
- = version_status_badge
+ = version_status_badge
%p.slead
GitLab is open source software to collaborate on code.
%br