Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/helpers/application_settings_helper.rb2
-rw-r--r--app/helpers/preferences_helper.rb4
-rw-r--r--app/models/application_setting.rb2
-rw-r--r--app/views/admin/application_settings/_localization.html.haml4
-rw-r--r--app/views/profiles/preferences/show.html.haml2
5 files changed, 6 insertions, 8 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb
index 667c5097d91..67d16306525 100644
--- a/app/helpers/application_settings_helper.rb
+++ b/app/helpers/application_settings_helper.rb
@@ -136,7 +136,6 @@ module ApplicationSettingsHelper
:container_registry_token_expire_delay,
:default_artifacts_expire_in,
:default_branch_protection,
- :default_first_day_of_week,
:default_group_visibility,
:default_project_visibility,
:default_projects_limit,
@@ -151,6 +150,7 @@ module ApplicationSettingsHelper
:email_author_in_body,
:enabled_git_access_protocol,
:enforce_terms,
+ :first_day_of_week,
:gitaly_timeout_default,
:gitaly_timeout_medium,
:gitaly_timeout_fast,
diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb
index 0faa28581cc..f1513f4f680 100644
--- a/app/helpers/preferences_helper.rb
+++ b/app/helpers/preferences_helper.rb
@@ -51,11 +51,11 @@ module PreferencesHelper
end
def default_first_day_of_week
- first_day_of_week_choices.rassoc(Gitlab::CurrentSettings.default_first_day_of_week).first
+ first_day_of_week_choices.rassoc(Gitlab::CurrentSettings.first_day_of_week).first
end
def first_day_of_week_choices_with_default
- first_day_of_week_choices.unshift([_('System Default (%{default})') % { default: default_first_day_of_week }, nil])
+ first_day_of_week_choices.unshift([_('System default (%{default})') % { default: default_first_day_of_week }, nil])
end
def user_application_theme
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index 4f9dee1720c..6d7c51c2315 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -237,7 +237,6 @@ class ApplicationSetting < ActiveRecord::Base
container_registry_token_expire_delay: 5,
default_artifacts_expire_in: '30 days',
default_branch_protection: Settings.gitlab['default_branch_protection'],
- default_first_day_of_week: 0,
default_group_visibility: Settings.gitlab.default_projects_features['visibility_level'],
default_project_visibility: Settings.gitlab.default_projects_features['visibility_level'],
default_projects_limit: Settings.gitlab['default_projects_limit'],
@@ -247,6 +246,7 @@ class ApplicationSetting < ActiveRecord::Base
dsa_key_restriction: 0,
ecdsa_key_restriction: 0,
ed25519_key_restriction: 0,
+ first_day_of_week: 0,
gitaly_timeout_default: 55,
gitaly_timeout_fast: 10,
gitaly_timeout_medium: 30,
diff --git a/app/views/admin/application_settings/_localization.html.haml b/app/views/admin/application_settings/_localization.html.haml
index 7392b32ee89..95d016a94a5 100644
--- a/app/views/admin/application_settings/_localization.html.haml
+++ b/app/views/admin/application_settings/_localization.html.haml
@@ -3,8 +3,8 @@
%fieldset
.form-group
- = f.label :default_first_day_of_week, _('Default first day of the week'), class: 'label-bold'
- = f.select :default_first_day_of_week, first_day_of_week_choices, {}, class: 'form-control'
+ = f.label :first_day_of_week, _('Default first day of the week'), class: 'label-bold'
+ = f.select :first_day_of_week, first_day_of_week_choices, {}, class: 'form-control'
.form-text.text-muted
= _('Default first day of the week in calendars and date pickers.')
diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml
index e290ba89684..1a9aca1f6bf 100644
--- a/app/views/profiles/preferences/show.html.haml
+++ b/app/views/profiles/preferences/show.html.haml
@@ -76,7 +76,5 @@
= f.label :first_day_of_week, class: 'label-bold' do
= _('First day of the week')
= f.select :first_day_of_week, first_day_of_week_choices_with_default, {}, class: 'form-control'
- .form-text.text-muted
- = _('Choose on what day the week should start.')
.form-group
= f.submit _('Save changes'), class: 'btn btn-success'