diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2019-06-14 17:46:31 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2019-06-14 17:46:31 +0300 |
commit | 6b3de25996e32f9b78cf4dbbad6dfeba346758fd (patch) | |
tree | ce3f22d9f77be086eaa136ff559b0ec6f6db7262 /app/views/admin | |
parent | ba6e134e2814e6d7616990c7f9aa3a521b4082b3 (diff) | |
parent | c449e35b33c55e2a0c8c3b7c08d0d68870e41ec4 (diff) |
Merge branch 'master' into 59532-danger-css59532-danger-css
* master: (1920 commits)
Upgrade gitlab-ui and migrate gl-pagination
New translations gitlab.pot (Danish) [skip ci]
Fix missing deployment rockets in monitor dashboard
Add basic support for AsciiDoc include directive
Improve the gitea importer test
Backport of EE changes from MR 13763
Clarify ED25519 SSH key support
Exclude preexisting lint issues for i18n
Add back sidekiq metrics exporter
Breakup first pass
Use scoped routes for labels and milestones
AutoDevops fix ensure_namespace() does not explicitly test namespace
Speed up commit loads by disabling BatchLoader replace_methods
Speed up merge request loads by disabling BatchLoader replace_methods
Remove unused selector
Disable unnecessary ESLint i18n offences
Unquarantine spec in user_edits_files_spec.rb
Refactor for cleaner caching in dashboards
Update height of -tabs-height
Change SLA to target SLO for bugs and defects
...
Diffstat (limited to 'app/views/admin')
24 files changed, 156 insertions, 97 deletions
diff --git a/app/views/admin/application_settings/_external_authorization_service_form.html.haml b/app/views/admin/application_settings/_external_authorization_service_form.html.haml index 01f6c7afe61..7587ecbf9d3 100644 --- a/app/views/admin/application_settings/_external_authorization_service_form.html.haml +++ b/app/views/admin/application_settings/_external_authorization_service_form.html.haml @@ -5,7 +5,7 @@ %button.btn.js-settings-toggle{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p - = _('External Classification Policy Authorization') + = _('External Classification Policy Authorization') .settings-content = form_for @application_setting, url: admin_application_settings_path(anchor: 'js-external-auth-settings'), html: { class: 'fieldset-form' } do |f| diff --git a/app/views/admin/application_settings/_logging.html.haml b/app/views/admin/application_settings/_logging.html.haml index 41b787515b5..1da5f6fccd6 100644 --- a/app/views/admin/application_settings/_logging.html.haml +++ b/app/views/admin/application_settings/_logging.html.haml @@ -1,6 +1,12 @@ = form_for @application_setting, url: admin_application_settings_path(anchor: 'js-logging-settings'), html: { class: 'fieldset-form' } do |f| = form_errors(@application_setting) + %p + %strong + NOTE: + These settings will be removed from the UI in a GitLab 12.0 release and made available within gitlab.yml. + In addition, you will be able to define a Sentry Environment to differentiate between multiple deployments. For example, development, staging, and production. + %fieldset .form-group .form-check diff --git a/app/views/admin/application_settings/_outbound.html.haml b/app/views/admin/application_settings/_outbound.html.haml index f4bfb5af385..dd56bb99a06 100644 --- a/app/views/admin/application_settings/_outbound.html.haml +++ b/app/views/admin/application_settings/_outbound.html.haml @@ -8,4 +8,12 @@ = f.label :allow_local_requests_from_hooks_and_services, class: 'form-check-label' do Allow requests to the local network from hooks and services + .form-group + .form-check + = f.check_box :dns_rebinding_protection_enabled, class: 'form-check-input' + = f.label :dns_rebinding_protection_enabled, class: 'form-check-label' do + = _('Enforce DNS rebinding attack protection') + %span.form-text.text-muted + = _('Resolves IP addresses once and uses them to submit requests') + = f.submit 'Save changes', class: "btn btn-success" diff --git a/app/views/admin/application_settings/_pages.html.haml b/app/views/admin/application_settings/_pages.html.haml index ad5c8d4da22..77795dbf913 100644 --- a/app/views/admin/application_settings/_pages.html.haml +++ b/app/views/admin/application_settings/_pages.html.haml @@ -5,16 +5,32 @@ .form-group = f.label :max_pages_size, 'Maximum size of pages (MB)', class: 'label-bold' = f.number_field :max_pages_size, class: 'form-control' - .form-text.text-muted 0 for unlimited + .form-text.text-muted + = _("0 for unlimited") .form-group .form-check = f.check_box :pages_domain_verification_enabled, class: 'form-check-input' = f.label :pages_domain_verification_enabled, class: 'form-check-label' do - Require users to prove ownership of custom domains + = _("Require users to prove ownership of custom domains") .form-text.text-muted - Domain verification is an essential security measure for public GitLab - sites. Users are required to demonstrate they control a domain before - it is enabled + = _("Domain verification is an essential security measure for public GitLab sites. Users are required to demonstrate they control a domain before it is enabled") = link_to icon('question-circle'), help_page_path('user/project/pages/getting_started_part_three.md', anchor: 'dns-txt-record') + - if Feature.enabled?(:pages_auto_ssl) + %h5 + = _("Configure Let's Encrypt") + %p + - lets_encrypt_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: "https://letsencrypt.org/" } + = _("%{lets_encrypt_link_start}Let's Encrypt%{lets_encrypt_link_end} is a free, automated, and open certificate authority (CA), that give digital certificates in order to enable HTTPS (SSL/TLS) for websites.").html_safe % { lets_encrypt_link_start: lets_encrypt_link_start, lets_encrypt_link_end: '</a>'.html_safe } + .form-group + = f.label :lets_encrypt_notification_email, _("Email"), class: 'label-bold' + = f.text_field :lets_encrypt_notification_email, class: 'form-control' + .form-text.text-muted + = _("A Let's Encrypt account will be configured for this GitLab installation using your email address. You will receive emails to warn of expiring certificates.") + .form-group + .form-check + = f.check_box :lets_encrypt_terms_of_service_accepted, class: 'form-check-input' + = f.label :lets_encrypt_terms_of_service_accepted, class: 'form-check-label' do + - terms_of_service_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: lets_encrypt_terms_of_service_admin_application_settings_path } + = _("I have read and agree to the Let's Encrypt %{link_start}Terms of Service%{link_end}").html_safe % { link_start: terms_of_service_link_start, link_end: '</a>'.html_safe } - = f.submit 'Save changes', class: "btn btn-success" + = f.submit _('Save changes'), class: "btn btn-success" diff --git a/app/views/admin/application_settings/_performance_bar.html.haml b/app/views/admin/application_settings/_performance_bar.html.haml index 44ac8d94764..1e66b635038 100644 --- a/app/views/admin/application_settings/_performance_bar.html.haml +++ b/app/views/admin/application_settings/_performance_bar.html.haml @@ -5,10 +5,10 @@ .form-group .form-check = f.check_box :performance_bar_enabled, class: 'form-check-input' - = f.label :performance_bar_enabled, class: 'form-check-label' do - Enable the Performance Bar + = f.label :performance_bar_enabled, class: 'form-check-label qa-enable-performance-bar-checkbox' do + Enable access to the Performance Bar .form-group = f.label :performance_bar_allowed_group_path, 'Allowed group', class: 'label-bold' = f.text_field :performance_bar_allowed_group_path, class: 'form-control', placeholder: 'my-org/my-group', value: @application_setting.performance_bar_allowed_group&.full_path - = f.submit 'Save changes', class: "btn btn-success" + = f.submit 'Save changes', class: 'btn btn-success qa-save-changes-button' diff --git a/app/views/admin/application_settings/_visibility_and_access.html.haml b/app/views/admin/application_settings/_visibility_and_access.html.haml index 03ef2924617..c07bafbe302 100644 --- a/app/views/admin/application_settings/_visibility_and_access.html.haml +++ b/app/views/admin/application_settings/_visibility_and_access.html.haml @@ -8,6 +8,7 @@ .form-group = f.label s_('ProjectCreationLevel|Default project creation protection'), class: 'label-bold' = f.select :default_project_creation, options_for_select(Gitlab::Access.project_creation_options, @application_setting.default_project_creation), {}, class: 'form-control' + = render_if_exists 'admin/application_settings/default_project_deletion_protection_setting', form: f .form-group.visibility-level-setting = f.label :default_project_visibility, class: 'label-bold' = render('shared/visibility_radios', model_method: :default_project_visibility, form: f, selected_level: @application_setting.default_project_visibility, form_model: Project.new) diff --git a/app/views/admin/application_settings/metrics_and_profiling.html.haml b/app/views/admin/application_settings/metrics_and_profiling.html.haml index f50aca32bdf..01d61beaf53 100644 --- a/app/views/admin/application_settings/metrics_and_profiling.html.haml +++ b/app/views/admin/application_settings/metrics_and_profiling.html.haml @@ -24,14 +24,14 @@ .settings-content = render 'prometheus' -%section.settings.as-performance-bar.no-animate#js-performance-bar-settings{ class: ('expanded' if expanded_by_default?) } +%section.settings.qa-performance-bar-settings.as-performance-bar.no-animate#js-performance-bar-settings{ class: ('expanded' if expanded_by_default?) } .settings-header %h4 = _('Profiling - Performance bar') %button.btn.btn-default.js-settings-toggle{ type: 'button' } = expanded_by_default? ? _('Collapse') : _('Expand') %p - = _('Enable the Performance Bar for a given group.') + = _('Enable access to the Performance Bar for a given group.') = link_to icon('question-circle'), help_page_path('administration/monitoring/performance/performance_bar') .settings-content = render 'performance_bar' diff --git a/app/views/admin/applications/_form.html.haml b/app/views/admin/applications/_form.html.haml index 12690343f6e..21e84016c66 100644 --- a/app/views/admin/applications/_form.html.haml +++ b/app/views/admin/applications/_form.html.haml @@ -2,13 +2,15 @@ = form_errors(application) = content_tag :div, class: 'form-group row' do - = f.label :name, class: 'col-sm-2 col-form-label' + .col-sm-2.col-form-label + = f.label :name .col-sm-10 = f.text_field :name, class: 'form-control' = doorkeeper_errors_for application, :name = content_tag :div, class: 'form-group row' do - = f.label :redirect_uri, class: 'col-sm-2 col-form-label' + .col-sm-2.col-form-label + = f.label :redirect_uri .col-sm-10 = f.text_area :redirect_uri, class: 'form-control' = doorkeeper_errors_for application, :redirect_uri @@ -21,14 +23,16 @@ for local tests = content_tag :div, class: 'form-group row' do - = f.label :trusted, class: 'col-sm-2 col-form-label pt-0' + .col-sm-2.col-form-label.pt-0 + = f.label :trusted .col-sm-10 = f.check_box :trusted %span.form-text.text-muted Trusted applications are automatically authorized on GitLab OAuth flow. .form-group.row - = f.label :scopes, class: 'col-sm-2 col-form-label pt-0' + .col-sm-2.col-form-label.pt-0 + = f.label :scopes .col-sm-10 = render 'shared/tokens/scopes_form', prefix: 'doorkeeper_application', token: application, scopes: @scopes diff --git a/app/views/admin/applications/show.html.haml b/app/views/admin/applications/show.html.haml index df3eeba907c..180066723f1 100644 --- a/app/views/admin/applications/show.html.haml +++ b/app/views/admin/applications/show.html.haml @@ -11,7 +11,7 @@ %td .clipboard-group .input-group - %input.label.label-monospace{ id: "application_id", type: "text", autocomplete: 'off', value: @application.uid, readonly: true } + %input.label.label-monospace.monospace{ id: "application_id", type: "text", autocomplete: 'off', value: @application.uid, readonly: true } .input-group-append = clipboard_button(target: '#application_id', title: _("Copy ID to clipboard"), class: "btn btn btn-default") %tr @@ -20,7 +20,7 @@ %td .clipboard-group .input-group - %input.label.label-monospace{ id: "secret", type: "text", autocomplete: 'off', value: @application.secret, readonly: true } + %input.label.label-monospace.monospace{ id: "secret", type: "text", autocomplete: 'off', value: @application.secret, readonly: true } .input-group-append = clipboard_button(target: '#secret', title: _("Copy secret to clipboard"), class: "btn btn btn-default") %tr diff --git a/app/views/admin/broadcast_messages/_form.html.haml b/app/views/admin/broadcast_messages/_form.html.haml index c465d9f51d6..c8ee87c6212 100644 --- a/app/views/admin/broadcast_messages/_form.html.haml +++ b/app/views/admin/broadcast_messages/_form.html.haml @@ -10,28 +10,34 @@ = form_errors(@broadcast_message) .form-group.row - = f.label :message, class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :message .col-sm-10 = f.text_area :message, class: "form-control js-autosize", required: true, + dir: 'auto', data: { preview_path: preview_admin_broadcast_messages_path } .form-group.row.js-toggle-colors-container .col-sm-10.offset-sm-2 = link_to 'Customize colors', '#', class: 'js-toggle-colors-link' .form-group.row.js-toggle-colors-container.toggle-colors.hide - = f.label :color, "Background Color", class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :color, "Background Color" .col-sm-10 = f.color_field :color, class: "form-control" .form-group.row.js-toggle-colors-container.toggle-colors.hide - = f.label :font, "Font Color", class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :font, "Font Color" .col-sm-10 = f.color_field :font, class: "form-control" .form-group.row - = f.label :starts_at, _("Starts at (UTC)"), class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :starts_at, _("Starts at (UTC)") .col-sm-10.datetime-controls = f.datetime_select :starts_at, {}, class: 'form-control form-control-inline' .form-group.row - = f.label :ends_at, _("Ends at (UTC)"), class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :ends_at, _("Ends at (UTC)") .col-sm-10.datetime-controls = f.datetime_select :ends_at, {}, class: 'form-control form-control-inline' .form-actions diff --git a/app/views/admin/broadcast_messages/index.html.haml b/app/views/admin/broadcast_messages/index.html.haml index 9ef58faf8cc..eb4dfdf2858 100644 --- a/app/views/admin/broadcast_messages/index.html.haml +++ b/app/views/admin/broadcast_messages/index.html.haml @@ -32,7 +32,7 @@ %td = message.ends_at %td - = link_to icon('pencil-square-o'), edit_admin_broadcast_message_path(message), title: 'Edit', class: 'btn btn-sm' - = link_to icon('times'), admin_broadcast_message_path(message), method: :delete, remote: true, title: 'Remove', class: 'js-remove-tr btn btn-sm btn-danger' + = link_to sprite_icon('pencil-square'), edit_admin_broadcast_message_path(message), title: 'Edit', class: 'btn' + = link_to sprite_icon('remove'), admin_broadcast_message_path(message), method: :delete, remote: true, title: 'Remove', class: 'js-remove-tr btn btn-danger' = paginate @broadcast_messages, theme: 'gitlab' diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index 8fb38f6a690..dd01ef8a29f 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -2,11 +2,12 @@ = form_errors(@group) = render 'shared/group_form', f: f - = render_if_exists 'shared/repository_size_limit_setting', form: f, type: :group + = render_if_exists 'shared/old_repository_size_limit_setting', form: f, type: :group = render_if_exists 'admin/namespace_plan', f: f .form-group.row.group-description-holder - = f.label :avatar, _("Group avatar"), class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :avatar, _("Group avatar") .col-sm-10 = render 'shared/choose_avatar_button', f: f diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 00d255846f9..f524d35d79e 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -44,12 +44,10 @@ %li %span.light= _('Storage:') - - counter_storage = storage_counter(@group.storage_size) - - counter_repositories = storage_counter(@group.repository_size) - - counter_build_artifacts = storage_counter(@group.build_artifacts_size) - - counter_lfs_objects = storage_counter(@group.lfs_objects_size) - %strong - = _("%{counter_storage} (%{counter_repositories} repositories, %{counter_build_artifacts} build artifacts, %{counter_lfs_objects} LFS)") % { counter_storage: counter_storage, counter_repositories: counter_repositories, counter_build_artifacts: counter_build_artifacts, counter_lfs_objects: counter_lfs_objects } + %strong= storage_counter(@group.storage_size) + ( + = storage_counters_details(@group) + ) %li %span.light= _('Group Git LFS status:') diff --git a/app/views/admin/health_check/show.html.haml b/app/views/admin/health_check/show.html.haml index 0f5e97e288a..ac56e354a4d 100644 --- a/app/views/admin/health_check/show.html.haml +++ b/app/views/admin/health_check/show.html.haml @@ -23,7 +23,7 @@ %code= liveness_url(token: Gitlab::CurrentSettings.health_check_access_token) %li %code= metrics_url(token: Gitlab::CurrentSettings.health_check_access_token) - + = render_if_exists 'admin/health_check/health_check_url' %hr .card .card-header diff --git a/app/views/admin/identities/_form.html.haml b/app/views/admin/identities/_form.html.haml index 3ab7990d9e2..40a7014e143 100644 --- a/app/views/admin/identities/_form.html.haml +++ b/app/views/admin/identities/_form.html.haml @@ -2,12 +2,14 @@ = form_errors(@identity) .form-group.row - = f.label :provider, class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :provider .col-sm-10 - values = Gitlab::Auth::OAuth::Provider.providers.map { |name| ["#{Gitlab::Auth::OAuth::Provider.label_for(name)} (#{name})", name] } = f.select :provider, values, { allow_blank: false }, class: 'form-control' .form-group.row - = f.label :extern_uid, _("Identifier"), class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :extern_uid, _("Identifier") .col-sm-10 = f.text_field :extern_uid, class: 'form-control', required: true diff --git a/app/views/admin/labels/_form.html.haml b/app/views/admin/labels/_form.html.haml index 5e7b4817461..299d0a12e6c 100644 --- a/app/views/admin/labels/_form.html.haml +++ b/app/views/admin/labels/_form.html.haml @@ -2,15 +2,18 @@ = form_errors(@label) .form-group.row - = f.label :title, class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :title .col-sm-10 = f.text_field :title, class: "form-control", required: true .form-group.row - = f.label :description, class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :description .col-sm-10 = f.text_field :description, class: "form-control js-quick-submit" .form-group.row - = f.label :color, _("Background color"), class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :color, _("Background color") .col-sm-10 .input-group .input-group-prepend @@ -21,10 +24,7 @@ %br = _("Or you can choose one of the suggested colors below") - .suggest-colors - - suggested_colors.each do |color| - = link_to '#', style: "background-color: #{color}", data: { color: color } do - + = render_suggested_colors .form-actions = f.submit _('Save'), class: 'btn btn-success js-save-button' diff --git a/app/views/admin/labels/_label.html.haml b/app/views/admin/labels/_label.html.haml index dbb7224f5f9..6d934654c5d 100644 --- a/app/views/admin/labels/_label.html.haml +++ b/app/views/admin/labels/_label.html.haml @@ -1,5 +1,5 @@ %li.label-list-item{ id: dom_id(label) } - = render "shared/label_row", label: label + = render "shared/label_row", label: label.present(issuable_subject: nil) .label-actions-list = link_to edit_admin_label_path(label), class: 'btn btn-transparent label-action has-tooltip', title: _('Edit'), data: { placement: 'bottom' }, aria_label: _('Edit') do = sprite_icon('pencil') diff --git a/app/views/admin/projects/_projects.html.haml b/app/views/admin/projects/_projects.html.haml index 5bc695aa7b5..2f7ad35eb3e 100644 --- a/app/views/admin/projects/_projects.html.haml +++ b/app/views/admin/projects/_projects.html.haml @@ -7,17 +7,17 @@ = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn" %button.delete-project-button.btn.btn-danger{ data: { toggle: 'modal', target: '#delete-project-modal', - delete_project_url: project_path(project), + delete_project_url: admin_project_path(project), project_name: project.name }, type: 'button' } = s_('AdminProjects|Delete') .stats %span.badge.badge-pill - = storage_counter(project.statistics.storage_size) + = storage_counter(project.statistics&.storage_size) - if project.archived %span.badge.badge-warning archived .title - = link_to(admin_namespace_project_path(project.namespace, project)) do + = link_to(admin_project_path(project)) do .dash-project-avatar .avatar-container.rect-avatar.s40 = project_icon(project, alt: '', class: 'avatar project-avatar s40', width: 40, height: 40) diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml index 46bb57c78a8..b88b760536d 100644 --- a/app/views/admin/projects/index.html.haml +++ b/app/views/admin/projects/index.html.haml @@ -7,7 +7,7 @@ .top-area.scrolling-tabs-container.inner-page-scroll-tabs .prepend-top-default .search-holder - = render 'shared/projects/search_form', autofocus: true, icon: true + = render 'shared/projects/search_form', autofocus: true, icon: true, admin_view: true .dropdown - toggle_text = 'Namespace' - if params[:namespace_id].present? diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index 03cce4745aa..e23accc1ea9 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -73,16 +73,11 @@ = @project.repository.relative_path %li - %span.light Storage used: - %strong= storage_counter(@project.statistics.storage_size) - ( - = storage_counter(@project.statistics.repository_size) - repository, - = storage_counter(@project.statistics.build_artifacts_size) - build artifacts, - = storage_counter(@project.statistics.lfs_objects_size) - LFS - ) + %span.light= _('Storage:') + %strong= storage_counter(@project.statistics&.storage_size) + - if @project.statistics + = surround '(', ')' do + = storage_counters_details(@project.statistics) %li %span.light last commit: @@ -105,6 +100,8 @@ %span.light archived: %strong project is read-only + = render_if_exists "shared_runner_status", project: @project + %li %span.light access: %strong @@ -120,7 +117,8 @@ .card-body = form_for @project, url: transfer_admin_project_path(@project), method: :put do |f| .form-group.row - = f.label :new_namespace_id, "Namespace", class: 'col-form-label col-sm-3' + .col-sm-3.col-form-label + = f.label :new_namespace_id, "Namespace" .col-sm-9 .dropdown = dropdown_toggle('Search for Namespace', { toggle: 'dropdown', field_name: 'new_namespace_id' }, { toggle_class: 'js-namespace-select large' }) diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml index 12e24ddef02..77729636f9d 100644 --- a/app/views/admin/users/_access_levels.html.haml +++ b/app/views/admin/users/_access_levels.html.haml @@ -1,18 +1,20 @@ %fieldset %legend Access .form-group.row - .col-sm-2.text-right - = f.label :projects_limit, class: 'col-form-label' - .col-sm-10= f.number_field :projects_limit, min: 0, max: Gitlab::Database::MAX_INT_VALUE, class: 'form-control' + .col-sm-2.col-form-label + = f.label :projects_limit + .col-sm-10 + = f.number_field :projects_limit, min: 0, max: Gitlab::Database::MAX_INT_VALUE, class: 'form-control' .form-group.row - .col-sm-2.text-right - = f.label :can_create_group, class: 'col-form-label' - .col-sm-10= f.check_box :can_create_group + .col-sm-2.col-form-label + = f.label :can_create_group + .col-sm-10 + = f.check_box :can_create_group .form-group.row - .col-sm-2.text-right - = f.label :access_level, class: 'col-form-label' + .col-sm-2.col-form-label + = f.label :access_level .col-sm-10 - editing_current_user = (current_user == @user) @@ -22,6 +24,8 @@ %p.light Regular users have access to their groups and projects + = render_if_exists 'admin/users/auditor_access_level_radio', f: f, disabled: editing_current_user + = f.radio_button :access_level, :admin, disabled: editing_current_user = label_tag :admin, class: 'font-weight-bold' do Admin @@ -32,8 +36,8 @@ You cannot remove your own admin rights. .form-group.row - .col-sm-2.text-right - = f.label :external, class: 'col-form-label' + .col-sm-2.col-form-label + = f.label :external .hidden{ data: user_internal_regex_data } .col-sm-10 = f.check_box :external do diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 296ef073144..3281718071c 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -5,20 +5,20 @@ %fieldset %legend Account .form-group.row - .col-sm-2.text-right - = f.label :name, class: 'col-form-label' + .col-sm-2.col-form-label + = f.label :name .col-sm-10 = f.text_field :name, required: true, autocomplete: 'off', class: 'form-control' %span.help-inline * required .form-group.row - .col-sm-2.text-right - = f.label :username, class: 'col-form-label' + .col-sm-2.col-form-label + = f.label :username .col-sm-10 = f.text_field :username, required: true, autocomplete: 'off', autocorrect: 'off', autocapitalize: 'off', spellcheck: false, class: 'form-control' %span.help-inline * required .form-group.row - .col-sm-2.text-right - = f.label :email, class: 'col-form-label' + .col-sm-2.col-form-label + = f.label :email .col-sm-10 = f.text_field :email, required: true, autocomplete: 'off', class: 'form-control' %span.help-inline * required @@ -27,8 +27,8 @@ %fieldset %legend Password .form-group.row - .col-sm-2.text-right - = f.label :password, class: 'col-form-label' + .col-sm-2.col-form-label + = f.label :password .col-sm-10 %strong Reset link will be generated and sent to the user. @@ -38,40 +38,52 @@ %fieldset %legend Password .form-group.row - .col-sm-2.text-right - = f.label :password, class: 'col-form-label' - .col-sm-10= f.password_field :password, disabled: f.object.force_random_password, class: 'form-control' + .col-sm-2.col-form-label + = f.label :password + .col-sm-10 + = f.password_field :password, disabled: f.object.force_random_password, class: 'form-control' .form-group.row - .col-sm-2.text-right - = f.label :password_confirmation, class: 'col-form-label' - .col-sm-10= f.password_field :password_confirmation, disabled: f.object.force_random_password, class: 'form-control' + .col-sm-2.col-form-label + = f.label :password_confirmation + .col-sm-10 + = f.password_field :password_confirmation, disabled: f.object.force_random_password, class: 'form-control' = render partial: 'access_levels', locals: { f: f } + = render_if_exists 'admin/users/namespace_plan_fieldset', f: f + + = render_if_exists 'admin/users/limits', f: f + %fieldset %legend Profile .form-group.row - .col-sm-2.text-right - = f.label :avatar, class: 'col-form-label' + .col-sm-2.col-form-label + = f.label :avatar .col-sm-10 = f.file_field :avatar .form-group.row - .col-sm-2.text-right - = f.label :skype, class: 'col-form-label' - .col-sm-10= f.text_field :skype, class: 'form-control' + .col-sm-2.col-form-label + = f.label :skype + .col-sm-10 + = f.text_field :skype, class: 'form-control' .form-group.row - .col-sm-2.text-right - = f.label :linkedin, class: 'col-form-label' - .col-sm-10= f.text_field :linkedin, class: 'form-control' + .col-sm-2.col-form-label + = f.label :linkedin + .col-sm-10 + = f.text_field :linkedin, class: 'form-control' .form-group.row - .col-sm-2.text-right - = f.label :twitter, class: 'col-form-label' - .col-sm-10= f.text_field :twitter, class: 'form-control' + .col-sm-2.col-form-label + = f.label :twitter + .col-sm-10 + = f.text_field :twitter, class: 'form-control' .form-group.row - .col-sm-2.text-right - = f.label :website_url, 'Website', class: 'col-form-label' - .col-sm-10= f.text_field :website_url, class: 'form-control' + .col-sm-2.col-form-label + = f.label :website_url + .col-sm-10 + = f.text_field :website_url, class: 'form-control' + + = render_if_exists 'admin/users/admin_notes', f: f .form-actions - if @user.new_record? diff --git a/app/views/admin/users/_head.html.haml b/app/views/admin/users/_head.html.haml index a733f420d11..e7dde7985fd 100644 --- a/app/views/admin/users/_head.html.haml +++ b/app/views/admin/users/_head.html.haml @@ -6,6 +6,7 @@ %span.cred (Internal) - if @user.admin %span.cred (Admin) + = render_if_exists 'admin/users/audtior_user_badge' .float-right - if impersonation_enabled? && @user != current_user && @user.can?(:log_in) diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index c4178296e67..dcd6f7c8078 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -124,6 +124,8 @@ %strong = Gitlab::Access.human_access_with_none(@user.highest_role) + = render_if_exists 'admin/users/using_license_seat', user: @user + - if @user.ldap_user? %li %span.light LDAP uid: |