diff options
Diffstat (limited to 'app/views/profiles')
4 files changed, 15 insertions, 24 deletions
diff --git a/app/views/profiles/chat_names/_chat_name.html.haml b/app/views/profiles/chat_names/_chat_name.html.haml index 0b45869bdf9..ce2fc2098c5 100644 --- a/app/views/profiles/chat_names/_chat_name.html.haml +++ b/app/views/profiles/chat_names/_chat_name.html.haml @@ -1,18 +1,20 @@ - integration = chat_name.integration -- project = integration.project +- project = integration&.project %tr %td %strong - - if can?(current_user, :read_project, project) + - if project.present? && can?(current_user, :read_project, project) = link_to project.full_name, project_path(project) - else .light= _('Not applicable.') %td %strong - - if can?(current_user, :admin_project, project) + - if integration.present? && can?(current_user, :admin_project, project) = link_to integration.title, edit_project_settings_integration_path(project, integration) - - else + - elsif integration.present? = integration.title + - else + .light= _('Not applicable.') %td = chat_name.team_domain %td diff --git a/app/views/profiles/notifications/_email_settings.html.haml b/app/views/profiles/notifications/_email_settings.html.haml index c4de33dcd9e..cd7a7ced1d4 100644 --- a/app/views/profiles/notifications/_email_settings.html.haml +++ b/app/views/profiles/notifications/_email_settings.html.haml @@ -1,7 +1,6 @@ - form = local_assigns.fetch(:form) .form-group - = form.label :notification_email, _('Notification Email'), class: "label-bold" - = form.select :notification_email, @user.public_verified_emails, { include_blank: _('Use primary email (%{email})') % { email: @user.email }, selected: @user.notification_email }, class: "select2", disabled: local_assigns.fetch(:email_change_disabled, nil) + .js-notification-email-listbox-input{ data: { label: _('Notification Email'), name: 'user[notification_email]', emails: @user.public_verified_emails.to_json, empty_value_text: _('Use primary email (%{email})') % { email: @user.email }, value: @user.notification_email, disabled: local_assigns.fetch(:email_change_disabled, nil) } } .help-block = local_assigns.fetch(:help_text, nil) .form-group diff --git a/app/views/profiles/notifications/_group_settings.html.haml b/app/views/profiles/notifications/_group_settings.html.haml index 23fce8e04b6..898762ca78a 100644 --- a/app/views/profiles/notifications/_group_settings.html.haml +++ b/app/views/profiles/notifications/_group_settings.html.haml @@ -14,4 +14,4 @@ .table-section.section-30 = form_for setting, url: profile_group_notifications_path(group), method: :put, html: { class: 'update-notifications gl-display-flex' } do |f| - = f.select :notification_email, @user.public_verified_emails, { include_blank: 'Global notification email' }, class: 'select2 js-group-notification-email' + .js-notification-email-listbox-input{ data: { name: 'notification_setting[notification_email]', emails: @user.public_verified_emails.to_json, empty_value_text: _('Global notification email') , value: setting.notification_email } } diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index 24ef9cf4dec..b10d05efc4f 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -76,12 +76,7 @@ = f.select :layout, layout_choices, {}, class: 'gl-form-select custom-select' .form-text.text-muted = s_('Preferences|Choose between fixed (max. 1280px) and fluid (%{percentage}) application layout.').html_safe % { percentage: '100%' } - .form-group - = f.label :dashboard, class: 'label-bold' do - = s_('Preferences|Dashboard') - = f.select :dashboard, dashboard_choices, {}, class: 'select2' - .form-text.text-muted - = s_('Preferences|Choose what content you want to see by default on your dashboard.') + .js-listbox-input{ data: { label: s_('Preferences|Dashboard'), description: s_('Preferences|Choose what content you want to see by default on your dashboard.'), name: 'user[dashboard]', items: dashboard_choices.to_json, value: current_user.dashboard } } = render_if_exists 'profiles/preferences/group_overview_selector', f: f # EE-specific @@ -130,17 +125,12 @@ = succeed '.' do = link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'localization'), target: '_blank', rel: 'noopener noreferrer' .col-lg-8 - .form-group - = f.label :preferred_language, class: 'label-bold' do - = _('Language') - = f.select :preferred_language, language_choices, {}, class: 'select2' - .form-text.text-muted - = s_('Preferences|This feature is experimental and translations are not yet complete.') - %p - = link_to help_page_url('development/i18n/translation'), class: 'text-nowrap', target: '_blank', rel: 'noopener noreferrer' do - = _("Help translate GitLab into your language") - %span{ aria: { label: _('Open new window') } } - = sprite_icon('external-link') + .js-listbox-input{ data: { label: _('Language'), description: s_('Preferences|This feature is experimental and translations are not yet complete.'), name: 'user[preferred_language]', items: language_choices.to_json, value: current_user.preferred_language } } + %p.gl-mt-n5 + = link_to help_page_url('development/i18n/translation'), class: 'text-nowrap', target: '_blank', rel: 'noopener noreferrer' do + = _("Help translate GitLab into your language") + %span{ aria: { label: _('Open new window') } } + = sprite_icon('external-link') .form-group = f.label :first_day_of_week, class: 'label-bold' do = _('First day of the week') |