diff options
Diffstat (limited to 'app/views/admin')
21 files changed, 149 insertions, 249 deletions
diff --git a/app/views/admin/application_settings/_kroki.html.haml b/app/views/admin/application_settings/_kroki.html.haml index f1f6dd34401..e1f5802a407 100644 --- a/app/views/admin/application_settings/_kroki.html.haml +++ b/app/views/admin/application_settings/_kroki.html.haml @@ -32,4 +32,4 @@ - kroki_available_formats.each do |format| = f.gitlab_ui_checkbox_component format[:name], format[:label] - = f.submit _('Save changes'), class: "btn gl-button btn-confirm" + = f.submit _('Save changes'), pajamas_button: true diff --git a/app/views/admin/application_settings/_repository_check.html.haml b/app/views/admin/application_settings/_repository_check.html.haml index 332d3a94b92..b67cc29f296 100644 --- a/app/views/admin/application_settings/_repository_check.html.haml +++ b/app/views/admin/application_settings/_repository_check.html.haml @@ -19,33 +19,15 @@ %h4= _("Housekeeping") .form-group - help_text = _("Run housekeeping tasks to automatically optimize Git repositories. Disabling this option will cause performance to degenerate over time.") - - help_link = link_to _('Learn more.'), help_page_path('administration/housekeeping.md', anchor: 'configure-push-based-maintenance'), target: '_blank', rel: 'noopener noreferrer' + - help_link = link_to _('Learn more.'), help_page_path('administration/housekeeping.md', anchor: 'heuristical-housekeeping'), target: '_blank', rel: 'noopener noreferrer' = f.gitlab_ui_checkbox_component :housekeeping_enabled, _("Enable automatic repository housekeeping"), help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text, help_link: help_link } - - if Feature.enabled?(:optimized_housekeeping) - .form-group - = f.label :housekeeping_incremental_repack_period, _('Optimize repository period'), class: 'label-bold' - = f.number_field :housekeeping_incremental_repack_period, class: 'form-control gl-form-input' - .form-text.text-muted - = _('Number of Git pushes after which Gitaly is asked to optimize a repository.') - - else - .form-group - = f.label :housekeeping_incremental_repack_period, 'Incremental repack period', class: 'label-bold' - = f.number_field :housekeeping_incremental_repack_period, class: 'form-control gl-form-input' - .form-text.text-muted - = html_escape(s_('Number of Git pushes after which an incremental %{code_start}git repack%{code_end} is run.')) % { code_start: '<code>'.html_safe, code_end: '</code>'.html_safe } - .form-group - = f.label :housekeeping_full_repack_period, 'Full repack period', class: 'label-bold' - = f.number_field :housekeeping_full_repack_period, class: 'form-control gl-form-input' - .form-text.text-muted - = html_escape(s_('Number of Git pushes after which a full %{code_start}git repack%{code_end} is run.')) % { code_start: '<code>'.html_safe, code_end: '</code>'.html_safe } - .form-group - = f.label :housekeeping_gc_period, _('Git GC period'), class: 'label-bold' - = f.number_field :housekeeping_gc_period, class: 'form-control gl-form-input' - .form-text.text-muted - = html_escape(s_('Number of Git pushes after which %{code_start}git gc%{code_end} is run.')) % { code_start: '<code>'.html_safe, code_end: '</code>'.html_safe } - + .form-group + = f.label :housekeeping_optimize_repository_period, _('Optimize repository period'), class: 'label-bold' + = f.number_field :housekeeping_optimize_repository_period, class: 'form-control gl-form-input' + .form-text.text-muted + = _('Number of Git pushes after which Gitaly is asked to optimize a repository.') .sub-section %h4= s_("AdminSettings|Inactive project deletion") .js-inactive-project-deletion-form{ data: inactive_projects_deletion_data(@application_setting) } diff --git a/app/views/admin/application_settings/_user_restrictions.html.haml b/app/views/admin/application_settings/_user_restrictions.html.haml index 82f5e6def9f..c35056383fa 100644 --- a/app/views/admin/application_settings/_user_restrictions.html.haml +++ b/app/views/admin/application_settings/_user_restrictions.html.haml @@ -4,3 +4,4 @@ = label_tag _('User restrictions') = render_if_exists 'admin/application_settings/updating_name_disabled_for_users', form: form = form.gitlab_ui_checkbox_component :can_create_group, _("Allow new users to create top-level groups") + = form.gitlab_ui_checkbox_component :user_defaults_to_private_profile, _("Make new users' profiles private by default") 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 9c8770b8998..e01126e32e1 100644 --- a/app/views/admin/application_settings/_visibility_and_access.html.haml +++ b/app/views/admin/application_settings/_visibility_and_access.html.haml @@ -41,7 +41,7 @@ = f.gitlab_ui_checkbox_component :project_export_enabled, s_('AdminSettings|Enabled') .form-group{ data: { testid: 'bulk-import' } } - = f.label :bulk_import, s_('AdminSettings|Enable migrating GitLab groups and projects by direct transfer'), class: 'gl-font-weight-bold' + = f.label :bulk_import, s_('AdminSettings|Allow migrating GitLab groups and projects by direct transfer'), class: 'gl-font-weight-bold' = f.gitlab_ui_checkbox_component :bulk_import_enabled, s_('AdminSettings|Enabled') .form-group diff --git a/app/views/admin/application_settings/ci/_header.html.haml b/app/views/admin/application_settings/ci/_header.html.haml index 79c07f491fc..9e8caf0e0b7 100644 --- a/app/views/admin/application_settings/ci/_header.html.haml +++ b/app/views/admin/application_settings/ci/_header.html.haml @@ -8,13 +8,13 @@ %p = _('Variables store information, like passwords and secret keys, that you can use in job scripts. All projects on the instance can use these variables.') - = link_to _('Learn more.'), help_page_path('ci/variables/index', anchor: 'add-a-cicd-variable-to-an-instance'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('Learn more.'), help_page_path('ci/variables/index', anchor: 'for-an-instance'), target: '_blank', rel: 'noopener noreferrer' %p = _('Variables can be:') %ul %li = html_escape(_('%{code_open}Protected:%{code_close} Only exposed to protected branches or protected tags.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } - = link_to _('Learn more.'), help_page_path('ci/variables/index', anchor: 'protected-cicd-variables'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('Learn more.'), help_page_path('ci/variables/index', anchor: 'protect-a-cicd-variable'), target: '_blank', rel: 'noopener noreferrer' %li = html_escape(_('%{code_open}Masked:%{code_close} Hidden in job logs. Must match masking requirements.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } = link_to _('Learn more.'), help_page_path('ci/variables/index', anchor: 'mask-a-cicd-variable'), target: '_blank', rel: 'noopener noreferrer' diff --git a/app/views/admin/application_settings/ci_cd.html.haml b/app/views/admin/application_settings/ci_cd.html.haml index 0414382a108..bd0ce766f81 100644 --- a/app/views/admin/application_settings/ci_cd.html.haml +++ b/app/views/admin/application_settings/ci_cd.html.haml @@ -9,7 +9,7 @@ .settings-content - if ci_variable_protected_by_default? %p.settings-message.text-center - - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('ci/variables/index', anchor: 'protected-cicd-variables') } + - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('ci/variables/index', anchor: 'protect-a-cicd-variable') } = s_('Environment variables on this GitLab instance are configured to be %{link_start}protected%{link_end} by default.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } #js-instance-variables{ data: { endpoint: admin_ci_variables_path, maskable_regex: ci_variable_maskable_regex, protected_by_default: ci_variable_protected_by_default?.to_s} } diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml index 8c9d54cd5d8..dceee07019c 100644 --- a/app/views/admin/application_settings/general.html.haml +++ b/app/views/admin/application_settings/general.html.haml @@ -75,6 +75,8 @@ = render 'admin/application_settings/external_authorization_service_form', expanded: expanded_by_default? += render_if_exists 'admin/application_settings/scim' + %section.settings.as-terminal.no-animate#js-terminal-settings{ class: ('expanded' if expanded_by_default?) } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only diff --git a/app/views/admin/broadcast_messages/_form.html.haml b/app/views/admin/broadcast_messages/_form.html.haml deleted file mode 100644 index 4e05eb31010..00000000000 --- a/app/views/admin/broadcast_messages/_form.html.haml +++ /dev/null @@ -1,67 +0,0 @@ -#broadcast-message-preview - = render 'preview' - -= gitlab_ui_form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form js-quick-submit js-requires-input'} do |f| - = form_errors(@broadcast_message) - - .form-group.row.mt-4 - .col-sm-2.col-form-label - = f.label :message - .col-sm-10 - = f.text_area :message, class: "form-control gl-form-input js-autosize js-broadcast-message-message", - required: true, - dir: 'auto', - data: { preview_path: preview_admin_broadcast_messages_path } - .form-group.row - .col-sm-2.col-form-label - = f.label :broadcast_type, _('Type') - .col-sm-10 - = f.select :broadcast_type, broadcast_type_options, {}, class: 'form-control js-broadcast-message-type' - .form-group.row.js-broadcast-message-background-color-form-group{ class: ('hidden' unless @broadcast_message.banner?) } - .col-sm-2.col-form-label - = f.label :theme, _("Theme") - .col-sm-10 - .input-group - = f.select :theme, broadcast_theme_options, {}, class: 'form-control js-broadcast-message-theme' - - .form-group.row.js-broadcast-message-dismissable-form-group{ class: ('hidden' unless @broadcast_message.banner?) } - .col-sm-2.col-form-label.pt-0 - = f.label :starts_at, _("Dismissable") - .col-sm-10 - = f.gitlab_ui_checkbox_component :dismissable, _('Allow users to dismiss the broadcast message') - - if Feature.enabled?(:role_targeted_broadcast_messages) - .form-group.row - .col-sm-2.col-form-label - = f.label :target_access_levels, _('Target roles') - .col-sm-10 - - target_access_level_options.each do |human_access_level, access_level| - = f.gitlab_ui_checkbox_component :target_access_levels, human_access_level, checked_value: access_level, unchecked_value: false, checkbox_options: { multiple: true } - .form-text.text-muted - = _('The broadcast message displays only to users in projects and groups who have these roles.') - .form-group.row.js-toggle-colors-container.toggle-colors.hide - .col-sm-2.col-form-label - = f.label :font, _("Font Color") - .col-sm-10 - = f.color_field :font, class: "form-control gl-form-input text-font-color" - .form-group.row - .col-sm-2.col-form-label - = f.label :target_path, _('Target Path') - .col-sm-10 - = f.text_field :target_path, class: "form-control gl-form-input" - .form-text.text-muted - = _('Paths can contain wildcards, like */welcome') - .form-group.row - .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 - .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 - - if @broadcast_message.persisted? - = f.submit _("Update broadcast message"), pajamas_button: true - - else - = f.submit _("Add broadcast message"), pajamas_button: true diff --git a/app/views/admin/broadcast_messages/_table.html.haml b/app/views/admin/broadcast_messages/_table.html.haml deleted file mode 100644 index c5cd333f9dd..00000000000 --- a/app/views/admin/broadcast_messages/_table.html.haml +++ /dev/null @@ -1,38 +0,0 @@ -- targeted_broadcast_messages_enabled = Feature.enabled?(:role_targeted_broadcast_messages) - -- if @broadcast_messages.any? - .table-responsive - %table.table.b-table.gl-table - %thead - %tr - %th= _('Status') - %th= _('Preview') - %th= _('Starts') - %th= _('Ends') - - if targeted_broadcast_messages_enabled - %th= _('Target roles') - %th= _('Target Path') - %th= _('Type') - %th - %tbody - - @broadcast_messages.each do |message| - %tr - %td - = broadcast_message_status(message) - %td - = broadcast_message(message, preview: true) - %td - = message.starts_at - %td - = message.ends_at - - if targeted_broadcast_messages_enabled - %td - = target_access_levels_display(message.target_access_levels) - %td - = message.target_path - %td - = message.broadcast_type.capitalize - %td.gl-white-space-nowrap< - = link_to sprite_icon('pencil', css_class: 'gl-icon'), edit_admin_broadcast_message_path(message), title: _('Edit'), class: 'btn btn-icon gl-button' - = link_to sprite_icon('remove', css_class: 'gl-icon'), admin_broadcast_message_path(message), method: :delete, remote: true, title: _('Remove'), class: 'js-remove-tr btn btn-icon gl-button btn-danger gl-ml-3' - = paginate @broadcast_messages, theme: 'gitlab' diff --git a/app/views/admin/broadcast_messages/edit.html.haml b/app/views/admin/broadcast_messages/edit.html.haml index 28301833f7d..bef435c07f7 100644 --- a/app/views/admin/broadcast_messages/edit.html.haml +++ b/app/views/admin/broadcast_messages/edit.html.haml @@ -1,19 +1,15 @@ - breadcrumb_title _("Messages") - page_title _("Broadcast Messages") -- vue_app_enabled = Feature.enabled?(:vue_broadcast_messages, current_user) -- if vue_app_enabled - #js-broadcast-message{ data: { - id: @broadcast_message.id, - message: @broadcast_message.message, - broadcast_type: @broadcast_message.broadcast_type, - theme: @broadcast_message.theme, - dismissable: @broadcast_message.dismissable.to_s, - target_access_levels: @broadcast_message.target_access_levels, - target_path: @broadcast_message.target_path, - starts_at: @broadcast_message.starts_at, - ends_at: @broadcast_message.ends_at, - target_access_level_options: target_access_level_options.to_json, - } } -- else - = render 'form' +#js-broadcast-message{ data: { + id: @broadcast_message.id, + message: @broadcast_message.message, + broadcast_type: @broadcast_message.broadcast_type, + theme: @broadcast_message.theme, + dismissable: @broadcast_message.dismissable.to_s, + target_access_levels: @broadcast_message.target_access_levels, + target_path: @broadcast_message.target_path, + starts_at: @broadcast_message.starts_at, + ends_at: @broadcast_message.ends_at, + target_access_level_options: target_access_level_options.to_json, +} } diff --git a/app/views/admin/broadcast_messages/index.html.haml b/app/views/admin/broadcast_messages/index.html.haml index 7a005f9c982..2fb59570231 100644 --- a/app/views/admin/broadcast_messages/index.html.haml +++ b/app/views/admin/broadcast_messages/index.html.haml @@ -1,31 +1,25 @@ - breadcrumb_title _("Messages") - page_title _("Broadcast Messages") -- vue_app_enabled = Feature.enabled?(:vue_broadcast_messages, current_user) %h1.page-title.gl-font-size-h-display = _('Broadcast Messages') %p.light = _('Use banners and notifications to notify your users about scheduled maintenance, recent upgrades, and more.') -- if vue_app_enabled - #js-broadcast-messages{ data: { - page: params[:page] || 1, - target_access_level_options: target_access_level_options.to_json, - messages_count: @broadcast_messages.total_count, - messages: @broadcast_messages.map { |message| { - id: message.id, - status: broadcast_message_status(message), - preview: broadcast_message(message, preview: true), - starts_at: message.starts_at.to_s, - ends_at: message.ends_at.to_s, - target_roles: target_access_levels_display(message.target_access_levels), - target_path: message.target_path, - type: message.broadcast_type.capitalize, - edit_path: edit_admin_broadcast_message_path(message), - delete_path: admin_broadcast_message_path(message) + '.js' - } }.to_json - } } -- else - = render 'form' - %br.clearfix - = render 'table' +#js-broadcast-messages{ data: { + page: params[:page] || 1, + target_access_level_options: target_access_level_options.to_json, + messages_count: @broadcast_messages.total_count, + messages: @broadcast_messages.map { |message| { + id: message.id, + status: broadcast_message_status(message), + preview: broadcast_message(message, preview: true), + starts_at: message.starts_at.to_s, + ends_at: message.ends_at.to_s, + target_roles: target_access_levels_display(message.target_access_levels), + target_path: message.target_path, + type: message.broadcast_type.capitalize, + edit_path: edit_admin_broadcast_message_path(message), + delete_path: admin_broadcast_message_path(message) + '.js' + } }.to_json +} } diff --git a/app/views/admin/dashboard/_stats_users_table.html.haml b/app/views/admin/dashboard/_stats_users_table.html.haml new file mode 100644 index 00000000000..473384b8961 --- /dev/null +++ b/app/views/admin/dashboard/_stats_users_table.html.haml @@ -0,0 +1,49 @@ +%table.table.gl-text-gray-500 + %tr + %td.gl-p-5! + = s_('AdminArea|Users without a Group and Project') + = render_if_exists 'admin/dashboard/included_free_in_license_tooltip' + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.without_groups_and_projects + = render_if_exists 'admin/dashboard/minimal_access_stats_row', users_statistics: @users_statistics + %tr + %td.gl-p-5! + = s_('AdminArea|Users with highest role') + %strong + = s_('AdminArea|Reporter') + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_reporter + %tr + %td.gl-p-5! + = s_('AdminArea|Users with highest role') + %strong + = s_('AdminArea|Developer') + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_developer + %tr + %td.gl-p-5! + = s_('AdminArea|Users with highest role') + %strong + = s_('AdminArea|Maintainer') + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_maintainer + %tr + %td.gl-p-5! + = s_('AdminArea|Users with highest role') + %strong + = s_('AdminArea|Owner') + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_owner + %tr + %td.gl-p-5! + = s_('AdminArea|Users with highest role') + %strong + = s_('AdminArea|Guest') + = render_if_exists 'admin/dashboard/included_free_in_license_tooltip' + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_guest + %tr + %td.gl-p-5! + = s_('AdminArea|Bots') + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.bots diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 27ae7d523b9..8afddd99451 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -164,10 +164,11 @@ = _('Rails') %span.float-right #{Rails::VERSION::STRING} - %p - = ApplicationRecord.database.human_adapter_name - %span.float-right - = ApplicationRecord.database.version + - database_versions.each do |database_name, database| + %p + #{database[:adapter_name]} (#{database_name}) + %span.float-right + = database[:version] %p = _('Redis') %span.float-right diff --git a/app/views/admin/dashboard/stats.html.haml b/app/views/admin/dashboard/stats.html.haml index e0701812ba3..0a5a425397f 100644 --- a/app/views/admin/dashboard/stats.html.haml +++ b/app/views/admin/dashboard/stats.html.haml @@ -2,63 +2,15 @@ %h3.gl-my-6 = s_('AdminArea|Users statistics') + += render 'admin/dashboard/stats_users_table', user_statistics: @users_statistics + +%p.gl-font-weight-bold.gl-mt-8 + = s_('AdminArea|Totals') + %table.table.gl-text-gray-500 - %tr - %td.gl-p-5! - = s_('AdminArea|Users without a Group and Project') - = render_if_exists 'admin/dashboard/included_free_in_license_tooltip' - %td.gl-text-right{ class: 'gl-p-5!' } - = @users_statistics&.without_groups_and_projects - = render_if_exists 'admin/dashboard/minimal_access_stats_row', users_statistics: @users_statistics - %tr - %td.gl-p-5! - = s_('AdminArea|Users with highest role') - %strong - = s_('AdminArea|Guest') - = render_if_exists 'admin/dashboard/included_free_in_license_tooltip' - %td.gl-text-right{ class: 'gl-p-5!' } - = @users_statistics&.with_highest_role_guest - %tr - %td.gl-p-5! - = s_('AdminArea|Users with highest role') - %strong - = s_('AdminArea|Reporter') - %td.gl-text-right{ class: 'gl-p-5!' } - = @users_statistics&.with_highest_role_reporter - %tr - %td.gl-p-5! - = s_('AdminArea|Users with highest role') - %strong - = s_('AdminArea|Developer') - %td.gl-text-right{ class: 'gl-p-5!' } - = @users_statistics&.with_highest_role_developer - %tr - %td.gl-p-5! - = s_('AdminArea|Users with highest role') - %strong - = s_('AdminArea|Maintainer') - %td.gl-text-right{ class: 'gl-p-5!' } - = @users_statistics&.with_highest_role_maintainer - %tr - %td.gl-p-5! - = s_('AdminArea|Users with highest role') - %strong - = s_('AdminArea|Owner') - %td.gl-text-right{ class: 'gl-p-5!' } - = @users_statistics&.with_highest_role_owner - %tr - %td.gl-p-5! - = s_('AdminArea|Bots') - %td.gl-text-right{ class: 'gl-p-5!' } - = @users_statistics&.bots - = render_if_exists 'admin/dashboard/billable_users_row' - %tr.bg-gray-light.gl-text-gray-900 - %td.gl-p-5! - %strong - = s_('AdminArea|Active users') - %td.gl-text-right{ class: 'gl-p-5!' } - %strong - = @users_statistics&.active + = render_if_exists 'admin/dashboard/stats_active_users_row', users_statistics: @users_statistics + %tr.bg-gray-light.gl-text-gray-900 %td.gl-p-5! %strong @@ -70,6 +22,8 @@ %td.gl-p-5! %strong = s_('AdminArea|Total users') + %span + (#{s_('AdminArea|active users + blocked users')}) %td.gl-text-right{ class: 'gl-p-5!' } %strong = @users_statistics&.total diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index 829e9f508e0..bfa17daf1c2 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -135,7 +135,7 @@ - c.header do = s_('ProjectSettings|Transfer project') - c.body do - = form_for @project, url: transfer_admin_project_path(@project), method: :put do |f| + = gitlab_ui_form_for @project, url: transfer_admin_project_path(@project), method: :put do |f| .form-group.row .col-sm-3.col-form-label = f.label :new_namespace_id, _("Namespace") @@ -147,13 +147,13 @@ .form-group.row .offset-sm-3.col-sm-9 - = f.submit _('Transfer'), class: 'gl-button btn btn-confirm' + = f.submit _('Transfer'), pajamas_button: true = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5 repository-check' }) do |c| - c.header do = _("Repository check") - c.body do - = form_for @project, url: repository_check_admin_project_path(@project), method: :post do |f| + = gitlab_ui_form_for @project, url: repository_check_admin_project_path(@project), method: :post do |f| .form-group - if @project.last_repository_check_at.nil? = _("This repository has never been checked.") @@ -167,7 +167,7 @@ = link_to sprite_icon('question-o'), help_page_path('administration/repository_checks') .form-group - = f.submit _('Trigger repository check'), class: 'gl-button btn btn-confirm' + = f.submit _('Trigger repository check'), pajamas_button: true .col-md-6 - if @group diff --git a/app/views/admin/runners/edit.html.haml b/app/views/admin/runners/edit.html.haml index ccdfe67ea77..e586a7a965e 100644 --- a/app/views/admin/runners/edit.html.haml +++ b/app/views/admin/runners/edit.html.haml @@ -24,7 +24,8 @@ dismissible: false, title: project.full_name) do |c| = c.actions do - = link_to _('Disable'), admin_namespace_project_runner_project_path(project.namespace, project, runner_project), method: :delete, class: 'btn gl-alert-action btn-confirm btn-md gl-button' + = render Pajamas::ButtonComponent.new(variant: :confirm, href: admin_namespace_project_runner_project_path(project.namespace, project, runner_project), method: :delete) do + = _('Disable') %table.table{ data: { testid: 'unassigned-projects' } } %thead @@ -47,7 +48,8 @@ = project.full_name %td .float-right - = form_for project.runner_projects.new, url: admin_namespace_project_runner_projects_path(project.namespace, project), method: :post do |f| + = gitlab_ui_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: 'gl-button btn btn-sm' + = render Pajamas::ButtonComponent.new(size: :small, type: :submit) do + = _('Enable') = paginate_without_count @projects diff --git a/app/views/admin/spam_logs/_spam_log.html.haml b/app/views/admin/spam_logs/_spam_log.html.haml index 2d0ea585735..183667679b9 100644 --- a/app/views/admin/spam_logs/_spam_log.html.haml +++ b/app/views/admin/spam_logs/_spam_log.html.haml @@ -23,19 +23,36 @@ = truncate(spam_log.description, length: 100) %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?") % { user_name: user.name }, confirm_btn_variant: 'danger' }, aria: { label: _('Remove user') }, method: :delete, class: "gl-button btn btn-sm btn-danger" + = render Pajamas::ButtonComponent.new(size: :small, + variant: :danger, + method: :delete, + href: admin_spam_log_path(spam_log, remove_user: true), + button_options: { data: { confirm: _("USER %{user_name} WILL BE REMOVED! Are you sure?") % { user_name: user.name }, confirm_btn_variant: 'danger' }, aria: { label: _('Remove user') } }) do + = _('Remove user') %td -# TODO: Remove conditonal once spamcheck supports this https://gitlab.com/gitlab-com/gl-security/engineering-and-research/automation-team/spam/spamcheck/-/issues/190 - if akismet_enabled? - if spam_log.submitted_as_ham? - .gl-button.btn.btn-default.btn-sm.disabled.gl-mb-3 + = render Pajamas::ButtonComponent.new(size: :small, + button_options: { class: 'disabled gl-mb-3'}) do = _("Submitted as ham") - else - = link_to _('Submit as ham'), mark_as_ham_admin_spam_log_path(spam_log), method: :post, class: 'gl-button btn btn-default btn-sm gl-mb-3' + = render Pajamas::ButtonComponent.new(size: :small, + method: :post, + href: mark_as_ham_admin_spam_log_path(spam_log), + button_options: { class: ' gl-mb-3' }) do + = _('Submit as ham') - 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: "gl-button btn btn-default btn-sm gl-mb-3" + = render Pajamas::ButtonComponent.new(size: :small, + method: :put, + href: block_admin_user_path(user), + button_options: { class: 'gl-mb-3', data: {confirm: _('USER WILL BE BLOCKED! Are you sure?')} }) do + = _('Block user') - else - .gl-button.btn.btn-default.btn-sm.disabled.gl-mb-3 - Already blocked - = link_to _('Remove log'), [:admin, spam_log], remote: true, method: :delete, class: "gl-button btn btn-default btn-sm btn-close js-remove-tr" + = render Pajamas::ButtonComponent.new(size: :small, button_options: { class: 'disabled gl-mb-3'}) do + = _("Already blocked") + = render Pajamas::ButtonComponent.new(size: :small, + method: :delete, + href: [:admin, spam_log], + button_options: { class: 'js-remove-tr', remote: true, }) do + = _('Remove log') diff --git a/app/views/admin/topics/index.html.haml b/app/views/admin/topics/index.html.haml index 2f39f27208e..6d64fa1983f 100644 --- a/app/views/admin/topics/index.html.haml +++ b/app/views/admin/topics/index.html.haml @@ -1,4 +1,5 @@ - page_title _("Topics") +- add_page_specific_style 'page_bundles/search' .top-area .nav-controls.gl-w-full.gl-mt-3.gl-mb-3 diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml index b255354f2c1..472ba2f84a0 100644 --- a/app/views/admin/users/_access_levels.html.haml +++ b/app/views/admin/users/_access_levels.html.haml @@ -10,6 +10,7 @@ .form-group.gl-form-group{ role: 'group' } = f.gitlab_ui_checkbox_component :can_create_group, s_('AdminUsers|Can create group') + = f.gitlab_ui_checkbox_component :private_profile, s_('AdminUsers|Private profile') %fieldset.form-group.gl-form-group %legend.col-form-label.col-form-label diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml index 96e6a264d8e..73027441fe6 100644 --- a/app/views/admin/users/_users.html.haml +++ b/app/views/admin/users/_users.html.haml @@ -48,7 +48,8 @@ .nav-controls = render_if_exists 'admin/users/admin_email_users' = render_if_exists 'admin/users/admin_export_user_permissions' - = link_to s_('AdminUsers|New user'), new_admin_user_path, class: 'btn gl-button btn-confirm btn-search float-right' + = render Pajamas::ButtonComponent.new(variant: :confirm, href: new_admin_user_path) do + = s_('AdminUsers|New user') .filtered-search-block.row-content-block.border-top-0 = form_tag admin_users_path, method: :get do diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 7edea81a123..f7d4121e6e0 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -76,6 +76,10 @@ %strong = @user.can_create_group ? _('Yes') : _('No') %li + %span.light= _('Private profile:') + %strong + = @user.private_profile ? _('Yes') : _('No') + %li %span.light= _('Personal projects limit:') %strong = @user.projects_limit |