diff options
author | Fabian Schneider <fabbbbbi+git@googlemail.com> | 2018-11-07 00:16:49 +0300 |
---|---|---|
committer | Fabian Schneider <fabbbbbi+git@googlemail.com> | 2019-02-06 19:33:56 +0300 |
commit | 27f7771ae1a4b5f9d973a55ccbbbe30b0e05f100 (patch) | |
tree | 6848af95359ff3cb1d84259df159a620b4b64bd5 /app/views | |
parent | 20c83bbdb0a9729a308957397b37a2569486116f (diff) |
Add setting for first day of the week
Diffstat (limited to 'app/views')
3 files changed, 40 insertions, 0 deletions
diff --git a/app/views/admin/application_settings/_localization.html.haml b/app/views/admin/application_settings/_localization.html.haml new file mode 100644 index 00000000000..87209da75fd --- /dev/null +++ b/app/views/admin/application_settings/_localization.html.haml @@ -0,0 +1,11 @@ += form_for @application_setting, url: admin_application_settings_path(anchor: 'js-localization-settings'), html: { class: 'fieldset-form' } do |f| + = form_errors(@application_setting) + + %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, options_for_select({_('Sunday') => 0, _('Monday') => 1}, @application_setting.default_first_day_of_week), {}, class: 'form-control' + .form-text.text-muted + Default first day of the week in calendars and date pickers. + + = f.submit 'Save changes', class: "btn btn-success" diff --git a/app/views/admin/application_settings/preferences.html.haml b/app/views/admin/application_settings/preferences.html.haml index 00000b86ab7..c468d69d7b8 100644 --- a/app/views/admin/application_settings/preferences.html.haml +++ b/app/views/admin/application_settings/preferences.html.haml @@ -56,3 +56,14 @@ = _('Configure Gitaly timeouts.') .settings-content = render 'gitaly' + +%section.settings.as-localization.no-animate#js-localization-settings{ class: ('expanded' if expanded_by_default?) } + .settings-header + %h4 + = _('Localization') + %button.btn.btn-default.js-settings-toggle{ type: 'button' } + = expanded_by_default? ? _('Collapse') : _('Expand') + %p + = _('Various localization settings.') + .settings-content + = render 'localization' diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index c1616810185..5e1c1f30ca4 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -60,5 +60,23 @@ = f.select :project_view, project_view_choices, {}, class: 'form-control' .form-text.text-muted Choose what content you want to see on a project’s overview page. + + .col-sm-12 + %hr + + .col-lg-4.profile-settings-sidebar + %h4.prepend-top-0 + Localization + %p + Customize language and region related settings. + = succeed '.' do + = link_to 'Learn more', help_page_path('user/profile/preferences', anchor: 'localization'), target: '_blank' + .col-lg-8 + .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' + .form-text.text-muted + Choose on what day the week should start. .form-group = f.submit 'Save changes', class: 'btn btn-success' |