diff options
-rw-r--r-- | app/helpers/preferences_helper.rb | 5 | ||||
-rw-r--r-- | app/views/profiles/preferences/show.html.haml | 2 | ||||
-rw-r--r-- | doc/user/profile/preferences.md | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb index 301608175b2..3371592a36a 100644 --- a/app/helpers/preferences_helper.rb +++ b/app/helpers/preferences_helper.rb @@ -43,8 +43,13 @@ module PreferencesHelper ] end + def default_first_day_of_week + Date::DAYNAMES[Gitlab::CurrentSettings.default_first_day_of_week] + end + def first_day_of_week_choices [ + ["System Default (#{default_first_day_of_week})", nil], ['Sunday', 0], ['Monday', 1] ] diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index 5e1c1f30ca4..bed9aa05224 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -75,7 +75,7 @@ .form-group = f.label :first_day_of_week, class: 'label-bold' do First day of the week - = f.select :first_day_of_week, options_for_select(first_day_of_week_choices, @user.first_day_of_week || Gitlab::CurrentSettings.default_first_day_of_week), {}, class: 'form-control' + = f.select :first_day_of_week, first_day_of_week_choices, {}, class: 'form-control' .form-text.text-muted Choose on what day the week should start. .form-group diff --git a/doc/user/profile/preferences.md b/doc/user/profile/preferences.md index c14dbe586c4..925bbc84d85 100644 --- a/doc/user/profile/preferences.md +++ b/doc/user/profile/preferences.md @@ -94,4 +94,5 @@ This following setting allows you to customize calendar layouts. ### First day of the week -You can choose between **Sunday** and **Monday** for the first day of the week. This will be used for all calendar views and datepickers. +You can choose between **Default**, **Sunday** and **Monday** for the first day of the week. If you select **Default**, the system-wide default setting will be used. +This preference will be used for all calendar views and datepickers. |