diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /app/views/admin | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'app/views/admin')
88 files changed, 258 insertions, 209 deletions
diff --git a/app/views/admin/abuse_reports/_abuse_report.html.haml b/app/views/admin/abuse_reports/_abuse_report.html.haml index 5ed9a0d1adb..ae0da214fb7 100644 --- a/app/views/admin/abuse_reports/_abuse_report.html.haml +++ b/app/views/admin/abuse_reports/_abuse_report.html.haml @@ -1,7 +1,7 @@ - reporter = abuse_report.reporter - user = abuse_report.user %tr - %th.d-block.d-sm-none.d-md-none + %th.d-block.d-sm-none %strong= _('User') %td - if user @@ -11,21 +11,22 @@ - else = _('(removed)') %td - %strong.subheading.d-block.d-sm-none.d-md-none + %strong.subheading.d-block.d-sm-none = _('Reported by %{reporter}') % { reporter: reporter ? link_to(reporter.name, reporter) : _('(removed)') } .light.small = time_ago_with_tooltip(abuse_report.created_at) %td - %strong.subheading.d-block.d-sm-none.d-md-none= _('Message') + %strong.subheading.d-block.d-sm-none + = _('Message') .message = markdown_field(abuse_report, :message) %td - if user = link_to _('Remove user & report'), admin_abuse_report_path(abuse_report, remove_user: true), - data: { confirm: _("USER %{user} WILL BE REMOVED! Are you sure?") % { user: user.name } }, remote: true, method: :delete, class: "btn btn-sm btn-block btn-remove js-remove-tr" + data: { confirm: _("USER %{user} WILL BE REMOVED! Are you sure?") % { user: user.name } }, remote: true, method: :delete, class: "gl-button btn btn-sm btn-block btn-danger js-remove-tr" - if user && !user.blocked? - = link_to _('Block user'), block_admin_user_path(user), data: {confirm: _('USER WILL BE BLOCKED! Are you sure?')}, method: :put, class: "btn btn-sm btn-block" + = link_to _('Block user'), block_admin_user_path(user), data: {confirm: _('USER WILL BE BLOCKED! Are you sure?')}, method: :put, class: "gl-button btn btn-sm btn-block" - else .btn.btn-sm.disabled.btn-block = _('Already blocked') - = link_to _('Remove report'), [:admin, abuse_report], remote: true, method: :delete, class: "btn btn-sm btn-block btn-close js-remove-tr" + = link_to _('Remove report'), [:admin, abuse_report], remote: true, method: :delete, class: "gl-button btn btn-sm btn-block btn-close js-remove-tr" diff --git a/app/views/admin/abuse_reports/index.html.haml b/app/views/admin/abuse_reports/index.html.haml index e3d78b3058f..daa766429e0 100644 --- a/app/views/admin/abuse_reports/index.html.haml +++ b/app/views/admin/abuse_reports/index.html.haml @@ -17,7 +17,7 @@ - if @abuse_reports.present? .table-holder %table.table.responsive-table - %thead.d-none.d-sm-none.d-md-table-header-group + %thead.d-none.d-md-table-header-group %tr %th User %th Reported by diff --git a/app/views/admin/application_settings/_abuse.html.haml b/app/views/admin/application_settings/_abuse.html.haml index ddffec32c41..c77615f9040 100644 --- a/app/views/admin/application_settings/_abuse.html.haml +++ b/app/views/admin/application_settings/_abuse.html.haml @@ -3,9 +3,9 @@ %fieldset .form-group - = f.label :admin_notification_email, 'Abuse reports notification email', class: 'label-bold' - = f.text_field :admin_notification_email, class: 'form-control' + = f.label :abuse_notification_email, 'Abuse reports notification email', class: 'label-bold' + = f.text_field :abuse_notification_email, class: 'form-control' .form-text.text-muted Abuse reports will be sent to this address if it is set. Abuse reports are always available in the admin area. - = f.submit 'Save changes', class: "btn btn-success" + = f.submit 'Save changes', class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_account_and_limit.html.haml b/app/views/admin/application_settings/_account_and_limit.html.haml index 184249bcaba..f46eb84ce8e 100644 --- a/app/views/admin/application_settings/_account_and_limit.html.haml +++ b/app/views/admin/application_settings/_account_and_limit.html.haml @@ -60,5 +60,4 @@ = render_if_exists 'admin/application_settings/updating_name_disabled_for_users', form: f = render_if_exists 'admin/application_settings/availability_on_namespace_setting', form: f - .gl-display-flex.gl-justify-content-end - = f.submit _('Save changes'), class: 'btn btn-success qa-save-changes-button' + = f.submit _('Save changes'), class: 'gl-button btn btn-success qa-save-changes-button' diff --git a/app/views/admin/application_settings/_ci_cd.html.haml b/app/views/admin/application_settings/_ci_cd.html.haml index b9cce6c8085..9f384519c3a 100644 --- a/app/views/admin/application_settings/_ci_cd.html.haml +++ b/app/views/admin/application_settings/_ci_cd.html.haml @@ -60,4 +60,4 @@ = _("The default CI configuration path for new projects.").html_safe = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'custom-ci-configuration-path'), target: '_blank' - = f.submit _('Save changes'), class: "btn btn-success" + = f.submit _('Save changes'), class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_diff_limits.html.haml b/app/views/admin/application_settings/_diff_limits.html.haml index 1bf25b6a558..6811c1e10d6 100644 --- a/app/views/admin/application_settings/_diff_limits.html.haml +++ b/app/views/admin/application_settings/_diff_limits.html.haml @@ -12,5 +12,4 @@ = link_to sprite_icon('question-o'), help_page_path('user/admin_area/diff_limits', anchor: 'maximum-diff-patch-size') - .gl-display-flex.gl-justify-content-end - = f.submit _('Save changes'), class: 'btn btn-success' + = f.submit _('Save changes'), class: 'gl-button btn btn-success' diff --git a/app/views/admin/application_settings/_eks.html.haml b/app/views/admin/application_settings/_eks.html.haml index d74afcd3e64..68324425ef9 100644 --- a/app/views/admin/application_settings/_eks.html.haml +++ b/app/views/admin/application_settings/_eks.html.haml @@ -28,4 +28,4 @@ = f.label :eks_secret_access_key, 'Secret access key', class: 'label-bold' = f.password_field :eks_secret_access_key, autocomplete: 'off', class: 'form-control' - = f.submit 'Save changes', class: "btn btn-success" + = f.submit 'Save changes', class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_email.html.haml b/app/views/admin/application_settings/_email.html.haml index 49747f2bfd4..dd1be876505 100644 --- a/app/views/admin/application_settings/_email.html.haml +++ b/app/views/admin/application_settings/_email.html.haml @@ -25,4 +25,4 @@ = render_if_exists 'admin/application_settings/email_additional_text_setting', form: f - = f.submit _('Save changes'), class: "btn btn-success", data: { qa_selector: 'save_changes_button' } + = f.submit _('Save changes'), class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } 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 179eb2d5f2e..c8c1f3e6214 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 @@ -47,5 +47,4 @@ .form-group = f.label :external_authorization_service_default_label, _('Default classification label'), class: 'label-bold' = f.text_field :external_authorization_service_default_label, class: 'form-control' - .gl-display-flex.gl-justify-content-end - = f.submit 'Save changes', class: "btn btn-success" + = f.submit 'Save changes', class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_gitaly.html.haml b/app/views/admin/application_settings/_gitaly.html.haml index fac2de8811f..a0cd70b4d7c 100644 --- a/app/views/admin/application_settings/_gitaly.html.haml +++ b/app/views/admin/application_settings/_gitaly.html.haml @@ -24,4 +24,4 @@ .form-text.text-muted Medium operation timeout (in seconds). This should be a value between the Fast and the Default timeout. - = f.submit 'Save changes', class: "btn btn-success" + = f.submit 'Save changes', class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_gitpod.html.haml b/app/views/admin/application_settings/_gitpod.html.haml index bbad5155ada..f0a1fd5e763 100644 --- a/app/views/admin/application_settings/_gitpod.html.haml +++ b/app/views/admin/application_settings/_gitpod.html.haml @@ -1,6 +1,5 @@ - return unless Gitlab::Gitpod.feature_available? - expanded = integration_expanded?('gitpod_') -- gitpod_link = link_to("Gitpod#{sprite_icon('external-link', size: 12, css_class: 'ml-1 vertical-align-center')}".html_safe, 'https://gitpod.io/', target: '_blank', rel: 'noopener noreferrer') %section.settings.no-animate#js-gitpod-settings{ class: ('expanded' if expanded) } .settings-header @@ -9,7 +8,7 @@ %button.btn.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') %p - = s_('Enable %{gitpod_link} integration to launch a development environment in your browser directly from GitLab.').html_safe % { gitpod_link: gitpod_link } + = gitpod_enable_description = link_to sprite_icon('question-o'), help_page_path('integration/gitpod.md'), target: '_blank', class: 'has-tooltip', title: _('More information') @@ -27,4 +26,4 @@ = f.text_field :gitpod_url, class: 'form-control', placeholder: s_('Gitpod|e.g. https://gitpod.example.com') .form-text.text-muted = s_('Gitpod|Add the URL to your Gitpod instance configured to read your GitLab projects.') - = f.submit s_('Save changes'), class: 'btn btn-success' + = f.submit s_('Save changes'), class: 'gl-button btn btn-success' diff --git a/app/views/admin/application_settings/_grafana.html.haml b/app/views/admin/application_settings/_grafana.html.haml index 80ff5a298b4..bd2b2094311 100644 --- a/app/views/admin/application_settings/_grafana.html.haml +++ b/app/views/admin/application_settings/_grafana.html.haml @@ -14,4 +14,4 @@ = f.label :grafana_url, _('Grafana URL'), class: 'label-bold' = f.text_field :grafana_url, class: 'form-control', placeholder: '/-/grafana' - = f.submit _('Save changes'), class: "btn btn-success" + = f.submit _('Save changes'), class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_help_page.html.haml b/app/views/admin/application_settings/_help_page.html.haml index 5e5ab1e4269..fc31f612b8c 100644 --- a/app/views/admin/application_settings/_help_page.html.haml +++ b/app/views/admin/application_settings/_help_page.html.haml @@ -18,4 +18,9 @@ = f.text_field :help_page_support_url, class: 'form-control', placeholder: 'http://company.example.com/getting-help', :'aria-describedby' => 'support_help_block' %span.form-text.text-muted#support_help_block= _('Alternate support URL for help page and help dropdown') - = f.submit _('Save changes'), class: "btn btn-success" + - if show_documentation_base_url_field? + .form-group + = f.label :help_page_documentation_base_url, _('Documentation pages URL'), class: 'label-bold' + = f.text_field :help_page_documentation_base_url, class: 'form-control', placeholder: 'https://docs.gitlab.com' + + = f.submit _('Save changes'), class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_import_export_limits.html.haml b/app/views/admin/application_settings/_import_export_limits.html.haml index d26c3376391..58218a41282 100644 --- a/app/views/admin/application_settings/_import_export_limits.html.haml +++ b/app/views/admin/application_settings/_import_export_limits.html.haml @@ -31,4 +31,4 @@ = f.label :group_download_export_limit, _('Max Group Export Download requests per minute per user'), class: 'label-bold' = f.number_field :group_download_export_limit, class: 'form-control' - = f.submit 'Save changes', class: "btn btn-success", data: { qa_selector: 'save_changes_button' } + = f.submit 'Save changes', class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_initial_branch_name.html.haml b/app/views/admin/application_settings/_initial_branch_name.html.haml index acbf971e4b9..bab841fcade 100644 --- a/app/views/admin/application_settings/_initial_branch_name.html.haml +++ b/app/views/admin/application_settings/_initial_branch_name.html.haml @@ -10,5 +10,4 @@ %span.form-text.text-muted = (_("Changes affect new repositories only. If not specified, Git's default name %{branch_name_default} will be used.") % { branch_name_default: fallback_branch_name } ).html_safe - .gl-display-flex.gl-justify-content-end - = f.submit _('Save changes'), class: 'gl-button btn-success' + = f.submit _('Save changes'), class: 'gl-button btn-success' diff --git a/app/views/admin/application_settings/_ip_limits.html.haml b/app/views/admin/application_settings/_ip_limits.html.haml index 9512c1837bf..c1565cf42e1 100644 --- a/app/views/admin/application_settings/_ip_limits.html.haml +++ b/app/views/admin/application_settings/_ip_limits.html.haml @@ -42,4 +42,4 @@ = f.label :throttle_authenticated_web_period_in_seconds, 'Rate limit period in seconds', class: 'label-bold' = f.number_field :throttle_authenticated_web_period_in_seconds, class: 'form-control' - = f.submit 'Save changes', class: "btn btn-success", data: { qa_selector: 'save_changes_button' } + = f.submit 'Save changes', class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_issue_limits.html.haml b/app/views/admin/application_settings/_issue_limits.html.haml index b0bdc204f64..200ea3a8ec1 100644 --- a/app/views/admin/application_settings/_issue_limits.html.haml +++ b/app/views/admin/application_settings/_issue_limits.html.haml @@ -6,4 +6,4 @@ = f.label :issues_create_limit, 'Max requests per minute per user', class: 'label-bold' = f.number_field :issues_create_limit, class: 'form-control' - = f.submit 'Save changes', class: "btn btn-success", data: { qa_selector: 'save_changes_button' } + = f.submit 'Save changes', class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_localization.html.haml b/app/views/admin/application_settings/_localization.html.haml index e01c123d1db..5ad7080b22b 100644 --- a/app/views/admin/application_settings/_localization.html.haml +++ b/app/views/admin/application_settings/_localization.html.haml @@ -15,4 +15,4 @@ = f.label :time_tracking_limit_to_hours, class: 'form-check-label' do = _('Limit display of time tracking units to hours.') - = f.submit _('Save changes'), class: "btn btn-success" + = f.submit _('Save changes'), class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_outbound.html.haml b/app/views/admin/application_settings/_outbound.html.haml index b0593b3bfa2..4f38ab3ab7a 100644 --- a/app/views/admin/application_settings/_outbound.html.haml +++ b/app/views/admin/application_settings/_outbound.html.haml @@ -27,4 +27,4 @@ %span.form-text.text-muted = _('Resolves IP addresses once and uses them to submit requests') - = f.submit 'Save changes', class: "btn btn-success", data: { qa_selector: 'save_changes_button' } + = f.submit 'Save changes', class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_pages.html.haml b/app/views/admin/application_settings/_pages.html.haml index 2ee7f3edc97..d42987eb7d8 100644 --- a/app/views/admin/application_settings/_pages.html.haml +++ b/app/views/admin/application_settings/_pages.html.haml @@ -41,4 +41,4 @@ - 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} (PDF)").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: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_performance.html.haml b/app/views/admin/application_settings/_performance.html.haml index 3473c185dbe..2d27bceef10 100644 --- a/app/views/admin/application_settings/_performance.html.haml +++ b/app/views/admin/application_settings/_performance.html.haml @@ -31,4 +31,4 @@ .form-text.text-muted = _('Number of changes (branches or tags) in a single push to determine whether individual push events or bulk push event will be created. Bulk push event will be created if it surpasses that value.') - = f.submit 'Save changes', class: "btn btn-success" + = f.submit 'Save changes', class: "gl-button 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 f8bc29048f2..1036cc94bd0 100644 --- a/app/views/admin/application_settings/_performance_bar.html.haml +++ b/app/views/admin/application_settings/_performance_bar.html.haml @@ -11,4 +11,4 @@ = 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 qa-save-changes-button' + = f.submit 'Save changes', class: 'gl-button btn btn-success qa-save-changes-button' diff --git a/app/views/admin/application_settings/_plantuml.html.haml b/app/views/admin/application_settings/_plantuml.html.haml index f2011257b8c..324f544a108 100644 --- a/app/views/admin/application_settings/_plantuml.html.haml +++ b/app/views/admin/application_settings/_plantuml.html.haml @@ -24,4 +24,4 @@ = link_to "PlantUML", "http://plantuml.com" diagrams in Asciidoc documents using an external PlantUML service. - = f.submit _('Save changes'), class: "btn btn-success" + = f.submit _('Save changes'), class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_prometheus.html.haml b/app/views/admin/application_settings/_prometheus.html.haml index 49f58449d29..c571ec1c1b0 100644 --- a/app/views/admin/application_settings/_prometheus.html.haml +++ b/app/views/admin/application_settings/_prometheus.html.haml @@ -30,4 +30,4 @@ A method call is only tracked when it takes longer to complete than the given amount of milliseconds. - = f.submit 'Save changes', class: "btn btn-success" + = f.submit 'Save changes', class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_protected_paths.html.haml b/app/views/admin/application_settings/_protected_paths.html.haml index 0220570daa9..fce64369f17 100644 --- a/app/views/admin/application_settings/_protected_paths.html.haml +++ b/app/views/admin/application_settings/_protected_paths.html.haml @@ -28,4 +28,4 @@ = _('All paths are relative to the GitLab URL. Do not include %{relative_url_link_start}relative URL%{relative_url_link_end}.').html_safe % { relative_url_link_start: relative_url_link_start, relative_url_link_end: '</a>'.html_safe } = f.text_area :protected_paths_raw, placeholder: '/users/sign_in,/users/password', class: 'form-control', rows: 10 - = f.submit 'Save changes', class: 'btn btn-success' + = f.submit 'Save changes', class: 'gl-button btn btn-success' diff --git a/app/views/admin/application_settings/_realtime.html.haml b/app/views/admin/application_settings/_realtime.html.haml index 0e9731b1c70..cf0b2b53eff 100644 --- a/app/views/admin/application_settings/_realtime.html.haml +++ b/app/views/admin/application_settings/_realtime.html.haml @@ -14,4 +14,4 @@ installations. Set to 0 to completely disable polling. = link_to sprite_icon('question-o'), help_page_path('administration/polling') - = f.submit 'Save changes', class: "btn btn-success" + = f.submit 'Save changes', class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_registry.html.haml b/app/views/admin/application_settings/_registry.html.haml index 7ff2b6e841d..dd64d0ae419 100644 --- a/app/views/admin/application_settings/_registry.html.haml +++ b/app/views/admin/application_settings/_registry.html.haml @@ -21,4 +21,4 @@ .form-text.text-muted = _("Tags are deleted until the timeout is reached. Any remaining tags are included the next time the policy runs. To remove the time limit, set it to 0.") - = f.submit 'Save changes', class: "btn btn-success" + = f.submit 'Save changes', class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_repository_check.html.haml b/app/views/admin/application_settings/_repository_check.html.haml index 6f9d3a889cd..b9c2e406b78 100644 --- a/app/views/admin/application_settings/_repository_check.html.haml +++ b/app/views/admin/application_settings/_repository_check.html.haml @@ -18,8 +18,7 @@ If you got a lot of false alarms from repository checks you can choose to clear all repository check information from the database. - clear_repository_checks_link = _('Clear all repository checks') - clear_repository_checks_message = _('This will clear repository check states for ALL projects in the database. This cannot be undone. Are you sure?') - .gl-display-flex.gl-justify-content-end - = link_to clear_repository_checks_link, clear_repository_check_states_admin_application_settings_path, data: { confirm: clear_repository_checks_message }, method: :put, class: "btn btn-sm btn-remove" + = link_to clear_repository_checks_link, clear_repository_check_states_admin_application_settings_path, data: { confirm: clear_repository_checks_message }, method: :put, class: "gl-button btn btn-sm btn-danger" .sub-section %h4 Housekeeping @@ -56,5 +55,4 @@ .form-text.text-muted Number of Git pushes after which 'git gc' is run. - .gl-display-flex.gl-justify-content-end - = f.submit _('Save changes'), class: "btn btn-success" + = f.submit _('Save changes'), class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_repository_mirrors_form.html.haml b/app/views/admin/application_settings/_repository_mirrors_form.html.haml index d598f173ff3..125fa48bbc3 100644 --- a/app/views/admin/application_settings/_repository_mirrors_form.html.haml +++ b/app/views/admin/application_settings/_repository_mirrors_form.html.haml @@ -14,5 +14,4 @@ = render_if_exists 'admin/application_settings/mirror_settings', form: f - .gl-display-flex.gl-justify-content-end - = f.submit _('Save changes'), class: "btn btn-success" + = f.submit _('Save changes'), class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_repository_static_objects.html.haml b/app/views/admin/application_settings/_repository_static_objects.html.haml index 9bc751adc8b..00b9b4b8964 100644 --- a/app/views/admin/application_settings/_repository_static_objects.html.haml +++ b/app/views/admin/application_settings/_repository_static_objects.html.haml @@ -15,5 +15,4 @@ %span.form-text.text-muted#static_objects_external_storage_auth_token_help_block = _('A secure token that identifies an external storage request.') - .gl-display-flex.gl-justify-content-end - = f.submit _('Save changes'), class: "btn btn-success" + = f.submit _('Save changes'), class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_repository_storage.html.haml b/app/views/admin/application_settings/_repository_storage.html.haml index 0dc8dc0740e..0862d1bf0b6 100644 --- a/app/views/admin/application_settings/_repository_storage.html.haml +++ b/app/views/admin/application_settings/_repository_storage.html.haml @@ -22,5 +22,4 @@ = f.text_field attribute[:name], class: 'form-text-input', value: attribute[:value] = f.label attribute[:label], attribute[:label], class: 'label-bold form-check-label' %br - .gl-display-flex.gl-justify-content-end - = f.submit _('Save changes'), class: "btn btn-success qa-save-changes-button" + = f.submit _('Save changes'), class: "gl-button btn btn-success qa-save-changes-button" diff --git a/app/views/admin/application_settings/_signin.html.haml b/app/views/admin/application_settings/_signin.html.haml index 2a26a0909fd..4a8616beff6 100644 --- a/app/views/admin/application_settings/_signin.html.haml +++ b/app/views/admin/application_settings/_signin.html.haml @@ -57,5 +57,4 @@ = f.label :sign_in_text, class: 'label-bold' = f.text_area :sign_in_text, class: 'form-control', rows: 4 .form-text.text-muted Markdown enabled - .gl-display-flex.gl-justify-content-end - = f.submit 'Save changes', class: "btn btn-success" + = f.submit 'Save changes', class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_signup.html.haml b/app/views/admin/application_settings/_signup.html.haml index 3b88696dc51..98b49a236a3 100644 --- a/app/views/admin/application_settings/_signup.html.haml +++ b/app/views/admin/application_settings/_signup.html.haml @@ -9,6 +9,14 @@ Sign-up enabled .form-text.text-muted = _("When enabled, any user visiting %{host} will be able to create an account.") % { host: "#{new_user_session_url(host: Gitlab.config.gitlab.host)}" } + - if Feature.enabled?(:admin_approval_for_new_user_signups, default_enabled: true) + .form-group + .form-check + = f.check_box :require_admin_approval_after_user_signup, class: 'form-check-input' + = f.label :require_admin_approval_after_user_signup, class: 'form-check-label' do + = _('Require admin approval for new sign-ups') + .form-text.text-muted + = _("When enabled, any user visiting %{host} and creating an account will have to be explicitly approved by an admin before they can sign in. This setting is effective only if sign-ups are enabled.") % { host: "#{new_user_session_url(host: Gitlab.config.gitlab.host)}" } .form-group .form-check = f.check_box :send_user_confirmation_email, class: 'form-check-input' @@ -67,5 +75,4 @@ = f.label :after_sign_up_text, class: 'label-bold' = f.text_area :after_sign_up_text, class: 'form-control', rows: 4 .form-text.text-muted Markdown enabled - .gl-display-flex.gl-justify-content-end - = f.submit 'Save changes', class: "btn btn-success" + = f.submit 'Save changes', class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_snowplow.html.haml b/app/views/admin/application_settings/_snowplow.html.haml index c339d6df363..7c2c5e0b3dc 100644 --- a/app/views/admin/application_settings/_snowplow.html.haml +++ b/app/views/admin/application_settings/_snowplow.html.haml @@ -26,4 +26,4 @@ = f.label :snowplow_cookie_domain, _('Cookie domain'), class: 'label-light' = f.text_field :snowplow_cookie_domain, class: 'form-control' - = f.submit _('Save changes'), class: 'btn btn-success' + = f.submit _('Save changes'), class: 'gl-button btn btn-success' diff --git a/app/views/admin/application_settings/_sourcegraph.html.haml b/app/views/admin/application_settings/_sourcegraph.html.haml index 7650526dfc0..2a4e8f87c31 100644 --- a/app/views/admin/application_settings/_sourcegraph.html.haml +++ b/app/views/admin/application_settings/_sourcegraph.html.haml @@ -35,4 +35,4 @@ = f.text_field :sourcegraph_url, class: 'form-control', placeholder: s_('SourcegraphAdmin|e.g. https://sourcegraph.example.com') .form-text.text-muted = s_('SourcegraphAdmin|Configure the URL to a Sourcegraph instance which can read your GitLab projects.') - = f.submit s_('SourcegraphAdmin|Save changes'), class: 'btn btn-success' + = f.submit s_('SourcegraphAdmin|Save changes'), class: 'gl-button btn btn-success' diff --git a/app/views/admin/application_settings/_spam.html.haml b/app/views/admin/application_settings/_spam.html.haml index ab9368e723e..b54f1d7c829 100644 --- a/app/views/admin/application_settings/_spam.html.haml +++ b/app/views/admin/application_settings/_spam.html.haml @@ -71,4 +71,4 @@ = f.label :spam_check_endpoint_url, _('URL of the external Spam Check endpoint'), class: 'label-bold' = f.text_field :spam_check_endpoint_url, class: 'form-control' - = f.submit 'Save changes', class: "btn btn-success" + = f.submit 'Save changes', class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_terminal.html.haml b/app/views/admin/application_settings/_terminal.html.haml index 25d23ea7a84..7bc5b2405e8 100644 --- a/app/views/admin/application_settings/_terminal.html.haml +++ b/app/views/admin/application_settings/_terminal.html.haml @@ -8,5 +8,4 @@ .form-text.text-muted Maximum time for web terminal websocket connection (in seconds). 0 for unlimited. - .gl-display-flex.gl-justify-content-end - = f.submit 'Save changes', class: "btn btn-success" + = f.submit 'Save changes', class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_terms.html.haml b/app/views/admin/application_settings/_terms.html.haml index a6d03ac1dde..10db1e23d7b 100644 --- a/app/views/admin/application_settings/_terms.html.haml +++ b/app/views/admin/application_settings/_terms.html.haml @@ -15,5 +15,4 @@ = f.text_area :terms, class: 'form-control', rows: 8 .form-text.text-muted = _("Markdown enabled") - .gl-display-flex.gl-justify-content-end - = f.submit _("Save changes"), class: "btn btn-success" + = f.submit _("Save changes"), class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_third_party_offers.html.haml b/app/views/admin/application_settings/_third_party_offers.html.haml index 0ed7341986d..7e3e063118e 100644 --- a/app/views/admin/application_settings/_third_party_offers.html.haml +++ b/app/views/admin/application_settings/_third_party_offers.html.haml @@ -17,4 +17,4 @@ = f.check_box :hide_third_party_offers, class: 'form-check-input' = f.label :hide_third_party_offers, _('Do not display offers from third parties within GitLab'), class: 'form-check-label' - = f.submit _('Save changes'), class: "btn btn-success" + = f.submit _('Save changes'), class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index 4e45db1e10a..2ba7dcefd44 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -33,8 +33,8 @@ %pre.usage-data.js-syntax-highlight.code.highlight.mt-2.d-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } } - else = _('The usage ping is disabled, and cannot be configured through this form.') - - deactivating_usage_ping_path = help_page_path('development/telemetry/usage_ping', anchor: 'disable-usage-ping') + - deactivating_usage_ping_path = help_page_path('development/product_analytics/usage_ping', anchor: 'disable-usage-ping') - deactivating_usage_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: deactivating_usage_ping_path } = s_('For more information, see the documentation on %{deactivating_usage_ping_link_start}deactivating the usage ping%{deactivating_usage_ping_link_end}.').html_safe % { deactivating_usage_ping_link_start: deactivating_usage_ping_link_start, deactivating_usage_ping_link_end: '</a>'.html_safe } - = f.submit 'Save changes', class: "btn btn-success" + = f.submit 'Save changes', class: "gl-button btn btn-success" 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 28208d923db..46d8a8ac9c7 100644 --- a/app/views/admin/application_settings/_visibility_and_access.html.haml +++ b/app/views/admin/application_settings/_visibility_and_access.html.haml @@ -66,5 +66,4 @@ .form-group = f.label field_name, "#{type.upcase} SSH keys", class: 'label-bold' = f.select field_name, key_restriction_options_for_select(type), {}, class: 'form-control' - .gl-display-flex.gl-justify-content-end - = f.submit _('Save changes'), class: "btn btn-success" + = f.submit _('Save changes'), class: "gl-button btn btn-success" diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml index 823cee09d4b..2d336bebc8d 100644 --- a/app/views/admin/application_settings/general.html.haml +++ b/app/views/admin/application_settings/general.html.haml @@ -101,8 +101,7 @@ = s_('IDE|Live Preview') %span.form-text.text-muted = s_('IDE|Allow live previews of JavaScript projects in the Web IDE using CodeSandbox Live Preview.') - .gl-display-flex.gl-justify-content-end - = f.submit _('Save changes'), class: "btn btn-success" + = f.submit _('Save changes'), class: "gl-button btn btn-success" - if Feature.enabled?(:maintenance_mode) %section.settings.no-animate#js-maintenance-mode-toggle{ class: ('expanded' if expanded_by_default?) } diff --git a/app/views/admin/applications/_delete_form.html.haml b/app/views/admin/applications/_delete_form.html.haml index 86f09bf1cb0..d348ad507c2 100644 --- a/app/views/admin/applications/_delete_form.html.haml +++ b/app/views/admin/applications/_delete_form.html.haml @@ -1,4 +1,4 @@ -- submit_btn_css ||= 'btn btn-link btn-remove btn-sm' +- submit_btn_css ||= 'gl-button btn btn-danger btn-sm' = form_tag admin_application_path(application) do %input{ :name => "_method", :type => "hidden", :value => "delete" }/ = submit_tag 'Destroy', class: submit_btn_css, data: { confirm: _('Are you sure?') } diff --git a/app/views/admin/applications/_form.html.haml b/app/views/admin/applications/_form.html.haml index 0d01f1c57e0..0c3a4e73e30 100644 --- a/app/views/admin/applications/_form.html.haml +++ b/app/views/admin/applications/_form.html.haml @@ -40,5 +40,5 @@ = render 'shared/tokens/scopes_form', prefix: 'doorkeeper_application', token: application, scopes: @scopes .form-actions - = f.submit 'Submit', class: "btn btn-success wide" - = link_to "Cancel", admin_applications_path, class: "btn btn-cancel" + = f.submit 'Submit', class: "gl-button btn btn-success wide" + = link_to "Cancel", admin_applications_path, class: "gl-button btn btn-cancel" diff --git a/app/views/admin/applications/index.html.haml b/app/views/admin/applications/index.html.haml index 0119cabf1ad..c1c1c2a4cfe 100644 --- a/app/views/admin/applications/index.html.haml +++ b/app/views/admin/applications/index.html.haml @@ -4,7 +4,7 @@ %p.light System OAuth applications don't belong to any user and can only be managed by admins %hr -%p= link_to 'New application', new_admin_application_path, class: 'btn btn-success' +%p= link_to 'New application', new_admin_application_path, class: 'gl-button btn btn-success' %table.table %thead %tr @@ -23,6 +23,6 @@ %td= @application_counts[application.id].to_i %td= application.trusted? ? 'Y': 'N' %td= application.confidential? ? 'Y': 'N' - %td= link_to 'Edit', edit_admin_application_path(application), class: 'btn btn-link' + %td= link_to 'Edit', edit_admin_application_path(application), class: 'gl-button btn btn-link' %td= render 'delete_form', application: application = paginate @applications, theme: 'gitlab' diff --git a/app/views/admin/applications/show.html.haml b/app/views/admin/applications/show.html.haml index 5259dd56df5..f029da6b3af 100644 --- a/app/views/admin/applications/show.html.haml +++ b/app/views/admin/applications/show.html.haml @@ -13,7 +13,7 @@ .input-group %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"), class: "btn btn btn-default") + = clipboard_button(target: '#application_id', title: _("Copy ID"), class: "gl-button btn btn-default") %tr %td = _('Secret') @@ -22,7 +22,7 @@ .input-group %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"), class: "btn btn btn-default") + = clipboard_button(target: '#secret', title: _("Copy secret"), class: "gl-button btn btn-default") %tr %td = _('Callback URL') @@ -45,5 +45,5 @@ = render "shared/tokens/scopes_list", token: @application .form-actions - = link_to 'Edit', edit_admin_application_path(@application), class: 'btn btn-primary wide float-left' + = link_to 'Edit', edit_admin_application_path(@application), class: 'gl-button btn btn-primary wide float-left' = render 'delete_form', application: @application, submit_btn_css: 'btn btn-danger gl-ml-3' diff --git a/app/views/admin/broadcast_messages/_form.html.haml b/app/views/admin/broadcast_messages/_form.html.haml index 8a937bd66cf..9693a97367f 100644 --- a/app/views/admin/broadcast_messages/_form.html.haml +++ b/app/views/admin/broadcast_messages/_form.html.haml @@ -1,4 +1,4 @@ -.broadcast-message.broadcast-banner-message.alert-warning.js-broadcast-banner-message-preview.mt-2{ style: broadcast_message_style(@broadcast_message), class: ('hidden' unless @broadcast_message.banner? ) } +.broadcast-message.broadcast-banner-message.gl-alert-warning.js-broadcast-banner-message-preview.gl-mt-3{ style: broadcast_message_style(@broadcast_message), class: ('gl-display-none' unless @broadcast_message.banner? ) } = sprite_icon('bullhorn', css_class:'vertical-align-text-top') .js-broadcast-message-preview - if @broadcast_message.message.present? @@ -77,6 +77,6 @@ = f.datetime_select :ends_at, {}, class: 'form-control form-control-inline' .form-actions - if @broadcast_message.persisted? - = f.submit "Update broadcast message", class: "btn btn-success" + = f.submit "Update broadcast message", class: "btn gl-button btn-success" - else - = f.submit "Add broadcast message", class: "btn btn-success" + = f.submit "Add broadcast message", class: "btn gl-button btn-success" diff --git a/app/views/admin/dashboard/_billable_users_text.html.haml b/app/views/admin/dashboard/_billable_users_text.html.haml new file mode 100644 index 00000000000..e9485d23228 --- /dev/null +++ b/app/views/admin/dashboard/_billable_users_text.html.haml @@ -0,0 +1 @@ += s_('AdminArea|Active users') diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 4acfc96caf2..b0d4a3fd8f5 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -19,7 +19,7 @@ %h3.text-center = s_('AdminArea|Projects: %{number_of_projects}') % { number_of_projects: approximate_count_with_delimiters(@counts, Project) } %hr - = link_to(s_('AdminArea|New project'), new_project_path, class: "btn btn-success gl-w-full") + = link_to(s_('AdminArea|New project'), new_project_path, class: "btn gl-button btn-success gl-w-full") .col-sm-4 .info-well.dark-well .well-segment.well-centered @@ -28,8 +28,8 @@ = s_('AdminArea|Users: %{number_of_users}') % { number_of_users: approximate_count_with_delimiters(@counts, User) } %hr .btn-group.d-flex{ role: 'group' } - = link_to s_('AdminArea|New user'), new_admin_user_path, class: "btn btn-success gl-w-full" - = link_to s_('AdminArea|Users statistics'), admin_dashboard_stats_path, class: 'btn btn-primary gl-w-full' + = link_to s_('AdminArea|New user'), new_admin_user_path, class: "btn gl-button btn-success gl-w-full" + = link_to s_('AdminArea|Users statistics'), admin_dashboard_stats_path, class: 'btn gl-button btn-info gl-w-full' .col-sm-4 .info-well.dark-well .well-segment.well-centered @@ -37,7 +37,7 @@ %h3.text-center = s_('AdminArea|Groups: %{number_of_groups}') % { number_of_groups: approximate_count_with_delimiters(@counts, Group) } %hr - = link_to s_('AdminArea|New group'), new_admin_group_path, class: "btn btn-success gl-w-full" + = link_to s_('AdminArea|New group'), new_admin_group_path, class: "btn gl-button btn-success gl-w-full" .row .col-md-4 #js-admin-statistics-container @@ -51,7 +51,7 @@ = feature_entry(_('LDAP'), enabled: Gitlab.config.ldap.enabled, - doc_href: help_page_path('administration/auth/ldap')) + doc_href: help_page_path('administration/auth/ldap/index.md')) = feature_entry(_('Gravatar'), href: general_admin_application_settings_path(anchor: 'js-account-settings'), diff --git a/app/views/admin/dashboard/stats.html.haml b/app/views/admin/dashboard/stats.html.haml index 78707235cb5..9a89bf12365 100644 --- a/app/views/admin/dashboard/stats.html.haml +++ b/app/views/admin/dashboard/stats.html.haml @@ -50,11 +50,9 @@ = s_('AdminArea|Bots') %td.p-3.text-right = @users_statistics&.bots.to_i - %tr.bg-gray-light.gl-text-gray-900 %td.p-3 %strong - = s_('AdminArea|Active users') = render_if_exists 'admin/dashboard/billable_users_text' %td.p-3.text-right %strong diff --git a/app/views/admin/deploy_keys/edit.html.haml b/app/views/admin/deploy_keys/edit.html.haml index 99d8af65068..2a0177ab997 100644 --- a/app/views/admin/deploy_keys/edit.html.haml +++ b/app/views/admin/deploy_keys/edit.html.haml @@ -6,5 +6,5 @@ = form_for [:admin, @deploy_key], html: { class: 'deploy-key-form' } do |f| = render partial: 'shared/deploy_keys/form', locals: { form: f, deploy_key: @deploy_key } .form-actions - = f.submit _('Save changes'), class: 'btn-success btn' - = link_to _('Cancel'), admin_deploy_keys_path, class: 'btn btn-cancel' + = f.submit _('Save changes'), class: 'btn gl-button btn-success' + = link_to _('Cancel'), admin_deploy_keys_path, class: 'btn gl-button btn-cancel' diff --git a/app/views/admin/deploy_keys/index.html.haml b/app/views/admin/deploy_keys/index.html.haml index 3409e2ffc8a..9b6aa278906 100644 --- a/app/views/admin/deploy_keys/index.html.haml +++ b/app/views/admin/deploy_keys/index.html.haml @@ -2,7 +2,7 @@ - if @deploy_keys.any? %h3.page-title.deploy-keys-title = _('Public deploy keys (%{deploy_keys_count})') % { deploy_keys_count: @deploy_keys.load.size } - = link_to _('New deploy key'), new_admin_deploy_key_path, class: 'float-right btn btn-success btn-md gl-button' + = link_to _('New deploy key'), new_admin_deploy_key_path, class: 'float-right btn gl-button btn-success btn-md gl-button' .table-holder.deploy-keys-list %table.table %thead @@ -27,7 +27,7 @@ = _('added %{created_at_timeago}').html_safe % { created_at_timeago: time_ago_with_tooltip(deploy_key.created_at) } %td .float-right - = link_to _('Edit'), edit_admin_deploy_key_path(deploy_key), class: 'btn btn-sm' - = link_to _('Remove'), admin_deploy_key_path(deploy_key), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn btn-sm btn-remove delete-key' + = link_to _('Edit'), edit_admin_deploy_key_path(deploy_key), class: 'btn gl-button btn-sm' + = link_to _('Remove'), admin_deploy_key_path(deploy_key), data: { confirm: _('Are you sure?') }, method: :delete, class: 'gl-button btn btn-sm btn-danger delete-key' - else = render 'shared/empty_states/deploy_keys' diff --git a/app/views/admin/deploy_keys/new.html.haml b/app/views/admin/deploy_keys/new.html.haml index f43c1447f09..5a3b880a596 100644 --- a/app/views/admin/deploy_keys/new.html.haml +++ b/app/views/admin/deploy_keys/new.html.haml @@ -6,5 +6,5 @@ = form_for [:admin, @deploy_key], html: { class: 'deploy-key-form' } do |f| = render partial: 'shared/deploy_keys/form', locals: { form: f, deploy_key: @deploy_key } .form-actions - = f.submit 'Create', class: 'btn-success btn' - = link_to 'Cancel', admin_deploy_keys_path, class: 'btn btn-cancel' + = f.submit 'Create', class: 'btn gl-button btn-success' + = link_to 'Cancel', admin_deploy_keys_path, class: 'btn gl-button btn-cancel' diff --git a/app/views/admin/dev_ops_report/show.html.haml b/app/views/admin/dev_ops_report/show.html.haml index 1892557d0d6..88105be70fb 100644 --- a/app/views/admin/dev_ops_report/show.html.haml +++ b/app/views/admin/dev_ops_report/show.html.haml @@ -1,5 +1,6 @@ - page_title _('DevOps Report') - usage_ping_enabled = Gitlab::CurrentSettings.usage_ping_enabled +- add_page_specific_style 'page_bundles/dev_ops_report' .container - if usage_ping_enabled && show_callout?('dev_ops_report_intro_callout_dismissed') @@ -7,7 +8,7 @@ .gl-mt-3 - if !usage_ping_enabled - #js-devops-empty-state{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_usage_ping_link: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/telemetry/usage_ping') } } + #js-devops-empty-state{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_usage_ping_link: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/product_analytics/usage_ping') } } - elsif @metric.blank? = render 'no_data' - else @@ -25,7 +26,7 @@ - @metric.cards.each do |card| = render 'card', card: card - .devops-steps.d-none.d-lg-block.d-xl-block + .devops-steps.d-none.d-lg-block - @metric.idea_to_production_steps.each_with_index do |step, index| .devops-step{ class: "devops-#{score_level(step.percentage_score)}-score" } = custom_icon("i2p_step_#{index + 1}") diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index 041b0661d37..6174da14ac0 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -29,12 +29,10 @@ .gl-alert-body = render 'shared/group_tips' .form-actions - = f.submit _('Create group'), class: "btn btn-success" - = link_to _('Cancel'), admin_groups_path, class: "btn btn-cancel" + = f.submit _('Create group'), class: "gl-button btn btn-success" + = link_to _('Cancel'), admin_groups_path, class: "gl-button btn btn-cancel" - else .form-actions - = f.submit _('Save changes'), class: "btn btn-success", data: { qa_selector: 'save_changes_button' } - = link_to _('Cancel'), admin_group_path(@group), class: "btn btn-cancel" - -= render_if_exists 'ldap_group_links/ldap_syncrhonizations', group: @group + = f.submit _('Save changes'), class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } + = link_to _('Cancel'), admin_group_path(@group), class: "gl-button btn btn-cancel" diff --git a/app/views/admin/groups/_group.html.haml b/app/views/admin/groups/_group.html.haml index 3a82f3803bd..a667fc7ca04 100644 --- a/app/views/admin/groups/_group.html.haml +++ b/app/views/admin/groups/_group.html.haml @@ -34,4 +34,4 @@ .controls.gl-flex-shrink-0.gl-ml-5 = link_to _('Edit'), admin_group_edit_path(group), id: "edit_#{dom_id(group)}", class: 'btn' - = link_to _('Delete'), [:admin, group], data: { confirm: _("Are you sure you want to remove %{group_name}?") % { group_name: group.name } }, method: :delete, class: 'btn btn-remove' + = link_to _('Delete'), [:admin, group], data: { confirm: _("Are you sure you want to remove %{group_name}?") % { group_name: group.name } }, method: :delete, class: 'gl-button btn btn-danger' diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml index da2b2c60b15..bc4d4e489ce 100644 --- a/app/views/admin/groups/index.html.haml +++ b/app/views/admin/groups/index.html.haml @@ -8,9 +8,9 @@ - project_name = params[:name].present? ? params[:name] : nil .search-field-holder = search_field_tag :name, project_name, class: "form-control search-text-input js-search-input", autofocus: true, spellcheck: false, placeholder: 'Search by name', data: { qa_selector: 'group_search_field' } - = icon("search", class: "search-icon") + = sprite_icon('search', css_class: 'search-icon') = render "shared/groups/dropdown", options_hash: admin_groups_sort_options_hash - = link_to new_admin_group_path, class: "btn btn-success" do + = link_to new_admin_group_path, class: "gl-button btn btn-success" do = _('New group') %ul.content-list = render @groups diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 6c2c0b3a488..424251f543e 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -113,9 +113,9 @@ %div = users_select_tag(:user_ids, multiple: true, email_user: true, skip_ldap: @group.ldap_synced?, scope: :all) .gl-mt-3 - = select_tag :access_level, options_for_select(GroupMember.access_level_roles), class: "project-access-select select2" + = select_tag :access_level, options_for_select(@group.access_level_roles), class: "project-access-select select2" %hr - = button_tag _('Add users to group'), class: "btn btn-success" + = button_tag _('Add users to group'), class: "gl-button btn btn-success" = render 'shared/members/requests', membership_source: @group, requesters: @requesters, force_mobile_view: true .card diff --git a/app/views/admin/health_check/show.html.haml b/app/views/admin/health_check/show.html.haml index 65d3c78ec11..76e4fa971a3 100644 --- a/app/views/admin/health_check/show.html.haml +++ b/app/views/admin/health_check/show.html.haml @@ -9,7 +9,7 @@ %code#health-check-token= Gitlab::CurrentSettings.health_check_access_token .gl-mt-3 = button_to _("Reset health check access token"), reset_health_check_token_admin_application_settings_path, - method: :put, class: 'btn btn-default', + method: :put, class: 'gl-button btn btn-default', data: { confirm: _('Are you sure you want to reset the health check token?') } %p.light #{ _('Health information can be retrieved from the following endpoints. More information is available') } diff --git a/app/views/admin/hook_logs/show.html.haml b/app/views/admin/hook_logs/show.html.haml index a8ef19dcf46..ca2737ca56f 100644 --- a/app/views/admin/hook_logs/show.html.haml +++ b/app/views/admin/hook_logs/show.html.haml @@ -4,6 +4,6 @@ %hr -= link_to _("Resend Request"), retry_admin_hook_hook_log_path(@hook, @hook_log), method: :post, class: "btn btn-default float-right gl-ml-3" += link_to _("Resend Request"), retry_admin_hook_hook_log_path(@hook, @hook_log), method: :post, class: "btn gl-button btn-default float-right gl-ml-3" = render partial: 'shared/hook_logs/content', locals: { hook_log: @hook_log } diff --git a/app/views/admin/hooks/edit.html.haml b/app/views/admin/hooks/edit.html.haml index f9faf5b11fa..74f73b4972a 100644 --- a/app/views/admin/hooks/edit.html.haml +++ b/app/views/admin/hooks/edit.html.haml @@ -9,9 +9,9 @@ = form_for @hook, as: :hook, url: admin_hook_path do |f| = render partial: 'form', locals: { form: f, hook: @hook } .form-actions - %span>= f.submit _('Save changes'), class: 'btn btn-success gl-mr-3' + %span>= f.submit _('Save changes'), class: 'btn gl-button btn-success gl-mr-3' = render 'shared/web_hooks/test_button', hook: @hook - = link_to _('Delete'), admin_hook_path(@hook), method: :delete, class: 'btn btn-remove float-right', data: { confirm: _('Are you sure?') } + = link_to _('Delete'), admin_hook_path(@hook), method: :delete, class: 'btn gl-button btn-danger float-right', data: { confirm: _('Are you sure?') } %hr diff --git a/app/views/admin/hooks/index.html.haml b/app/views/admin/hooks/index.html.haml index d70baa592ea..c0bad6a0a63 100644 --- a/app/views/admin/hooks/index.html.haml +++ b/app/views/admin/hooks/index.html.haml @@ -7,7 +7,7 @@ .col-lg-8.gl-mb-3 = form_for @hook, as: :hook, url: admin_hooks_path do |f| = render partial: 'form', locals: { form: f, hook: @hook } - = f.submit _('Add system hook'), class: 'btn btn-success' + = f.submit _('Add system hook'), class: 'btn gl-button btn-success' = render 'shared/web_hooks/index', hooks: @hooks, hook_class: @hook.class diff --git a/app/views/admin/identities/_form.html.haml b/app/views/admin/identities/_form.html.haml index 40a7014e143..5c62cff27c7 100644 --- a/app/views/admin/identities/_form.html.haml +++ b/app/views/admin/identities/_form.html.haml @@ -14,5 +14,5 @@ = f.text_field :extern_uid, class: 'form-control', required: true .form-actions - = f.submit _('Save changes'), class: "btn btn-success" + = f.submit _('Save changes'), class: "gl-button btn btn-success" diff --git a/app/views/admin/identities/_identity.html.haml b/app/views/admin/identities/_identity.html.haml index 5ed59809db5..d8facbb780a 100644 --- a/app/views/admin/identities/_identity.html.haml +++ b/app/views/admin/identities/_identity.html.haml @@ -4,9 +4,9 @@ %td = identity.extern_uid %td - = link_to edit_admin_user_identity_path(@user, identity), class: 'btn btn-sm btn-grouped' do + = link_to edit_admin_user_identity_path(@user, identity), class: 'gl-button btn btn-sm btn-grouped' do = _("Edit") = link_to [:admin, @user, identity], method: :delete, - class: 'btn btn-sm btn-danger', + class: 'gl-button btn btn-sm btn-danger', data: { confirm: _("Are you sure you want to remove this identity?") } do = _('Delete') diff --git a/app/views/admin/identities/index.html.haml b/app/views/admin/identities/index.html.haml index 9543bbcf977..a6d562dad31 100644 --- a/app/views/admin/identities/index.html.haml +++ b/app/views/admin/identities/index.html.haml @@ -3,7 +3,7 @@ - page_title _("Identities"), @user.name, _("Users") = render 'admin/users/head' -= link_to _('New identity'), new_admin_user_identity_path, class: 'float-right btn btn-success' += link_to _('New identity'), new_admin_user_identity_path, class: 'float-right gl-button btn btn-success' - if @identities.present? .table-holder %table.table diff --git a/app/views/admin/jobs/index.html.haml b/app/views/admin/jobs/index.html.haml index 32c0a801a1d..d482ae04c08 100644 --- a/app/views/admin/jobs/index.html.haml +++ b/app/views/admin/jobs/index.html.haml @@ -8,7 +8,7 @@ - if @all_builds.running_or_pending.any? #stop-jobs-modal .nav-controls - %button#stop-jobs-button.btn.btn-danger{ data: { toggle: 'modal', + %button#stop-jobs-button.btn.gl-button.btn-danger{ data: { toggle: 'modal', target: '#stop-jobs-modal', url: cancel_all_admin_jobs_path } } = s_('AdminArea|Stop all jobs') diff --git a/app/views/admin/labels/_form.html.haml b/app/views/admin/labels/_form.html.haml index 299d0a12e6c..664081339f3 100644 --- a/app/views/admin/labels/_form.html.haml +++ b/app/views/admin/labels/_form.html.haml @@ -27,5 +27,5 @@ = render_suggested_colors .form-actions - = f.submit _('Save'), class: 'btn btn-success js-save-button' - = link_to _("Cancel"), admin_labels_path, class: 'btn btn-cancel' + = f.submit _('Save'), class: 'btn gl-button btn-success js-save-button' + = link_to _("Cancel"), admin_labels_path, class: 'btn gl-button btn-cancel' diff --git a/app/views/admin/labels/_label.html.haml b/app/views/admin/labels/_label.html.haml index 6d934654c5d..b31b9bdab0a 100644 --- a/app/views/admin/labels/_label.html.haml +++ b/app/views/admin/labels/_label.html.haml @@ -1,7 +1,7 @@ %li.label-list-item{ id: dom_id(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 + = link_to edit_admin_label_path(label), class: 'btn gl-button btn-transparent label-action has-tooltip', title: _('Edit'), data: { placement: 'bottom' }, aria_label: _('Edit') do = sprite_icon('pencil') - = link_to admin_label_path(label), class: 'btn btn-transparent remove-row label-action has-tooltip', title: _('Delete'), data: { placement: 'bottom', confirm: "Delete this label? Are you sure?" }, aria_label: _('Delete'), method: :delete, remote: true do + = link_to admin_label_path(label), class: 'btn gl-button btn-transparent remove-row label-action has-tooltip', title: _('Delete'), data: { placement: 'bottom', confirm: "Delete this label? Are you sure?" }, aria_label: _('Delete'), method: :delete, remote: true do = sprite_icon('remove') diff --git a/app/views/admin/labels/index.html.haml b/app/views/admin/labels/index.html.haml index 38137f360fd..76d37626fff 100644 --- a/app/views/admin/labels/index.html.haml +++ b/app/views/admin/labels/index.html.haml @@ -1,7 +1,7 @@ - page_title _("Labels") %div - = link_to new_admin_label_path, class: "float-right btn btn-nr btn-success" do + = link_to new_admin_label_path, class: "float-right btn gl-button btn-nr btn-success" do = _('New label') %h3.page-title = _('Labels') diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml index 08e668e8623..bcf09dfc0d2 100644 --- a/app/views/admin/projects/index.html.haml +++ b/app/views/admin/projects/index.html.haml @@ -30,8 +30,8 @@ = dropdown_content = dropdown_loading = render 'shared/projects/dropdown' - = link_to new_project_path, class: 'btn btn-success' do + = link_to new_project_path, class: 'gl-button btn btn-success' do New Project - = button_tag "Search", class: "btn btn-primary btn-search hide" + = button_tag "Search", class: "gl-button btn btn-primary btn-search hide" = render 'projects' diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index d5af12fcd09..417fd1d60eb 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -13,8 +13,9 @@ - if @project.last_repository_check_failed? .row .col-md-12 - .card - .card-header.alert.alert-danger + .gl-alert.gl-alert-danger.gl-mb-5 + = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-body - last_check_message = _("Last repository check (%{last_check_timestamp}) failed. See the 'repocheck.log' file for error messages.") - last_check_message = last_check_message % { last_check_timestamp: time_ago_with_tooltip(@project.last_repository_check_at) } = last_check_message.html_safe @@ -148,7 +149,7 @@ .form-group.row .offset-sm-3.col-sm-9 - = f.submit _('Transfer'), class: 'btn btn-primary' + = f.submit _('Transfer'), class: 'gl-button btn btn-primary' .card.repository-check .card-header @@ -168,7 +169,7 @@ = link_to sprite_icon('question-o'), help_page_path('administration/repository_checks') .form-group - = f.submit _('Trigger repository check'), class: 'btn btn-primary' + = f.submit _('Trigger repository check'), class: 'gl-button btn btn-primary' .col-md-6 - if @group diff --git a/app/views/admin/runners/_runner.html.haml b/app/views/admin/runners/_runner.html.haml index a2b736c332c..cc8ac6b0642 100644 --- a/app/views/admin/runners/_runner.html.haml +++ b/app/views/admin/runners/_runner.html.haml @@ -65,15 +65,15 @@ .table-section.table-button-footer.section-10 .btn-group.table-action-buttons .btn-group - = link_to admin_runner_path(runner), class: 'btn btn-default has-tooltip', title: _('Edit'), ref: 'tooltip', aria: { label: _('Edit') }, data: { placement: 'top', container: 'body'} do + = link_to admin_runner_path(runner), class: 'gl-button btn btn-default has-tooltip', title: _('Edit'), ref: 'tooltip', aria: { label: _('Edit') }, data: { placement: 'top', container: 'body'} do = sprite_icon('pencil') .btn-group - if runner.active? - = link_to [:pause, :admin, runner], method: :get, class: 'btn btn-default btn-svg has-tooltip', title: _('Pause'), ref: 'tooltip', aria: { label: _('Pause') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do + = link_to [:pause, :admin, runner], method: :get, class: 'gl-button btn btn-default btn-svg has-tooltip', title: _('Pause'), ref: 'tooltip', aria: { label: _('Pause') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do = sprite_icon('pause') - else - = link_to [:resume, :admin, runner], method: :get, class: 'btn btn-default btn-svg has-tooltip gl-px-3', title: _('Resume'), ref: 'tooltip', aria: { label: _('Resume') }, data: { placement: 'top', container: 'body'} do + = link_to [:resume, :admin, runner], method: :get, class: 'gl-button btn btn-default btn-svg has-tooltip gl-px-3', title: _('Resume'), ref: 'tooltip', aria: { label: _('Resume') }, data: { placement: 'top', container: 'body'} do = sprite_icon('play') .btn-group - = link_to [:admin, runner], method: :delete, class: 'btn btn-danger has-tooltip', title: _('Remove'), ref: 'tooltip', aria: { label: _('Remove') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do + = link_to [:admin, runner], method: :delete, class: 'gl-button btn btn-danger has-tooltip', title: _('Remove'), ref: 'tooltip', aria: { label: _('Remove') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do = sprite_icon('close') diff --git a/app/views/admin/runners/index.html.haml b/app/views/admin/runners/index.html.haml index cc218aefdb7..3d3b8c28a17 100644 --- a/app/views/admin/runners/index.html.haml +++ b/app/views/admin/runners/index.html.haml @@ -48,7 +48,7 @@ .filtered-search-box = dropdown_tag(_('Recent searches'), options: { wrapper_class: 'filtered-search-history-dropdown-wrapper', - toggle_class: 'btn filtered-search-history-dropdown-toggle-button', + toggle_class: 'gl-button btn filtered-search-history-dropdown-toggle-button', dropdown_class: 'filtered-search-history-dropdown', content_class: 'filtered-search-history-dropdown-content' }) do .js-filtered-search-history-dropdown{ data: { full_path: admin_runners_path } } @@ -60,7 +60,7 @@ #js-dropdown-hint.filtered-search-input-dropdown-menu.dropdown-menu.hint-dropdown %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } %li.filter-dropdown-item{ data: {hint: "#{'{{hint}}'}", tag: "#{'{{tag}}'}", action: "#{'{{hint === \'search\' ? \'submit\' : \'\' }}'}" } } - = button_tag class: %w[btn btn-link] do + = button_tag class: %w[gl-button btn btn-link] do -# Encapsulate static class name `{{icon}}` inside #{} to bypass -# haml lint's ClassAttributeWithStaticValue %svg @@ -78,21 +78,21 @@ %ul{ data: { dropdown: true } } - Ci::Runner::AVAILABLE_STATUSES.each do |status| %li.filter-dropdown-item{ data: { value: status } } - = button_tag class: %w[btn btn-link] do + = button_tag class: %w[gl-button btn btn-link] do = status.titleize #js-dropdown-admin-runner-type.filtered-search-input-dropdown-menu.dropdown-menu %ul{ data: { dropdown: true } } - Ci::Runner::AVAILABLE_TYPES.each do |runner_type| %li.filter-dropdown-item{ data: { value: runner_type } } - = button_tag class: %w[btn btn-link] do + = button_tag class: %w[gl-button btn btn-link] do = runner_type.titleize #js-dropdown-admin-runner-type.filtered-search-input-dropdown-menu.dropdown-menu %ul{ data: { dropdown: true } } - Ci::Runner::AVAILABLE_TYPES.each do |runner_type| %li.filter-dropdown-item{ data: { value: runner_type } } - = button_tag class: %w[btn btn-link] do + = button_tag class: %w[gl-button btn btn-link] do = runner_type.titleize #js-dropdown-runner-tag.filtered-search-input-dropdown-menu.dropdown-menu diff --git a/app/views/admin/runners/show.html.haml b/app/views/admin/runners/show.html.haml index cecf3f137ed..2c4befb1be2 100644 --- a/app/views/admin/runners/show.html.haml +++ b/app/views/admin/runners/show.html.haml @@ -49,7 +49,7 @@ = project.full_name %td .float-right - = link_to 'Disable', admin_namespace_project_runner_project_path(project.namespace, project, runner_project), method: :delete, class: 'btn btn-danger btn-sm' + = link_to 'Disable', admin_namespace_project_runner_project_path(project.namespace, project, runner_project), method: :delete, class: 'gl-button btn btn-danger btn-sm' %table.table.unassigned-projects %thead @@ -73,7 +73,7 @@ .float-right = form_for project.runner_projects.new, url: admin_namespace_project_runner_projects_path(project.namespace, project), method: :post do |f| = f.hidden_field :runner_id, value: @runner.id - = f.submit 'Enable', class: 'btn btn-sm' + = f.submit 'Enable', class: 'gl-button btn btn-sm' = paginate_without_count @projects .col-md-6 diff --git a/app/views/admin/serverless/domains/_form.html.haml b/app/views/admin/serverless/domains/_form.html.haml index 9e7990ef8ca..8f0dd0cab8e 100644 --- a/app/views/admin/serverless/domains/_form.html.haml +++ b/app/views/admin/serverless/domains/_form.html.haml @@ -16,7 +16,7 @@ - text, status = @domain.unverified? ? [_('Unverified'), 'badge-danger'] : [_('Verified'), 'badge-success'] .badge{ class: status } = text - = link_to sprite_icon("redo"), verify_admin_serverless_domain_path(@domain.id), method: :post, class: "btn has-tooltip", title: _("Retry verification") + = link_to sprite_icon("redo"), verify_admin_serverless_domain_path(@domain.id), method: :post, class: "gl-button btn has-tooltip", title: _("Retry verification") .col-sm-6 = f.label :serverless_domain_dns, _('DNS'), class: 'label-bold' @@ -50,7 +50,7 @@ .d-flex.justify-content-between.align-items-center.p-3 %span = @domain.subject || _('missing') - %button.btn.btn-remove.btn-sm.js-domain-cert-replace-btn{ type: 'button' } + %button.gl-button.btn.btn-danger.btn-sm.js-domain-cert-replace-btn{ type: 'button' } = _('Replace') .js-domain-cert-inputs{ class: ('hidden' if show_certificate_card) } @@ -65,9 +65,9 @@ %span.form-text.text-muted = _("Upload a private key for your certificate") - = f.submit @domain.persisted? ? _('Save changes') : _('Add domain'), class: "btn btn-success js-serverless-domain-submit", disabled: @domain.persisted? + = f.submit @domain.persisted? ? _('Save changes') : _('Add domain'), class: "gl-button btn btn-success js-serverless-domain-submit", disabled: @domain.persisted? - if @domain.persisted? - %button.btn.btn-remove{ type: 'button', data: { toggle: 'modal', target: "#modal-delete-domain" } } + %button.gl-button.btn.btn-danger{ type: 'button', data: { toggle: 'modal', target: "#modal-delete-domain" } } = _('Delete domain') -# haml-lint:disable NoPlainNodes @@ -88,12 +88,12 @@ = _("You are about to delete %{domain} from your instance. This domain will no longer be available to any Knative application.").html_safe % { domain: "<code>#{@domain.domain}</code>".html_safe } .modal-footer - %a{ href: '#', data: { dismiss: 'modal' }, class: 'btn btn-default' } + %a{ href: '#', data: { dismiss: 'modal' }, class: 'gl-button btn btn-default' } = _('Cancel') = link_to _('Delete domain'), admin_serverless_domain_path(@domain.id), title: _('Delete'), method: :delete, - class: "btn btn-remove", + class: "gl-button btn btn-danger", disabled: domain_attached diff --git a/app/views/admin/sessions/_new_base.html.haml b/app/views/admin/sessions/_new_base.html.haml index 5be1c90d6aa..47ef4f26889 100644 --- a/app/views/admin/sessions/_new_base.html.haml +++ b/app/views/admin/sessions/_new_base.html.haml @@ -4,4 +4,4 @@ = password_field_tag 'user[password]', nil, class: 'form-control', required: true, title: _('This field is required.'), data: { qa_selector: 'password_field' } .submit-container.move-submit-down - = submit_tag _('Enter Admin Mode'), class: 'btn btn-success', data: { qa_selector: 'enter_admin_mode_button' } + = submit_tag _('Enter Admin Mode'), class: 'gl-button btn btn-success', data: { qa_selector: 'enter_admin_mode_button' } diff --git a/app/views/admin/sessions/_two_factor_otp.html.haml b/app/views/admin/sessions/_two_factor_otp.html.haml index 8d5588de06e..3fe6e20a367 100644 --- a/app/views/admin/sessions/_two_factor_otp.html.haml +++ b/app/views/admin/sessions/_two_factor_otp.html.haml @@ -6,4 +6,4 @@ = _("Enter the code from the two-factor app on your mobile device. If you've lost your device, you may enter one of your recovery codes.") .submit-container.move-submit-down - = submit_tag 'Verify code', class: 'btn btn-success' + = submit_tag 'Verify code', class: 'gl-button btn btn-success' diff --git a/app/views/admin/spam_logs/_spam_log.html.haml b/app/views/admin/spam_logs/_spam_log.html.haml index 9d47dc1cce5..2e7114ddab4 100644 --- a/app/views/admin/spam_logs/_spam_log.html.haml +++ b/app/views/admin/spam_logs/_spam_log.html.haml @@ -24,16 +24,16 @@ %td - if user = link_to 'Remove user', admin_spam_log_path(spam_log, remove_user: true), - data: { confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-sm btn-remove" + data: { confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "gl-button btn btn-sm btn-danger" %td - if spam_log.submitted_as_ham? .btn.btn-sm.disabled Submitted as ham - else - = link_to 'Submit as ham', mark_as_ham_admin_spam_log_path(spam_log), method: :post, class: 'btn btn-sm btn-warning' + = link_to 'Submit as ham', mark_as_ham_admin_spam_log_path(spam_log), method: :post, class: 'gl-button btn btn-sm btn-warning' - if user && !user.blocked? - = link_to 'Block user', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-sm" + = link_to 'Block user', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "gl-button btn btn-sm" - else .btn.btn-sm.disabled Already blocked - = link_to 'Remove log', [:admin, spam_log], remote: true, method: :delete, class: "btn btn-sm btn-close js-remove-tr" + = link_to 'Remove log', [:admin, spam_log], remote: true, method: :delete, class: "gl-button btn btn-sm btn-close js-remove-tr" diff --git a/app/views/admin/users/_approve_user.html.haml b/app/views/admin/users/_approve_user.html.haml new file mode 100644 index 00000000000..b4d960d909c --- /dev/null +++ b/app/views/admin/users/_approve_user.html.haml @@ -0,0 +1,7 @@ +.card.border-info + .card-header.gl-bg-blue-500.gl-text-white + = s_('AdminUsers|This user has requested access') + .card-body + = render partial: 'admin/users/user_approve_effects' + %br + = link_to s_('AdminUsers|Approve user'), approve_admin_user_path(user), method: :put, class: "btn gl-button btn-info", data: { confirm: s_('AdminUsers|Are you sure?') } diff --git a/app/views/admin/users/_block_user.html.haml b/app/views/admin/users/_block_user.html.haml new file mode 100644 index 00000000000..b07a72c3e28 --- /dev/null +++ b/app/views/admin/users/_block_user.html.haml @@ -0,0 +1,11 @@ +.card.border-warning + .card-header.bg-warning.text-white + = s_('AdminUsers|Block this user') + .card-body + = render partial: 'admin/users/user_block_effects' + %br + %button.btn.gl-button.btn-warning{ data: { 'gl-modal-action': 'block', + content: s_('AdminUsers|You can always unblock their account, their data will remain intact.'), + url: block_admin_user_path(user), + username: sanitize_name(user.name) } } + = s_('AdminUsers|Block user') diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 9e31c8d2852..61c31d2d864 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -88,7 +88,7 @@ .form-actions - if @user.new_record? = f.submit 'Create user', class: "btn gl-button btn-success" - = link_to 'Cancel', admin_users_path, class: "btn btn-cancel" + = link_to 'Cancel', admin_users_path, class: "gl-button btn btn-cancel" - else = f.submit 'Save changes', class: "btn gl-button btn-success" = link_to 'Cancel', admin_user_path(@user), class: "btn gl-button btn-cancel" diff --git a/app/views/admin/users/_head.html.haml b/app/views/admin/users/_head.html.haml index a60dbd51935..4abcdef7e27 100644 --- a/app/views/admin/users/_head.html.haml +++ b/app/views/admin/users/_head.html.haml @@ -1,13 +1,20 @@ %h3.page-title = @user.name - - if @user.blocked? - %span.cred (Blocked) + - if @user.blocked_pending_approval? + %span.cred + = s_('AdminUsers|(Pending approval)') + - elsif @user.blocked? + %span.cred + = s_('AdminUsers|(Blocked)') - if @user.internal? - %span.cred (Internal) + %span.cred + = s_('AdminUsers|(Internal)') - if @user.admin - %span.cred (Admin) + %span.cred + = s_('AdminUsers|(Admin)') - if @user.deactivated? - %span.cred (Deactivated) + %span.cred + = s_('AdminUsers|(Deactivated)') = render_if_exists 'admin/users/audtior_user_badge' .float-right diff --git a/app/views/admin/users/_modals.html.haml b/app/views/admin/users/_modals.html.haml index 6cf6dc116e3..a8e5d962e5b 100644 --- a/app/views/admin/users/_modals.html.haml +++ b/app/views/admin/users/_modals.html.haml @@ -25,6 +25,6 @@ 'secondary-action': s_('AdminUsers|Block user') } } = s_('AdminUsers|You are about to permanently delete the user %{username}. This will delete all of the issues, merge requests, and groups linked to them. To avoid data loss, - consider using the %{strong_start}block user%{strong_end} feature instead. Once you %{strong_start}Delete user%{strong_end}, + consider using the %{strongStart}block user%{strongEnd} feature instead. Once you %{strongStart}Delete user%{strongEnd}, it cannot be undone or recovered.') diff --git a/app/views/admin/users/_user.html.haml b/app/views/admin/users/_user.html.haml index 160303890f5..70ab95bfa61 100644 --- a/app/views/admin/users/_user.html.haml +++ b/app/views/admin/users/_user.html.haml @@ -4,7 +4,12 @@ = _('Name') .table-mobile-content = render 'user_detail', user: user - .table-section.section-25 + .table-section.section-10 + .table-mobile-header{ role: 'rowheader' } + = _('Projects') + .table-mobile-content.gl-str-truncated{ data: { testid: "user-project-count-#{user.id}" } } + = user.authorized_projects.length + .table-section.section-15 .table-mobile-header{ role: 'rowheader' } = _('Created on') .table-mobile-content @@ -30,15 +35,22 @@ %span.small = s_('AdminUsers|Cannot unblock LDAP blocked users') - elsif user.blocked? - = link_to _('Unblock'), unblock_admin_user_path(user), method: :put + - if user.blocked_pending_approval? + = link_to s_('AdminUsers|Approve'), approve_admin_user_path(user), method: :put + %button.btn.btn-default-tertiary{ data: { 'gl-modal-action': 'block', + url: block_admin_user_path(user), + username: sanitize_name(user.name) } } + = s_('AdminUsers|Block') + - else + = link_to _('Unblock'), unblock_admin_user_path(user), method: :put - else - %button.btn.gl-button.btn-default-tertiary{ data: { 'gl-modal-action': 'block', + %button.btn.btn-default-tertiary{ data: { 'gl-modal-action': 'block', url: block_admin_user_path(user), username: sanitize_name(user.name) } } = s_('AdminUsers|Block') - if user.can_be_deactivated? %li - %button.btn.gl-button.btn-default-tertiary{ data: { 'gl-modal-action': 'deactivate', + %button.btn.btn-default-tertiary{ data: { 'gl-modal-action': 'deactivate', url: deactivate_admin_user_path(user), username: sanitize_name(user.name) } } = s_('AdminUsers|Deactivate') @@ -52,13 +64,13 @@ %li.divider - if user.can_be_removed? %li - %button.delete-user-button.btn.gl-button.btn-default-tertiary.text-danger{ data: { 'gl-modal-action': 'delete', + %button.delete-user-button.btn.btn-default-tertiary.text-danger{ data: { 'gl-modal-action': 'delete', delete_user_url: admin_user_path(user), block_user_url: block_admin_user_path(user), username: sanitize_name(user.name) } } = s_('AdminUsers|Delete user') %li - %button.delete-user-button.btn.gl-button.btn-default-tertiary.text-danger{ data: { 'gl-modal-action': 'delete-with-contributions', + %button.delete-user-button.btn.btn-default-tertiary.text-danger{ data: { 'gl-modal-action': 'delete-with-contributions', delete_user_url: admin_user_path(user, hard_delete: true), block_user_url: block_admin_user_path(user), username: sanitize_name(user.name) } } diff --git a/app/views/admin/users/_user_approve_effects.html.haml b/app/views/admin/users/_user_approve_effects.html.haml new file mode 100644 index 00000000000..54e51bf3467 --- /dev/null +++ b/app/views/admin/users/_user_approve_effects.html.haml @@ -0,0 +1,11 @@ +%p + = s_('AdminUsers|Approved users can:') +%ul + %li + = s_('AdminUsers|Log in') + %li + = s_('AdminUsers|Access Git repositories') + %li + = s_('AdminUsers|Access the API') + %li + = s_('AdminUsers|Be added to groups and projects') diff --git a/app/views/admin/users/_user_detail.html.haml b/app/views/admin/users/_user_detail.html.haml index 3839231cb95..3bafd1cb396 100644 --- a/app/views/admin/users/_user_detail.html.haml +++ b/app/views/admin/users/_user_detail.html.haml @@ -15,3 +15,5 @@ .row-second-line.str-truncated-100 = mail_to user.email, user.email, class: 'text-secondary' + - unless Feature.disabled?(:security_auto_fix) || !user.internal? || user.website_url.blank? + = link_to "(#{_('more information')})", user.website_url diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index 118bdf7bb17..33faef92646 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -30,6 +30,11 @@ = link_to admin_users_path(filter: "blocked") do = s_('AdminUsers|Blocked') %small.badge.badge-pill= limited_counter_with_delimiter(User.blocked) + - if Feature.enabled?(:admin_approval_for_new_user_signups, default_enabled: true) + = nav_link(html_options: { class: "#{active_when(params[:filter] == 'blocked_pending_approval')} filter-blocked-pending-approval" }) do + = link_to admin_users_path(filter: "blocked_pending_approval") do + = s_('AdminUsers|Pending approval') + %small.badge.badge-pill= limited_counter_with_delimiter(User.blocked_pending_approval) = nav_link(html_options: { class: active_when(params[:filter] == 'deactivated') }) do = link_to admin_users_path(filter: "deactivated") do = s_('AdminUsers|Deactivated') @@ -51,7 +56,7 @@ = search_field_tag :search_query, params[:search_query], placeholder: s_('AdminUsers|Search by name, email or username'), class: 'form-control search-text-input js-search-input', spellcheck: false, data: { qa_selector: 'user_search_field' } - if @sort.present? = hidden_field_tag :sort, @sort - = icon("search", class: "search-icon") + = sprite_icon('search', css_class: 'search-icon') = button_tag s_('AdminUsers|Search users') if Rails.env.test? .dropdown.user-sort-dropdown = label_tag 'Sort by', nil, class: 'label-bold' @@ -72,7 +77,8 @@ .table-holder .thead-white.text-nowrap.gl-responsive-table-row.table-row-header{ role: 'row' } .table-section.section-40{ role: 'rowheader' }= _('Name') - .table-section.section-25{ role: 'rowheader' }= _('Created on') + .table-section.section-10{ role: 'rowheader' }= _('Projects') + .table-section.section-15{ role: 'rowheader' }= _('Created on') .table-section.section-15{ role: 'rowheader' }= _('Last activity') = render partial: 'admin/users/user', collection: @users diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index a08c29714e0..9c6f151a6b1 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -54,7 +54,7 @@ %strong{ class: @user.two_factor_enabled? ? 'cgreen' : 'cred' } - if @user.two_factor_enabled? Enabled - = link_to 'Disable', disable_two_factor_admin_user_path(@user), data: {confirm: 'Are you sure?'}, method: :patch, class: 'btn gl-button btn-sm btn-remove float-right', title: 'Disable Two-factor Authentication' + = link_to 'Disable', disable_two_factor_admin_user_path(@user), data: {confirm: 'Are you sure?'}, method: :patch, class: 'btn gl-button btn-sm btn-danger float-right', title: 'Disable Two-factor Authentication' - else Disabled @@ -137,7 +137,7 @@ .col-md-6 - unless @user == current_user - - unless @user.confirmed? + - if can_force_email_confirmation?(@user) .card.border-info .card-header.bg-info.text-white Confirm user @@ -150,50 +150,46 @@ = render 'admin/users/user_detail_note' - - if @user.deactivated? - .card.border-info - .card-header.bg-info.text-white - Reactivate this user - .card-body - = render partial: 'admin/users/user_activation_effects' - %br - = link_to 'Activate user', activate_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: 'Are you sure?' } - - elsif @user.can_be_deactivated? - .card.border-warning - .card-header.bg-warning.text-white - Deactivate this user - .card-body - = render partial: 'admin/users/user_deactivation_effects' - %br - %button.btn.gl-button.btn-warning{ data: { 'gl-modal-action': 'deactivate', - content: 'You can always re-activate their account, their data will remain intact.', - url: deactivate_admin_user_path(@user), - username: sanitize_name(@user.name) } } - = s_('AdminUsers|Deactivate user') + - unless @user.internal? + - if @user.deactivated? + .card.border-info + .card-header.bg-info.text-white + Reactivate this user + .card-body + = render partial: 'admin/users/user_activation_effects' + %br + = link_to 'Activate user', activate_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: 'Are you sure?' } + - elsif @user.can_be_deactivated? + .card.border-warning + .card-header.bg-warning.text-white + Deactivate this user + .card-body + = render partial: 'admin/users/user_deactivation_effects' + %br + %button.btn.gl-button.btn-warning{ data: { 'gl-modal-action': 'deactivate', + content: 'You can always re-activate their account, their data will remain intact.', + url: deactivate_admin_user_path(@user), + username: sanitize_name(@user.name) } } + = s_('AdminUsers|Deactivate user') - if @user.blocked? - .card.border-info - .card-header.bg-info.text-white - This user is blocked - .card-body - %p A blocked user cannot: - %ul - %li Log in - %li Access Git repositories - %br - = link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: 'Are you sure?' } - - else - .card.border-warning - .card-header.bg-warning.text-white - Block this user - .card-body - = render partial: 'admin/users/user_block_effects' - %br - %button.btn.gl-button.btn-warning{ data: { 'gl-modal-action': 'block', - content: 'You can always unblock their account, their data will remain intact.', - url: block_admin_user_path(@user), - username: sanitize_name(@user.name) } } - = s_('AdminUsers|Block user') + - if @user.blocked_pending_approval? + = render 'admin/users/approve_user', user: @user + = render 'admin/users/block_user', user: @user + - else + .card.border-info + .card-header.gl-bg-blue-500.gl-text-white + This user is blocked + .card-body + %p A blocked user cannot: + %ul + %li Log in + %li Access Git repositories + %br + = link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: s_('AdminUsers|Are you sure?') } + - elsif !@user.internal? + = render 'admin/users/block_user', user: @user + - if @user.access_locked? .card.border-info .card-header.bg-info.text-white |