diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-05-08 16:05:00 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-05-08 16:05:00 +0300 |
commit | c3cf32e863b47d98d6e1d2d3ed78745ddf2ccb79 (patch) | |
tree | ee9eaaeabf247a882701100e5dbac36120c80a8a /app | |
parent | 6c32abc5f7f090d4932054e5cc1ff0594edd5ff1 (diff) | |
parent | edf0a0715b56a50fd1ac8ac505333f7e6fa4384c (diff) |
Merge branch 'version-check' into gl-version-check
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Conflicts:
app/controllers/admin/application_settings_controller.rb
app/views/admin/application_settings/_form.html.haml
db/schema.rb
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admin/application_settings_controller.rb | 1 | ||||
-rw-r--r-- | app/helpers/version_check_helper.rb | 5 | ||||
-rw-r--r-- | app/views/admin/application_settings/_form.html.haml | 6 | ||||
-rw-r--r-- | app/views/admin/dashboard/index.html.haml | 7 | ||||
-rw-r--r-- | app/views/help/index.html.haml | 2 |
5 files changed, 20 insertions, 1 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 3975e30835e..03fd12e9ecd 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -43,6 +43,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController :default_snippet_visibility, :restricted_signup_domains_raw, restricted_visibility_levels: [], + :version_check_enabled ) end end diff --git a/app/helpers/version_check_helper.rb b/app/helpers/version_check_helper.rb new file mode 100644 index 00000000000..63d8eaeb2bd --- /dev/null +++ b/app/helpers/version_check_helper.rb @@ -0,0 +1,5 @@ +module VersionCheckHelper + def version_status_badge + image_tag VersionCheck.new.url + end +end diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml index b9d7e8b4586..4ceae814805 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -32,6 +32,12 @@ = f.check_box :twitter_sharing_enabled, :'aria-describedby' => 'twitter_help_block' %strong Twitter enabled %span.help-block#twitter_help_block Show users a button to share their newly created public or internal projects on twitter + .form-group + .col-sm-offset-2.col-sm-10 + .checkbox + = f.label :version_check_enabled do + = f.check_box :version_check_enabled + Version check enabled %fieldset %legend Misc .form-group diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index d1c586328a2..3732ff847b9 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -56,7 +56,12 @@ %span.light.pull-right = boolean_to_icon Gitlab.config.omniauth.enabled .col-md-4 - %h4 Components + %h4 + Components + - if current_application_settings.version_check_enabled + .pull-right + = version_status_badge + %hr %p GitLab diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml index af39dfeac5b..bf4b7234b21 100644 --- a/app/views/help/index.html.haml +++ b/app/views/help/index.html.haml @@ -3,6 +3,8 @@ GitLab %span= Gitlab::VERSION %small= Gitlab::REVISION + - if current_application_settings.version_check_enabled + = version_status_badge %p.slead GitLab is open source software to collaborate on code. %br |