Commit 100d750b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add feature to disable version check

parent 73179685
...@@ -28,7 +28,8 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController ...@@ -28,7 +28,8 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
:gravatar_enabled, :gravatar_enabled,
:twitter_sharing_enabled, :twitter_sharing_enabled,
:sign_in_text, :sign_in_text,
:home_page_url :home_page_url,
:version_check_enabled
) )
end end
end end
...@@ -24,6 +24,12 @@ ...@@ -24,6 +24,12 @@
.col-sm-10 .col-sm-10
= f.check_box :twitter_sharing_enabled, class: 'checkbox form-control', :'aria-describedby' => 'twitter_help_block' = f.check_box :twitter_sharing_enabled, class: 'checkbox form-control', :'aria-describedby' => 'twitter_help_block'
%span.help-block#twitter_help_block Show users a button to share their newly created public or internal projects on twitter %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 %fieldset
%legend Misc %legend Misc
.form-group .form-group
......
...@@ -58,8 +58,9 @@ ...@@ -58,8 +58,9 @@
.col-md-4 .col-md-4
%h4 %h4
Components Components
.pull-right - if current_application_settings.version_check_enabled
= version_status_badge .pull-right
= version_status_badge
%hr %hr
%p %p
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
GitLab GitLab
%span= Gitlab::VERSION %span= Gitlab::VERSION
%small= Gitlab::REVISION %small= Gitlab::REVISION
= version_status_badge - if current_application_settings.version_check_enabled
= version_status_badge
%p.slead %p.slead
GitLab is open source software to collaborate on code. GitLab is open source software to collaborate on code.
%br %br
......
class AddVersionCheckToApplicationSettings < ActiveRecord::Migration
def change
add_column :application_settings, :version_check_enabled, :boolean, default: true
end
end
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150225065047) do ActiveRecord::Schema.define(version: 20150310194358) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
...@@ -27,6 +27,7 @@ ActiveRecord::Schema.define(version: 20150225065047) do ...@@ -27,6 +27,7 @@ ActiveRecord::Schema.define(version: 20150225065047) do
t.string "home_page_url" t.string "home_page_url"
t.integer "default_branch_protection", default: 2 t.integer "default_branch_protection", default: 2
t.boolean "twitter_sharing_enabled", default: true t.boolean "twitter_sharing_enabled", default: true
t.boolean "version_check_enabled", default: true
end end
create_table "broadcast_messages", force: true do |t| create_table "broadcast_messages", force: true do |t|
......
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