summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
commit3cccd102ba543e02725d247893729e5c73b38295 (patch)
treef36a04ec38517f5deaaacb5acc7d949688d1e187 /app/views
parent205943281328046ef7b4528031b90fbda70c75ac (diff)
downloadgitlab-ce-3cccd102ba543e02725d247893729e5c73b38295.tar.gz
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/application_settings/_account_and_limit.html.haml32
-rw-r--r--app/views/admin/application_settings/_ci_cd.html.haml164
-rw-r--r--app/views/admin/application_settings/_eks.html.haml8
-rw-r--r--app/views/admin/application_settings/_email.html.haml30
-rw-r--r--app/views/admin/application_settings/_external_authorization_service_form.html.haml11
-rw-r--r--app/views/admin/application_settings/_floc.html.haml7
-rw-r--r--app/views/admin/application_settings/_git_lfs_limits.html.haml11
-rw-r--r--app/views/admin/application_settings/_gitpod.html.haml7
-rw-r--r--app/views/admin/application_settings/_grafana.html.haml11
-rw-r--r--app/views/admin/application_settings/_help_page.html.haml7
-rw-r--r--app/views/admin/application_settings/_kroki.html.haml13
-rw-r--r--app/views/admin/application_settings/_localization.html.haml12
-rw-r--r--app/views/admin/application_settings/_mailgun.html.haml7
-rw-r--r--app/views/admin/application_settings/_note_limits.html.haml4
-rw-r--r--app/views/admin/application_settings/_outbound.html.haml24
-rw-r--r--app/views/admin/application_settings/_pages.html.haml36
-rw-r--r--app/views/admin/application_settings/_performance.html.haml13
-rw-r--r--app/views/admin/application_settings/_performance_bar.html.haml9
-rw-r--r--app/views/admin/application_settings/_plantuml.html.haml7
-rw-r--r--app/views/admin/application_settings/_protected_paths.html.haml11
-rw-r--r--app/views/admin/application_settings/_registry.html.haml28
-rw-r--r--app/views/admin/application_settings/_repository_check.html.haml30
-rw-r--r--app/views/admin/application_settings/_repository_mirrors_form.html.haml10
-rw-r--r--app/views/admin/application_settings/_sentry.html.haml6
-rw-r--r--app/views/admin/application_settings/_signup.html.haml4
-rw-r--r--app/views/admin/application_settings/_snowplow.html.haml6
-rw-r--r--app/views/admin/application_settings/_sourcegraph.html.haml12
-rw-r--r--app/views/admin/application_settings/_spam.html.haml50
-rw-r--r--app/views/admin/application_settings/_terms.html.haml8
-rw-r--r--app/views/admin/application_settings/_third_party_offers.html.haml7
-rw-r--r--app/views/admin/application_settings/_usage.html.haml99
-rw-r--r--app/views/admin/application_settings/_users_api_limits.html.haml4
-rw-r--r--app/views/admin/application_settings/_visibility_and_access.html.haml24
-rw-r--r--app/views/admin/application_settings/appearances/_form.html.haml4
-rw-r--r--app/views/admin/application_settings/appearances/_system_header_footer_form.html.haml11
-rw-r--r--app/views/admin/application_settings/ci_cd.html.haml3
-rw-r--r--app/views/admin/application_settings/general.html.haml13
-rw-r--r--app/views/admin/application_settings/repository.html.haml2
-rw-r--r--app/views/admin/application_settings/service_usage_data.html.haml27
-rw-r--r--app/views/admin/applications/_delete_form.html.haml3
-rw-r--r--app/views/admin/applications/_form.html.haml4
-rw-r--r--app/views/admin/applications/index.html.haml77
-rw-r--r--app/views/admin/background_migrations/_migration.html.haml2
-rw-r--r--app/views/admin/broadcast_messages/_form.html.haml32
-rw-r--r--app/views/admin/broadcast_messages/_preview.html.haml3
-rw-r--r--app/views/admin/dashboard/_security_newsletter_callout.html.haml13
-rw-r--r--app/views/admin/groups/_form.html.haml4
-rw-r--r--app/views/admin/groups/index.html.haml3
-rw-r--r--app/views/admin/hooks/_form.html.haml32
-rw-r--r--app/views/admin/hooks/edit.html.haml2
-rw-r--r--app/views/admin/hooks/index.html.haml2
-rw-r--r--app/views/admin/identities/index.html.haml2
-rw-r--r--app/views/admin/impersonation_tokens/index.html.haml2
-rw-r--r--app/views/admin/projects/show.html.haml6
-rw-r--r--app/views/admin/runners/edit.html.haml5
-rw-r--r--app/views/admin/topics/_form.html.haml2
-rw-r--r--app/views/admin/users/_access_levels.html.haml20
-rw-r--r--app/views/admin/users/_modals.html.haml20
-rw-r--r--app/views/admin/users/_users.html.haml7
-rw-r--r--app/views/admin/users/keys.html.haml1
-rw-r--r--app/views/admin/users/projects.html.haml2
-rw-r--r--app/views/admin/users/show.html.haml5
-rw-r--r--app/views/clusters/clusters/_banner.html.haml12
-rw-r--r--app/views/clusters/clusters/_deprecation_alert.html.haml7
-rw-r--r--app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml6
-rw-r--r--app/views/clusters/clusters/_sidebar.html.haml14
-rw-r--r--app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml11
-rw-r--r--app/views/clusters/clusters/cloud_providers/_cloud_provider_selector.html.haml8
-rw-r--r--app/views/clusters/clusters/connect.html.haml10
-rw-r--r--app/views/clusters/clusters/new.html.haml10
-rw-r--r--app/views/clusters/clusters/new_cluster_docs.html.haml13
-rw-r--r--app/views/dashboard/milestones/index.html.haml35
-rw-r--r--app/views/devise/sessions/_new_base.html.haml17
-rw-r--r--app/views/devise/shared/_email_opted_in.html.haml3
-rw-r--r--app/views/errors/_footer.html.haml4
-rw-r--r--app/views/groups/_group_admin_settings.html.haml23
-rw-r--r--app/views/groups/_import_group_from_another_instance_panel.html.haml4
-rw-r--r--app/views/groups/_import_group_from_file_panel.html.haml4
-rw-r--r--app/views/groups/_subgroups_and_projects.html.haml3
-rw-r--r--app/views/groups/crm/contacts/index.html.haml8
-rw-r--r--app/views/groups/crm/organizations/index.html.haml8
-rw-r--r--app/views/groups/dependency_proxies/show.html.haml2
-rw-r--r--app/views/groups/edit.html.haml1
-rw-r--r--app/views/groups/group_members/index.html.haml6
-rw-r--r--app/views/groups/harbor/repositories/index.html.haml6
-rw-r--r--app/views/groups/milestones/index.html.haml43
-rw-r--r--app/views/groups/runners/_settings.html.haml186
-rw-r--r--app/views/groups/runners/_sort_dropdown.html.haml11
-rw-r--r--app/views/groups/settings/_export.html.haml28
-rw-r--r--app/views/groups/settings/_permissions.html.haml2
-rw-r--r--app/views/groups/settings/_remove_button.html.haml3
-rw-r--r--app/views/groups/settings/_transfer.html.haml3
-rw-r--r--app/views/groups/settings/ci_cd/_auto_devops_form.html.haml18
-rw-r--r--app/views/groups/settings/ci_cd/show.html.haml1
-rw-r--r--app/views/groups/show.html.haml21
-rw-r--r--app/views/import/_githubish_status.html.haml2
-rw-r--r--app/views/import/github/new.html.haml3
-rw-r--r--app/views/import/github/status.html.haml2
-rw-r--r--app/views/import/history/index.html.haml4
-rw-r--r--app/views/import/shared/_errors.html.haml5
-rw-r--r--app/views/jira_connect/users/show.html.haml14
-rw-r--r--app/views/layouts/_diffs_colors_css.haml20
-rw-r--r--app/views/layouts/_header_search.html.haml7
-rw-r--r--app/views/layouts/_page.html.haml1
-rw-r--r--app/views/layouts/_snowplow.html.haml2
-rw-r--r--app/views/layouts/_startup_css.haml3
-rw-r--r--app/views/layouts/application.html.haml2
-rw-r--r--app/views/layouts/errors.html.haml4
-rw-r--r--app/views/layouts/header/_current_user_dropdown.html.haml1
-rw-r--r--app/views/layouts/header/_default.html.haml2
-rw-r--r--app/views/layouts/header/_registration_enabled_callout.html.haml8
-rw-r--r--app/views/layouts/header/_storage_enforcement_banner.html.haml7
-rw-r--r--app/views/layouts/nav/sidebar/_admin.html.haml15
-rw-r--r--app/views/notify/_note_email.html.haml17
-rw-r--r--app/views/notify/_note_email.text.erb7
-rw-r--r--app/views/notify/issue_due_email.html.haml4
-rw-r--r--app/views/notify/issue_moved_email.html.haml8
-rw-r--r--app/views/notify/issue_status_changed_email.html.haml2
-rw-r--r--app/views/notify/merge_request_status_email.html.haml4
-rw-r--r--app/views/notify/merge_request_status_email.text.haml6
-rw-r--r--app/views/notify/merge_request_unmergeable_email.html.haml2
-rw-r--r--app/views/notify/merge_request_unmergeable_email.text.haml6
-rw-r--r--app/views/notify/merged_merge_request_email.html.haml2
-rw-r--r--app/views/notify/merged_merge_request_email.text.haml6
-rw-r--r--app/views/notify/new_email_address_added_email.erb5
-rw-r--r--app/views/notify/new_email_address_added_email.haml6
-rw-r--r--app/views/notify/new_merge_request_email.html.haml23
-rw-r--r--app/views/notify/new_review_email.html.haml14
-rw-r--r--app/views/notify/new_review_email.text.erb4
-rw-r--r--app/views/notify/push_to_merge_request_email.html.haml11
-rw-r--r--app/views/notify/service_desk_new_note_email.html.haml2
-rw-r--r--app/views/profiles/accounts/show.html.haml11
-rw-r--r--app/views/profiles/keys/_form.html.haml6
-rw-r--r--app/views/profiles/keys/index.html.haml2
-rw-r--r--app/views/profiles/notifications/_email_settings.html.haml4
-rw-r--r--app/views/profiles/notifications/show.html.haml24
-rw-r--r--app/views/profiles/preferences/show.html.haml65
-rw-r--r--app/views/profiles/two_factor_auths/show.html.haml6
-rw-r--r--app/views/projects/_deletion_failed.html.haml4
-rw-r--r--app/views/projects/_files.html.haml2
-rw-r--r--app/views/projects/_import_project_pane.html.haml8
-rw-r--r--app/views/projects/_last_push.html.haml5
-rw-r--r--app/views/projects/_new_project_fields.html.haml35
-rw-r--r--app/views/projects/_new_project_initialize_with_sast.html.haml16
-rw-r--r--app/views/projects/_transfer.html.haml5
-rw-r--r--app/views/projects/alert_management/details.html.haml2
-rw-r--r--app/views/projects/blame/show.html.haml2
-rw-r--r--app/views/projects/blob/_upload.html.haml4
-rw-r--r--app/views/projects/blob/edit.html.haml5
-rw-r--r--app/views/projects/blob/viewers/_balsamiq.html.haml1
-rw-r--r--app/views/projects/branches/_branch.html.haml1
-rw-r--r--app/views/projects/branches/_panel.html.haml2
-rw-r--r--app/views/projects/branches/index.html.haml5
-rw-r--r--app/views/projects/branches/new.html.haml4
-rw-r--r--app/views/projects/commit/_commit_box.html.haml6
-rw-r--r--app/views/projects/commit/show.html.haml1
-rw-r--r--app/views/projects/commits/_commits.html.haml5
-rw-r--r--app/views/projects/commits/show.html.haml2
-rw-r--r--app/views/projects/compare/show.html.haml1
-rw-r--r--app/views/projects/deploy_keys/edit.html.haml2
-rw-r--r--app/views/projects/diffs/_diffs.html.haml7
-rw-r--r--app/views/projects/diffs/_file.html.haml1
-rw-r--r--app/views/projects/diffs/_line.html.haml2
-rw-r--r--app/views/projects/diffs/_parallel_view.html.haml4
-rw-r--r--app/views/projects/diffs/_stats.html.haml1
-rw-r--r--app/views/projects/diffs/_text_file.html.haml2
-rw-r--r--app/views/projects/diffs/_warning.html.haml13
-rw-r--r--app/views/projects/edit.html.haml6
-rw-r--r--app/views/projects/empty.html.haml1
-rw-r--r--app/views/projects/forks/error.html.haml5
-rw-r--r--app/views/projects/forks/index.html.haml13
-rw-r--r--app/views/projects/harbor/repositories/index.html.haml6
-rw-r--r--app/views/projects/hooks/edit.html.haml2
-rw-r--r--app/views/projects/hooks/index.html.haml2
-rw-r--r--app/views/projects/imports/new.html.haml2
-rw-r--r--app/views/projects/issues/_alert_moved_from_service_desk.html.haml6
-rw-r--r--app/views/projects/issues/_form.html.haml4
-rw-r--r--app/views/projects/issues/_new_branch.html.haml8
-rw-r--r--app/views/projects/jobs/index.html.haml4
-rw-r--r--app/views/projects/mattermosts/_no_teams.html.haml6
-rw-r--r--app/views/projects/merge_requests/_form.html.haml2
-rw-r--r--app/views/projects/merge_requests/_mr_title.html.haml5
-rw-r--r--app/views/projects/merge_requests/creations/_new_submit.html.haml2
-rw-r--r--app/views/projects/merge_requests/invalid.html.haml5
-rw-r--r--app/views/projects/milestones/index.html.haml46
-rw-r--r--app/views/projects/milestones/show.html.haml6
-rw-r--r--app/views/projects/mirrors/_mirror_repos.html.haml6
-rw-r--r--app/views/projects/mirrors/_ssh_host_keys.html.haml2
-rw-r--r--app/views/projects/no_repo.html.haml2
-rw-r--r--app/views/projects/pages/_pages_settings.html.haml19
-rw-r--r--app/views/projects/pages_domains/_form.html.haml3
-rw-r--r--app/views/projects/pipeline_schedules/_form.html.haml7
-rw-r--r--app/views/projects/pipeline_schedules/index.html.haml2
-rw-r--r--app/views/projects/pipelines/index.html.haml2
-rw-r--r--app/views/projects/pipelines/show.html.haml6
-rw-r--r--app/views/projects/project_members/index.html.haml2
-rw-r--r--app/views/projects/protected_branches/shared/_protected_branch.html.haml2
-rw-r--r--app/views/projects/registry/repositories/index.html.haml2
-rw-r--r--app/views/projects/runners/_runner.html.haml6
-rw-r--r--app/views/projects/security/configuration/show.html.haml1
-rw-r--r--app/views/projects/services/_form.html.haml7
-rw-r--r--app/views/projects/services/prometheus/_help.html.haml3
-rw-r--r--app/views/projects/services/prometheus/_top.html.haml3
-rw-r--r--app/views/projects/settings/_archive.html.haml4
-rw-r--r--app/views/projects/settings/ci_cd/_autodevops_form.html.haml17
-rw-r--r--app/views/projects/settings/ci_cd/_form.html.haml39
-rw-r--r--app/views/projects/settings/ci_cd/show.html.haml2
-rw-r--r--app/views/projects/settings/operations/_configuration_banner.html.haml24
-rw-r--r--app/views/projects/settings/operations/_prometheus.html.haml2
-rw-r--r--app/views/projects/settings/operations/show.html.haml2
-rw-r--r--app/views/projects/settings/packages_and_registries/show.html.haml2
-rw-r--r--app/views/projects/show.html.haml2
-rw-r--r--app/views/projects/tags/index.html.haml13
-rw-r--r--app/views/projects/tracings/show.html.haml2
-rw-r--r--app/views/registrations/welcome/show.html.haml2
-rw-r--r--app/views/search/results/_blob_highlight.html.haml4
-rw-r--r--app/views/shared/_allow_request_access.html.haml3
-rw-r--r--app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml6
-rw-r--r--app/views/shared/_broadcast_message.html.haml37
-rw-r--r--app/views/shared/_global_alert.html.haml21
-rw-r--r--app/views/shared/_import_form.html.haml5
-rw-r--r--app/views/shared/_milestones_sort_dropdown.html.haml26
-rw-r--r--app/views/shared/_no_password.html.haml5
-rw-r--r--app/views/shared/_no_ssh.html.haml5
-rw-r--r--app/views/shared/_outdated_browser.html.haml3
-rw-r--r--app/views/shared/_project_limit.html.haml5
-rw-r--r--app/views/shared/_prometheus_configuration_banner.html.haml (renamed from app/views/projects/services/prometheus/_configuration_banner.html.haml)13
-rw-r--r--app/views/shared/_service_ping_consent.html.haml4
-rw-r--r--app/views/shared/_two_factor_auth_recovery_settings_check.html.haml9
-rw-r--r--app/views/shared/access_tokens/_form.html.haml4
-rw-r--r--app/views/shared/boards/_show.html.haml2
-rw-r--r--app/views/shared/boards/_switcher.html.haml12
-rw-r--r--app/views/shared/deploy_keys/_form.html.haml7
-rw-r--r--app/views/shared/deploy_keys/_project_group_form.html.haml10
-rw-r--r--app/views/shared/doorkeeper/applications/_form.html.haml23
-rw-r--r--app/views/shared/empty_states/_issues.html.haml2
-rw-r--r--app/views/shared/empty_states/_milestones.html.haml8
-rw-r--r--app/views/shared/empty_states/_milestones_tab.html.haml17
-rw-r--r--app/views/shared/errors/_gitaly_unavailable.html.haml5
-rw-r--r--app/views/shared/groups/_dropdown.html.haml27
-rw-r--r--app/views/shared/hook_logs/_content.html.haml13
-rw-r--r--app/views/shared/integrations/edit.html.haml2
-rw-r--r--app/views/shared/issuable/_assignees.html.haml2
-rw-r--r--app/views/shared/issuable/_form.html.haml5
-rw-r--r--app/views/shared/issuable/_label_page_create.html.haml2
-rw-r--r--app/views/shared/issuable/_merge_request_assignees.html.haml2
-rw-r--r--app/views/shared/issuable/_merge_request_reviewers.html.haml2
-rw-r--r--app/views/shared/issuable/_reviewers.html.haml2
-rw-r--r--app/views/shared/issuable/_search_bar.html.haml357
-rw-r--r--app/views/shared/issuable/_sidebar.html.haml2
-rw-r--r--app/views/shared/issuable/form/_contribution.html.haml15
-rw-r--r--app/views/shared/issuable/form/_metadata.html.haml6
-rw-r--r--app/views/shared/issue_type/_details_content.html.haml10
-rw-r--r--app/views/shared/milestones/_milestone_complete_alert.html.haml5
-rw-r--r--app/views/shared/projects/_list.html.haml4
-rw-r--r--app/views/shared/runners/_runner_type_alert.html.haml24
-rw-r--r--app/views/shared/tokens/_scopes_form.html.haml15
-rw-r--r--app/views/shared/web_hooks/_form.html.haml141
-rw-r--r--app/views/shared/web_hooks/_hook_errors.html.haml18
-rw-r--r--app/views/shared/wikis/_form.html.haml2
-rw-r--r--app/views/shared/wikis/_main_links.html.haml2
-rw-r--r--app/views/shared/wikis/show.html.haml3
-rw-r--r--app/views/users/show.html.haml2
263 files changed, 1526 insertions, 1739 deletions
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 189986b3dec..a0fa69c54c5 100644
--- a/app/views/admin/application_settings/_account_and_limit.html.haml
+++ b/app/views/admin/application_settings/_account_and_limit.html.haml
@@ -1,12 +1,9 @@
-= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-account-settings'), html: { class: 'fieldset-form', id: 'account-settings' } do |f|
+= gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-account-settings'), html: { class: 'fieldset-form', id: 'account-settings' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :gravatar_enabled, class: 'form-check-input'
- = f.label :gravatar_enabled, class: 'form-check-label' do
- = _('Gravatar enabled')
+ = f.gitlab_ui_checkbox_component :gravatar_enabled, _('Gravatar enabled')
.form-group
= f.label :default_projects_limit, _('Default projects limit'), class: 'label-bold'
@@ -38,16 +35,10 @@
.form-group
= f.label :user_oauth_applications, _('User OAuth applications'), class: 'label-bold'
- .form-check
- = f.check_box :user_oauth_applications, class: 'form-check-input'
- = f.label :user_oauth_applications, class: 'form-check-label' do
- = _('Allow users to register any application to use GitLab as an OAuth provider')
+ = f.gitlab_ui_checkbox_component :user_oauth_applications, _('Allow users to register any application to use GitLab as an OAuth provider')
.form-group
= f.label :user_default_external, _('New users set to external'), class: 'label-bold'
- .form-check
- = f.check_box :user_default_external, class: 'form-check-input'
- = f.label :user_default_external, class: 'form-check-label' do
- = _('Newly-registered users are external by default')
+ = f.gitlab_ui_checkbox_component :user_default_external, _('Newly-registered users are external by default')
.gl-mt-3
= _('Internal users')
= f.text_field :user_default_internal_regex, placeholder: _('Regex pattern'), class: 'form-control gl-form-input gl-mt-2'
@@ -57,22 +48,15 @@
- unless Gitlab.com?
.form-group
= f.label :deactivate_dormant_users, _('Dormant users'), class: 'label-bold'
- .form-check
- = f.check_box :deactivate_dormant_users, class: 'form-check-input'
- = f.label :deactivate_dormant_users, class: 'form-check-label' do
- = _('Deactivate dormant users after 90 days of inactivity')
- .help-block
- = _('Users can reactivate their account by signing in.')
- = link_to _('Learn more'), help_page_path('user/admin_area/moderate_users', anchor: 'automatically-deactivate-dormant-users'), target: '_blank', rel: 'noopener noreferrer'
+ - dormant_users_help_link = help_page_path('user/admin_area/moderate_users', anchor: 'automatically-deactivate-dormant-users')
+ - dormant_users_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: dormant_users_help_link }
+ = f.gitlab_ui_checkbox_component :deactivate_dormant_users, _('Deactivate dormant users after 90 days of inactivity'), help_text: _('Users can reactivate their account by signing in. %{link_start}Learn more%{link_end}').html_safe % { link_start: dormant_users_help_link_start, link_end: '</a>'.html_safe }
.form-group
= f.label :personal_access_token_prefix, _('Personal Access Token prefix'), class: 'label-light'
= f.text_field :personal_access_token_prefix, placeholder: _('Maximum 20 characters'), class: 'form-control gl-form-input'
.form-group
= f.label :user_show_add_ssh_key_message, _('Prompt users to upload SSH keys'), class: 'label-bold'
- .form-check
- = f.check_box :user_show_add_ssh_key_message, class: 'form-check-input'
- = f.label :user_show_add_ssh_key_message, class: 'form-check-label' do
- = _("Inform users without uploaded SSH keys that they can't push over SSH until one is added")
+ = f.gitlab_ui_checkbox_component :user_show_add_ssh_key_message, _("Inform users without uploaded SSH keys that they can't push over SSH until one is added")
= 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
diff --git a/app/views/admin/application_settings/_ci_cd.html.haml b/app/views/admin/application_settings/_ci_cd.html.haml
index 41698f9720b..201ca830ba4 100644
--- a/app/views/admin/application_settings/_ci_cd.html.haml
+++ b/app/views/admin/application_settings/_ci_cd.html.haml
@@ -1,80 +1,102 @@
-= form_for @application_setting, url: ci_cd_admin_application_settings_path(anchor: 'js-ci-cd-settings'), html: { class: 'fieldset-form' } do |f|
- = form_errors(@application_setting)
+.settings-content
+ = gitlab_ui_form_for @application_setting, url: ci_cd_admin_application_settings_path(anchor: 'js-ci-cd-settings'), html: { class: 'fieldset-form' } do |f|
+ = form_errors(@application_setting)
- %fieldset
- .form-group
- .form-check
- = f.check_box :auto_devops_enabled, class: 'form-check-input'
- = f.label :auto_devops_enabled, class: 'form-check-label' do
- = s_('CICD|Default to Auto DevOps pipeline for all projects')
+ %fieldset
+ .form-group
+ - devops_help_link_url = help_page_path('topics/autodevops/index.md')
+ - devops_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: devops_help_link_url }
+ = f.gitlab_ui_checkbox_component :auto_devops_enabled, s_('CICD|Default to Auto DevOps pipeline for all projects'), help_text: s_('CICD|The Auto DevOps pipeline runs by default in all projects with no CI/CD configuration file. %{link_start}What is Auto DevOps?%{link_end}').html_safe % { link_start: devops_help_link_start, link_end: '</a>'.html_safe }
+ .form-group
+ = f.label :auto_devops_domain, s_('AdminSettings|Auto DevOps domain'), class: 'label-bold'
+ = f.text_field :auto_devops_domain, class: 'form-control gl-form-input', placeholder: 'example.com'
.form-text.text-muted
- = s_('CICD|The Auto DevOps pipeline runs by default in all projects with no CI/CD configuration file.')
- = link_to _('What is Auto DevOps?'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer'
- .form-group
- = f.label :auto_devops_domain, s_('AdminSettings|Auto DevOps domain'), class: 'label-bold'
- = f.text_field :auto_devops_domain, class: 'form-control gl-form-input', placeholder: 'example.com'
- .form-text.text-muted
- = s_("AdminSettings|The default domain to use for Auto Review Apps and Auto Deploy stages in all projects.")
- = link_to _('Learn more.'), help_page_path('topics/autodevops/stages.md', anchor: 'auto-review-apps'), target: '_blank', rel: 'noopener noreferrer'
+ = s_("AdminSettings|The default domain to use for Auto Review Apps and Auto Deploy stages in all projects.")
+ = link_to _('Learn more.'), help_page_path('topics/autodevops/stages.md', anchor: 'auto-review-apps'), target: '_blank', rel: 'noopener noreferrer'
- .form-group
- .form-check
- = f.check_box :shared_runners_enabled, class: 'form-check-input'
- = f.label :shared_runners_enabled, class: 'form-check-label' do
- = s_("AdminSettings|Enable shared runners for new projects")
- .form-text.text-muted
- = s_("AdminSettings|All new projects can use the instance's shared runners by default.")
+ .form-group
+ = f.gitlab_ui_checkbox_component :shared_runners_enabled, s_("AdminSettings|Enable shared runners for new projects"), help_text: s_("AdminSettings|All new projects can use the instance's shared runners by default.")
- = render_if_exists 'admin/application_settings/shared_runners_minutes_setting', form: f
+ = render_if_exists 'admin/application_settings/shared_runners_minutes_setting', form: f
- .form-group
- = f.label :shared_runners_text, _('Shared runners details'), class: 'label-bold'
- = f.text_area :shared_runners_text, class: 'form-control gl-form-input', rows: 4
- .form-text.text-muted= _("Add a custom message with details about the instance's shared runners. The message is visible in group and project CI/CD settings, in the Runners section. Markdown is supported.")
- .form-group
- = f.label :max_artifacts_size, _('Maximum artifacts size (MB)'), class: 'label-bold'
- = f.number_field :max_artifacts_size, class: 'form-control gl-form-input'
- .form-text.text-muted
- = _("The maximum file size for job artifacts.")
- = link_to _('Learn more.'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size')
- .form-group
- = f.label :default_artifacts_expire_in, _('Default artifacts expiration'), class: 'label-bold'
- = f.text_field :default_artifacts_expire_in, class: 'form-control gl-form-input'
- .form-text.text-muted
- = html_escape(_("Set the default expiration time for job artifacts in all projects. Set to %{code_open}0%{code_close} to never expire artifacts by default. If no unit is written, it defaults to seconds. For example, these are all equivalent: %{code_open}3600%{code_close}, %{code_open}60 minutes%{code_close}, or %{code_open}one hour%{code_close}.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
- = link_to _('Learn more.'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'default-artifacts-expiration')
- .form-group
- .form-check
- = f.check_box :keep_latest_artifact, class: 'form-check-input'
- = f.label :keep_latest_artifact, class: 'form-check-label' do
- = s_('AdminSettings|Keep the latest artifacts for all jobs in the latest successful pipelines')
+ .form-group
+ = f.label :shared_runners_text, _('Shared runners details'), class: 'label-bold'
+ = f.text_area :shared_runners_text, class: 'form-control gl-form-input', rows: 4
+ .form-text.text-muted= _("Add a custom message with details about the instance's shared runners. The message is visible in group and project CI/CD settings, in the Runners section. Markdown is supported.")
+ .form-group
+ = f.label :max_artifacts_size, _('Maximum artifacts size (MB)'), class: 'label-bold'
+ = f.number_field :max_artifacts_size, class: 'form-control gl-form-input'
.form-text.text-muted
- = s_('AdminSettings|The latest artifacts for all jobs in the most recent successful pipelines in each project are stored and do not expire.')
- .form-group
- = f.label :archive_builds_in_human_readable, _('Archive jobs'), class: 'label-bold'
- = f.text_field :archive_builds_in_human_readable, class: 'form-control gl-form-input'
- .form-text.text-muted
- = html_escape(_("Jobs older than the configured time are considered expired and are archived. Archived jobs can no longer be retried. Leave empty to never archive jobs automatically. The default unit is in days, but you can use other units, for example %{code_open}15 days%{code_close}, %{code_open}1 month%{code_close}, %{code_open}2 years%{code_close}. Minimum value is 1 day.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
- = link_to _('Learn more.'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'archive-jobs')
- .form-group
- .form-check
- = f.check_box :protected_ci_variables, class: 'form-check-input'
- = f.label :protected_ci_variables, class: 'form-check-label' do
- = s_('AdminSettings|Protect CI/CD variables by default')
+ = _("The maximum file size for job artifacts.")
+ = link_to _('Learn more.'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size')
+ .form-group
+ = f.label :default_artifacts_expire_in, _('Default artifacts expiration'), class: 'label-bold'
+ = f.text_field :default_artifacts_expire_in, class: 'form-control gl-form-input'
.form-text.text-muted
- = s_('AdminSettings|New CI/CD variables in projects and groups default to protected.')
- .form-group
- = f.label :ci_config_path, _('Default CI/CD configuration file'), class: 'label-bold'
- = f.text_field :default_ci_config_path, class: 'form-control gl-form-input', placeholder: '.gitlab-ci.yml'
- %p.form-text.text-muted
- = _("The default CI/CD configuration file and path for new projects.").html_safe
- = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'specify-a-custom-cicd-configuration-file'), target: '_blank', rel: 'noopener noreferrer'
- .form-group
- .form-check
- = f.check_box :suggest_pipeline_enabled, class: 'form-check-input'
- = f.label :suggest_pipeline_enabled, class: 'form-check-label' do
- = s_('AdminSettings|Enable pipeline suggestion banner')
+ = html_escape(_("Set the default expiration time for job artifacts in all projects. Set to %{code_open}0%{code_close} to never expire artifacts by default. If no unit is written, it defaults to seconds. For example, these are all equivalent: %{code_open}3600%{code_close}, %{code_open}60 minutes%{code_close}, or %{code_open}one hour%{code_close}.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
+ = link_to _('Learn more.'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'default-artifacts-expiration')
+ .form-group
+ = f.gitlab_ui_checkbox_component :keep_latest_artifact, s_('AdminSettings|Keep the latest artifacts for all jobs in the latest successful pipelines'), help_text: s_('AdminSettings|The latest artifacts for all jobs in the most recent successful pipelines in each project are stored and do not expire.')
+ .form-group
+ = f.label :archive_builds_in_human_readable, _('Archive jobs'), class: 'label-bold'
+ = f.text_field :archive_builds_in_human_readable, class: 'form-control gl-form-input'
.form-text.text-muted
- = s_('AdminSettings|Display a banner on merge requests in projects with no pipelines to initiate steps to add a .gitlab-ci.yml file.')
+ = html_escape(_("Jobs older than the configured time are considered expired and are archived. Archived jobs can no longer be retried. Leave empty to never archive jobs automatically. The default unit is in days, but you can use other units, for example %{code_open}15 days%{code_close}, %{code_open}1 month%{code_close}, %{code_open}2 years%{code_close}. Minimum value is 1 day.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
+ = link_to _('Learn more.'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'archive-jobs')
+ .form-group
+ = f.gitlab_ui_checkbox_component :protected_ci_variables, s_('AdminSettings|Protect CI/CD variables by default'), help_text: s_('AdminSettings|New CI/CD variables in projects and groups default to protected.')
+ .form-group
+ = f.label :ci_config_path, _('Default CI/CD configuration file'), class: 'label-bold'
+ = f.text_field :default_ci_config_path, class: 'form-control gl-form-input', placeholder: '.gitlab-ci.yml'
+ %p.form-text.text-muted
+ = _("The default CI/CD configuration file and path for new projects.").html_safe
+ = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'specify-a-custom-cicd-configuration-file'), target: '_blank', rel: 'noopener noreferrer'
+ .form-group
+ = f.gitlab_ui_checkbox_component :suggest_pipeline_enabled, s_('AdminSettings|Enable pipeline suggestion banner'), help_text: s_('AdminSettings|Display a banner on merge requests in projects with no pipelines to initiate steps to add a .gitlab-ci.yml file.')
- = f.submit _('Save changes'), class: "gl-button btn btn-confirm"
+ = f.submit _('Save changes'), class: "gl-button btn btn-confirm"
+
+.settings-content
+ %h4
+ = s_('AdminSettings|CI/CD limits')
+ %p
+ = s_('AdminSettings|Set limit to 0 to disable it.')
+ .scrolling-tabs-container.inner-page-scroll-tabs
+ - if @plans.size > 1
+ %ul.nav-links.scrolling-tabs.mobile-separator.nav.nav-tabs.gl-mb-5
+ - @plans.each_with_index do |plan, index|
+ %li
+ = link_to admin_plan_limits_path(anchor: 'js-ci-cd-settings'), data: { target: "div#plan#{index}", action: "plan#{index}", toggle: 'tab'}, class: index == 0 ? 'active': '' do
+ = plan.name.capitalize
+ .tab-content.gl-tab-content
+ - @plans.each_with_index do |plan, index|
+ .tab-pane{ :id => "plan#{index}", class: index == 0 ? 'active': '' }
+ = form_for plan.actual_limits, url: admin_plan_limits_path(anchor: 'js-ci-cd-settings'), html: { class: 'fieldset-form' }, method: :post do |f|
+ = form_errors(plan)
+ %fieldset
+ = f.hidden_field(:plan_id, value: plan.id)
+ .form-group
+ = f.label :ci_pipeline_size, s_('AdminSettings|Maximum number of jobs in a single pipeline')
+ = f.number_field :ci_pipeline_size, class: 'form-control gl-form-input'
+ .form-group
+ = f.label :ci_active_jobs, s_('AdminSettings|Total number of jobs in currently active pipelines')
+ = f.number_field :ci_active_jobs, class: 'form-control gl-form-input'
+ .form-group
+ = f.label :ci_active_pipelines, s_('AdminSettings|Maximum number of active pipelines per project')
+ = f.number_field :ci_active_pipelines, class: 'form-control gl-form-input'
+ .form-group
+ = f.label :ci_project_subscriptions, s_('AdminSettings|Maximum number of pipeline subscriptions to and from a project')
+ = f.number_field :ci_project_subscriptions, class: 'form-control gl-form-input'
+ .form-group
+ = f.label :ci_pipeline_schedules, s_('AdminSettings|Maximum number of pipeline schedules')
+ = f.number_field :ci_pipeline_schedules, class: 'form-control gl-form-input'
+ .form-group
+ = f.label :ci_needs_size_limit, s_('AdminSettings|Maximum number of DAG dependencies that a job can have')
+ = f.number_field :ci_needs_size_limit, class: 'form-control gl-form-input'
+ .form-group
+ = f.label :ci_registered_group_runners, s_('AdminSettings|Maximum number of runners registered per group')
+ = f.number_field :ci_registered_group_runners, class: 'form-control gl-form-input'
+ .form-group
+ = f.label :ci_registered_project_runners, s_('AdminSettings|Maximum number of runners registered per project')
+ = f.number_field :ci_registered_project_runners, class: 'form-control gl-form-input'
+ = f.submit s_('AdminSettings|Save %{name} limits').html_safe % { name: plan.name.capitalize }, class: 'btn gl-button btn-confirm'
diff --git a/app/views/admin/application_settings/_eks.html.haml b/app/views/admin/application_settings/_eks.html.haml
index d9c0a01beb0..bd6ff9b426f 100644
--- a/app/views/admin/application_settings/_eks.html.haml
+++ b/app/views/admin/application_settings/_eks.html.haml
@@ -9,15 +9,13 @@
= _('Amazon EKS integration allows you to provision EKS clusters from GitLab.')
.settings-content
- = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-eks-settings'), html: { class: 'fieldset-form', id: 'eks-settings' } do |f|
+ = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-eks-settings'), html: { class: 'fieldset-form', id: 'eks-settings' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :eks_integration_enabled, class: 'form-check-input'
- = f.label :eks_integration_enabled, class: 'form-check-label' do
- = _('Enable Amazon EKS integration')
+ = f.gitlab_ui_checkbox_component :eks_integration_enabled,
+ _('Enable Amazon EKS integration')
.form-group
= f.label :eks_account_id, _('Account ID'), class: 'label-bold'
= f.text_field :eks_account_id, class: 'form-control gl-form-input'
diff --git a/app/views/admin/application_settings/_email.html.haml b/app/views/admin/application_settings/_email.html.haml
index 0ab462a3fa8..fd65d4029f5 100644
--- a/app/views/admin/application_settings/_email.html.haml
+++ b/app/views/admin/application_settings/_email.html.haml
@@ -1,21 +1,11 @@
-= form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-email-settings'), html: { class: 'fieldset-form' } do |f|
+= gitlab_ui_form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-email-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :email_author_in_body, class: 'form-check-input'
- = f.label :email_author_in_body, class: 'form-check-label' do
- = _('Include author name in notification email body')
- .form-text.text-muted
- = _("Include the name of the author of the issue, merge request or comment in the email body. By default, GitLab overrides the email sender's name. Some email servers don't support that option.")
+ = f.gitlab_ui_checkbox_component :email_author_in_body, _('Include author name in notification email body'), help_text: _("Include the name of the author of the issue, merge request or comment in the email body. By default, GitLab overrides the email sender's name. Some email servers don't support that option.")
.form-group
- .form-check
- = f.check_box :html_emails_enabled, class: 'form-check-input'
- = f.label :html_emails_enabled, class: 'form-check-label' do
- = _('Enable multipart emails')
- .form-text.text-muted
- = _('Send email in multipart format (HTML and plain text). Uncheck to send email messages in plain text only.')
+ = f.gitlab_ui_checkbox_component :html_emails_enabled, _('Enable multipart emails'), help_text: _('Send email in multipart format (HTML and plain text). Uncheck to send email messages in plain text only.')
.form-group
= f.label :commit_email_hostname, _('Custom hostname (for private commit emails)'), class: 'label-bold'
= f.text_field :commit_email_hostname, class: 'form-control gl-form-input'
@@ -26,19 +16,9 @@
= render_if_exists 'admin/application_settings/email_additional_text_setting', form: f
.form-group
- .form-check
- = f.check_box :in_product_marketing_emails_enabled, class: 'form-check-input'
- = f.label :in_product_marketing_emails_enabled, class: 'form-check-label' do
- = _('Enable in-product marketing emails')
- .form-text.text-muted
- = _('Send emails to help guide new users through the onboarding process.')
+ = f.gitlab_ui_checkbox_component :in_product_marketing_emails_enabled, _('Enable in-product marketing emails'), help_text: _('Send emails to help guide new users through the onboarding process.')
.form-group
- .form-check
- = f.check_box :user_deactivation_emails_enabled, class: 'form-check-input'
- = f.label :user_deactivation_emails_enabled, class: 'form-check-label' do
- = _('Enable user deactivation emails')
- .form-text.text-muted
- = _('Send emails to users upon account deactivation.')
+ = f.gitlab_ui_checkbox_component :user_deactivation_emails_enabled, _('Enable user deactivation emails'), help_text: _('Send emails to users upon account deactivation.')
= f.submit _('Save changes'), class: "gl-button btn btn-confirm", 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 4fb10d48540..1abf8f78060 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
@@ -9,17 +9,14 @@
= link_to _('Learn more.'), help_page_path('user/admin_area/settings/external_authorization'), target: '_blank', rel: 'noopener noreferrer'
.settings-content
- = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-external-auth-settings'), html: { class: 'fieldset-form', id: 'external-auth-settings' } do |f|
+ = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-external-auth-settings'), html: { class: 'fieldset-form', id: 'external-auth-settings' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :external_authorization_service_enabled, class: 'form-check-input'
- = f.label :external_authorization_service_enabled, class: 'form-check-label' do
- = s_('ExternalAuthorization|Enable classification control using an external service')
- %span.form-text.text-muted
- = external_authorization_description
+ = f.gitlab_ui_checkbox_component :external_authorization_service_enabled,
+ s_('ExternalAuthorization|Enable classification control using an external service'),
+ help_text: external_authorization_description
.form-group
= f.label :external_authorization_service_url, s_('ExternalAuthorization|Service URL'), class: 'label-bold'
= f.text_field :external_authorization_service_url, class: 'form-control gl-form-input'
diff --git a/app/views/admin/application_settings/_floc.html.haml b/app/views/admin/application_settings/_floc.html.haml
index 66259926064..14b1a58c1ad 100644
--- a/app/views/admin/application_settings/_floc.html.haml
+++ b/app/views/admin/application_settings/_floc.html.haml
@@ -11,12 +11,11 @@
= link_to sprite_icon('question-o'), 'https://github.com/WICG/floc', target: '_blank', rel: 'noopener noreferrer', class: 'has-tooltip', title: _('More information')
.settings-content
- = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-floc-settings'), html: { class: 'fieldset-form', id: 'floc-settings' } do |f|
+ = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-floc-settings'), html: { class: 'fieldset-form', id: 'floc-settings' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :floc_enabled, class: 'form-check-input'
- = f.label :floc_enabled, s_('FloC|Enable FloC (Federated Learning of Cohorts)'), class: 'form-check-label'
+ = f.gitlab_ui_checkbox_component :floc_enabled,
+ s_('FloC|Enable FloC (Federated Learning of Cohorts)')
= f.submit _('Save changes'), class: 'gl-button btn btn-confirm'
diff --git a/app/views/admin/application_settings/_git_lfs_limits.html.haml b/app/views/admin/application_settings/_git_lfs_limits.html.haml
index de5a2ceaa3d..b8970a5bcf1 100644
--- a/app/views/admin/application_settings/_git_lfs_limits.html.haml
+++ b/app/views/admin/application_settings/_git_lfs_limits.html.haml
@@ -1,16 +1,13 @@
-= form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-git-lfs-limits-settings'), html: { class: 'fieldset-form' } do |f|
+= gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-git-lfs-limits-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
%h5
= _('Authenticated Git LFS request rate limit')
.form-group
- .form-check
- = f.check_box :throttle_authenticated_git_lfs_enabled, class: 'form-check-input', data: { qa_selector: 'throttle_authenticated_git_lfs_checkbox' }
- = f.label :throttle_authenticated_git_lfs_enabled, class: 'form-check-label gl-font-weight-bold' do
- = _('Enable authenticated Git LFS request rate limit')
- %span.form-text.gl-text-gray-600
- = _('Helps reduce request volume (for example, from crawlers or abusive bots)')
+ = f.gitlab_ui_checkbox_component :throttle_authenticated_git_lfs_enabled,
+ _('Enable authenticated Git LFS request rate limit'),
+ help_text: _('Helps reduce request volume (for example, from crawlers or abusive bots)')
.form-group
= f.label :throttle_authenticated_git_lfs_requests_per_period, _('Max authenticated Git LFS requests per period per user'), class: 'gl-font-weight-bold'
= f.number_field :throttle_authenticated_git_lfs_requests_per_period, class: 'form-control gl-form-input'
diff --git a/app/views/admin/application_settings/_gitpod.html.haml b/app/views/admin/application_settings/_gitpod.html.haml
index 8f99a07b87c..515b3691324 100644
--- a/app/views/admin/application_settings/_gitpod.html.haml
+++ b/app/views/admin/application_settings/_gitpod.html.haml
@@ -12,14 +12,13 @@
.settings-content
- = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-gitpod-settings'), html: { class: 'fieldset-form', id: 'gitpod-settings' } do |f|
+ = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-gitpod-settings'), html: { class: 'fieldset-form', id: 'gitpod-settings' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :gitpod_enabled, class: 'form-check-input'
- = f.label :gitpod_enabled, s_('Gitpod|Enable Gitpod integration'), class: 'form-check-label'
+ = f.gitlab_ui_checkbox_component :gitpod_enabled,
+ s_('Gitpod|Enable Gitpod integration')
.form-group
= f.label :gitpod_url, s_('Gitpod|Gitpod URL'), class: 'label-bold'
= f.text_field :gitpod_url, class: 'form-control gl-form-input', placeholder: s_('Gitpod|https://gitpod.example.com')
diff --git a/app/views/admin/application_settings/_grafana.html.haml b/app/views/admin/application_settings/_grafana.html.haml
index 70c1e3ce3c1..7f305b9ad9c 100644
--- a/app/views/admin/application_settings/_grafana.html.haml
+++ b/app/views/admin/application_settings/_grafana.html.haml
@@ -1,14 +1,11 @@
-= form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-grafana-settings'), html: { class: 'fieldset-form' } do |f|
+= gitlab_ui_form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-grafana-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :grafana_enabled, class: 'form-check-input'
- = f.label :grafana_enabled, class: 'form-check-label' do
- = _("Add a link to Grafana")
- .form-text.text-muted
- = _("A Metrics Dashboard menu item appears in the Monitoring section of the Admin Area.")
+ = f.gitlab_ui_checkbox_component :grafana_enabled,
+ s_('ApplicationSettings|Add a link to Grafana'),
+ help_text: s_('ApplicationSettings|A Metrics Dashboard menu item appears in the Monitoring section of the Admin Area.')
.form-group
= f.label :grafana_url, _('Grafana URL'), class: 'label-bold'
= f.text_field :grafana_url, class: 'form-control gl-form-input', placeholder: '/-/grafana'
diff --git a/app/views/admin/application_settings/_help_page.html.haml b/app/views/admin/application_settings/_help_page.html.haml
index cd7eaa1896a..21eb4caf579 100644
--- a/app/views/admin/application_settings/_help_page.html.haml
+++ b/app/views/admin/application_settings/_help_page.html.haml
@@ -1,4 +1,4 @@
-= form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-help-settings'), html: { class: 'fieldset-form' } do |f|
+= gitlab_ui_form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-help-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
@@ -9,10 +9,7 @@
= f.text_area :help_page_text, class: 'form-control gl-form-input', rows: 4
.form-text.text-muted= _('Markdown enabled.')
.form-group
- .form-check
- = f.check_box :help_page_hide_commercial_content, class: 'form-check-input'
- = f.label :help_page_hide_commercial_content, class: 'form-check-label' do
- = _('Hide marketing-related entries from the Help page')
+ = f.gitlab_ui_checkbox_component :help_page_hide_commercial_content, _('Hide marketing-related entries from the Help page')
.form-group
= f.label :help_page_support_url, _('Support page URL'), class: 'label-bold'
= f.text_field :help_page_support_url, class: 'form-control gl-form-input', placeholder: 'https://company.example.com/getting-help', :'aria-describedby' => 'support_help_block'
diff --git a/app/views/admin/application_settings/_kroki.html.haml b/app/views/admin/application_settings/_kroki.html.haml
index b22eef83876..61469d87656 100644
--- a/app/views/admin/application_settings/_kroki.html.haml
+++ b/app/views/admin/application_settings/_kroki.html.haml
@@ -9,14 +9,13 @@
= _('Users can render diagrams in AsciiDoc, Markdown, reStructuredText, and Textile documents using Kroki.')
= link_to _('Learn more.'), help_page_path('administration/integration/kroki.md'), target: '_blank', rel: 'noopener noreferrer'
.settings-content
- = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-kroki-settings'), html: { class: 'fieldset-form', id: 'kroki-settings' } do |f|
+ = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-kroki-settings'), html: { class: 'fieldset-form', id: 'kroki-settings' } do |f|
= form_errors(@application_setting) if expanded
%fieldset
.form-group
- .form-check
- = f.check_box :kroki_enabled, class: 'form-check-input'
- = f.label :kroki_enabled, _('Enable Kroki'), class: 'form-check-label'
+ = f.gitlab_ui_checkbox_component :kroki_enabled,
+ _('Enable Kroki')
.form-group
= f.label :kroki_url, 'Kroki URL', class: 'label-bold'
= f.text_field :kroki_url, class: 'form-control gl-form-input', placeholder: 'http://your-kroki-instance:8000'
@@ -30,9 +29,7 @@
- container_link_url = 'https://docs.kroki.io/kroki/setup/install/#images'
- container_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: container_link_url }
= html_escape(_('To use the additional formats, you must start the required %{container_link_start}companion containers%{container_link_end}.')) % { container_link_start: container_link_start, container_link_end: '</a>'.html_safe }
- - kroki_available_formats.each do |format|
- .form-check
- = f.check_box format[:name], class: 'form-check-input'
- = f.label format[:name], format[:label], class: 'form-check-label'
+ - 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"
diff --git a/app/views/admin/application_settings/_localization.html.haml b/app/views/admin/application_settings/_localization.html.haml
index d0bb6a78ed6..a6ed48ef4fe 100644
--- a/app/views/admin/application_settings/_localization.html.haml
+++ b/app/views/admin/application_settings/_localization.html.haml
@@ -1,4 +1,4 @@
-= form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-localization-settings'), html: { class: 'fieldset-form' } do |f|
+= gitlab_ui_form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-localization-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
@@ -11,13 +11,9 @@
.form-group
= f.label :time_tracking, _('Time tracking'), class: 'label-bold'
- .form-check
- = f.check_box :time_tracking_limit_to_hours, class: 'form-check-input'
- = f.label :time_tracking_limit_to_hours, class: 'form-check-label' do
- = _('Limit display of time tracking units to hours.')
- .form-text.text-muted
- = _('Display time tracking in issues in total hours only.')
- = link_to _('What is time tracking?'), help_page_path('user/project/time_tracking.md'), target: '_blank', rel: 'noopener noreferrer'
+ - time_tracking_help_link = help_page_path('user/project/time_tracking.md')
+ - time_tracking_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: time_tracking_help_link }
+ = f.gitlab_ui_checkbox_component :time_tracking_limit_to_hours, _('Limit display of time tracking units to hours.'), help_text: _('Display time tracking in issues in total hours only. %{link_start}What is time tracking?%{link_end}').html_safe % { link_start: time_tracking_help_link_start, link_end: '</a>'.html_safe }
= f.submit _('Save changes'), class: "gl-button btn btn-confirm"
diff --git a/app/views/admin/application_settings/_mailgun.html.haml b/app/views/admin/application_settings/_mailgun.html.haml
index ad9e84ffdab..7afb35bc9cb 100644
--- a/app/views/admin/application_settings/_mailgun.html.haml
+++ b/app/views/admin/application_settings/_mailgun.html.haml
@@ -8,14 +8,13 @@
%p
= _('Configure the %{link} integration.').html_safe % { link: link_to(_('Mailgun events'), 'https://documentation.mailgun.com/en/latest/user_manual.html#webhooks', target: '_blank', rel: 'noopener noreferrer') }
.settings-content
- = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-mailgun-settings'), html: { class: 'fieldset-form', id: 'mailgun-settings' } do |f|
+ = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-mailgun-settings'), html: { class: 'fieldset-form', id: 'mailgun-settings' } do |f|
= form_errors(@application_setting) if expanded
%fieldset
.form-group
- .form-check
- = f.check_box :mailgun_events_enabled, class: 'form-check-input'
- = f.label :mailgun_events_enabled, _('Enable Mailgun event receiver'), class: 'form-check-label'
+ = f.gitlab_ui_checkbox_component :mailgun_events_enabled,
+ _('Enable Mailgun event receiver')
.form-group
= f.label :mailgun_signing_key, _('Mailgun HTTP webhook signing key'), class: 'label-light'
= f.text_field :mailgun_signing_key, class: 'form-control gl-form-input'
diff --git a/app/views/admin/application_settings/_note_limits.html.haml b/app/views/admin/application_settings/_note_limits.html.haml
index 38a5d6a1010..d4ae0d3944c 100644
--- a/app/views/admin/application_settings/_note_limits.html.haml
+++ b/app/views/admin/application_settings/_note_limits.html.haml
@@ -7,8 +7,8 @@
= f.number_field :notes_create_limit, class: 'form-control gl-form-input'
.form-group
= f.label :notes_create_limit_allowlist, _('Users to exclude from the rate limit'), class: 'label-bold'
- = f.text_area :notes_create_limit_allowlist_raw, placeholder: 'username1, username2', class: 'form-control gl-form-input', rows: 5
- .form-text.text-muted
+ = f.text_area :notes_create_limit_allowlist_raw, class: 'form-control gl-form-input', rows: 5, aria: { describedBy: 'note-create-limits-allowlist-field-description' }
+ .form-text.text-muted{ id: 'note-create-limits-allowlist-field-description' }
= _('List of users allowed to exceed the rate limit.')
diff --git a/app/views/admin/application_settings/_outbound.html.haml b/app/views/admin/application_settings/_outbound.html.haml
index 9a31fdd7fdf..503e7d8afa6 100644
--- a/app/views/admin/application_settings/_outbound.html.haml
+++ b/app/views/admin/application_settings/_outbound.html.haml
@@ -1,16 +1,13 @@
-= form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-outbound-settings'), html: { class: 'fieldset-form' } do |f|
+= gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-outbound-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :allow_local_requests_from_web_hooks_and_services, class: 'form-check-input', data: { qa_selector: 'allow_requests_from_services_checkbox' }
- = f.label :allow_local_requests_from_web_hooks_and_services, class: 'form-check-label' do
- = s_('OutboundRequests|Allow requests to the local network from web hooks and services')
- .form-check
- = f.check_box :allow_local_requests_from_system_hooks, class: 'form-check-input'
- = f.label :allow_local_requests_from_system_hooks, class: 'form-check-label' do
- = s_('OutboundRequests|Allow requests to the local network from system hooks')
+ = f.gitlab_ui_checkbox_component :allow_local_requests_from_web_hooks_and_services,
+ s_('OutboundRequests|Allow requests to the local network from web hooks and services'),
+ checkbox_options: { data: { qa_selector: 'allow_requests_from_services_checkbox' } }
+ = f.gitlab_ui_checkbox_component :allow_local_requests_from_system_hooks,
+ s_('OutboundRequests|Allow requests to the local network from system hooks')
.form-group
= f.label :outbound_local_requests_allowlist_raw, class: 'label-bold' do
@@ -21,11 +18,8 @@
= link_to _('Learn more.'), help_page_path('security/webhooks.md', anchor: 'allowlist-for-local-requests'), target: '_blank', rel: 'noopener noreferrer'
.form-group
- .form-check
- = f.check_box :dns_rebinding_protection_enabled, class: 'form-check-input'
- = f.label :dns_rebinding_protection_enabled, class: 'form-check-label' do
- = s_('OutboundRequests|Enforce DNS rebinding attack protection')
- %span.form-text.text-muted
- = s_('OutboundRequests|Resolve IP addresses once and uses them to submit requests.')
+ = f.gitlab_ui_checkbox_component :dns_rebinding_protection_enabled,
+ s_('OutboundRequests|Enforce DNS rebinding attack protection'),
+ help_text: _('OutboundRequests|Resolve IP addresses once and uses them to submit requests.')
= f.submit _('Save changes'), class: "gl-button btn btn-confirm", 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 d14c8cffcc7..74903d52f25 100644
--- a/app/views/admin/application_settings/_pages.html.haml
+++ b/app/views/admin/application_settings/_pages.html.haml
@@ -1,26 +1,20 @@
-= form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-pages-settings'), html: { class: 'fieldset-form' } do |f|
+= gitlab_ui_form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-pages-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :pages_domain_verification_enabled, class: 'form-check-input'
- = f.label :pages_domain_verification_enabled, class: 'form-check-label' do
- = s_("AdminSettings|Require users to prove ownership of custom domains")
- .form-text.text-muted
- - pages_link_url = help_page_path('administration/pages/index', anchor: 'custom-domain-verification')
- - pages_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: pages_link_url }
- = s_('AdminSettings|Domain verification is an essential security measure for public GitLab sites. Users are required to demonstrate they control a domain before it is enabled. %{link_start}Learn more.%{link_end}').html_safe % { link_start: pages_link_start, link_end: '</a>'.html_safe }
+ - pages_link_url = help_page_path('administration/pages/index', anchor: 'custom-domain-verification')
+ - pages_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: pages_link_url }
+ = f.gitlab_ui_checkbox_component :pages_domain_verification_enabled,
+ s_("AdminSettings|Require users to prove ownership of custom domains"),
+ help_text: s_('AdminSettings|Domain verification is an essential security measure for public GitLab sites. Users are required to demonstrate they control a domain before it is enabled. %{link_start}Learn more.%{link_end}').html_safe % { link_start: pages_link_start, link_end: '</a>'.html_safe }
- if Gitlab.config.pages.access_control
.form-group
- .form-check
- = f.check_box :force_pages_access_control, class: 'form-check-input'
- = f.label :force_pages_access_control, class: 'form-check-label' do
- = s_("AdminSettings|Disable public access to Pages sites")
- .form-text.text-muted
- - pages_link_url = help_page_path('administration/pages/index', anchor: 'disable-public-access-to-all-pages-sites')
- - pages_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: pages_link_url }
- = s_("AdminSettings|Select to disable public access for Pages sites, which requires users to sign in for access to the Pages sites in your instance. %{link_start}Learn more.%{link_end}").html_safe % { link_start: pages_link_start, link_end: '</a>'.html_safe }
+ - pages_link_url = help_page_path('administration/pages/index', anchor: 'disable-public-access-to-all-pages-sites')
+ - pages_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: pages_link_url }
+ = f.gitlab_ui_checkbox_component :force_pages_access_control,
+ s_("AdminSettings|Disable public access to Pages sites"),
+ help_text: s_("AdminSettings|Select to disable public access for Pages sites, which requires users to sign in for access to the Pages sites in your instance. %{link_start}Learn more.%{link_end}").html_safe % { link_start: pages_link_start, link_end: '</a>'.html_safe }
.form-group
= f.label :max_pages_size, _('Maximum size of pages (MB)'), class: 'label-bold'
= f.number_field :max_pages_size, class: 'form-control gl-form-input'
@@ -41,10 +35,8 @@
- pages_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: pages_link_url }
= s_("AdminSettings|A Let's Encrypt account will be configured for this GitLab instance using this email address. You will receive emails to warn of expiring certificates. %{link_start}Learn more.%{link_end}").html_safe % { link_start: pages_link_start, link_end: '</a>'.html_safe }
.form-group
- .form-check
- = f.check_box :lets_encrypt_terms_of_service_accepted, class: 'form-check-input'
- = f.label :lets_encrypt_terms_of_service_accepted, class: 'form-check-label' do
- - terms_of_service_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: lets_encrypt_terms_of_service_admin_application_settings_path }
- = s_("AdminSettings|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 }
+ - 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 }
+ = f.gitlab_ui_checkbox_component :lets_encrypt_terms_of_service_accepted,
+ s_("AdminSettings|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: "gl-button btn btn-confirm"
diff --git a/app/views/admin/application_settings/_performance.html.haml b/app/views/admin/application_settings/_performance.html.haml
index 82e56cf8b81..e0ba8d93fbd 100644
--- a/app/views/admin/application_settings/_performance.html.haml
+++ b/app/views/admin/application_settings/_performance.html.haml
@@ -1,15 +1,12 @@
-= form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-performance-settings'), html: { class: 'fieldset-form' } do |f|
+= gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-performance-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :authorized_keys_enabled, class: 'form-check-input'
- = f.label :authorized_keys_enabled, class: 'form-check-label' do
- = _('Use authorized_keys file to authenticate SSH keys')
- .form-text.text-muted
- = _('Authenticate user SSH keys without requiring additional configuration. Performance of GitLab can be improved by using the GitLab database instead.')
- = link_to _('How do I configure authentication using the GitLab database?'), help_page_path('administration/operations/fast_ssh_key_lookup'), target: '_blank', rel: 'noopener noreferrer'
+ - help_link = help_page_path('administration/operations/fast_ssh_key_lookup')
+ - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_link }
+ = f.gitlab_ui_checkbox_component :authorized_keys_enabled, _('Use authorized_keys file to authenticate SSH keys'),
+ help_text: _('Authenticate user SSH keys without requiring additional configuration. Performance of GitLab can be improved by using the GitLab database instead. %{link_start}How do I configure authentication using the GitLab database? %{link_end}').html_safe % { link_start: help_link_start, link_end: '</a>'.html_safe}
.form-group
= f.label :raw_blob_request_limit, _('Raw blob request rate limit per minute'), class: 'label-bold'
= f.number_field :raw_blob_request_limit, class: 'form-control gl-form-input'
diff --git a/app/views/admin/application_settings/_performance_bar.html.haml b/app/views/admin/application_settings/_performance_bar.html.haml
index 58ea2be8b61..4e37c4c3c98 100644
--- a/app/views/admin/application_settings/_performance_bar.html.haml
+++ b/app/views/admin/application_settings/_performance_bar.html.haml
@@ -1,12 +1,11 @@
-= form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-performance-bar-settings'), html: { class: 'fieldset-form' } do |f|
+= gitlab_ui_form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-performance-bar-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :performance_bar_enabled, class: 'form-check-input', data: { qa_selector: 'enable_performance_bar_checkbox'}
- = f.label :performance_bar_enabled, class: 'form-check-label' do
- = _("Allow non-administrators access to the performance bar")
+ = f.gitlab_ui_checkbox_component :performance_bar_enabled,
+ s_("Allow non-administrators access to the performance bar"),
+ checkbox_options: { data: { qa_selector: 'enable_performance_bar_checkbox' } }
.form-group
= f.label :performance_bar_allowed_group_path, _('Allow access to members of the following group'), class: 'label-bold'
= f.text_field :performance_bar_allowed_group_path, class: 'form-control gl-form-input', placeholder: 'my-org/my-group', value: @application_setting.performance_bar_allowed_group&.full_path
diff --git a/app/views/admin/application_settings/_plantuml.html.haml b/app/views/admin/application_settings/_plantuml.html.haml
index 39de15dc38d..42914652655 100644
--- a/app/views/admin/application_settings/_plantuml.html.haml
+++ b/app/views/admin/application_settings/_plantuml.html.haml
@@ -9,14 +9,13 @@
= _('Render diagrams in your documents using PlantUML.')
= link_to _('Learn more.'), help_page_path('administration/integration/plantuml.md'), target: '_blank', rel: 'noopener noreferrer'
.settings-content
- = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-plantuml-settings'), html: { class: 'fieldset-form', id: 'plantuml-settings' } do |f|
+ = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-plantuml-settings'), html: { class: 'fieldset-form', id: 'plantuml-settings' } do |f|
= form_errors(@application_setting) if expanded
%fieldset
.form-group
- .form-check
- = f.check_box :plantuml_enabled, class: 'form-check-input'
- = f.label :plantuml_enabled, _('Enable PlantUML'), class: 'form-check-label'
+ = f.gitlab_ui_checkbox_component :plantuml_enabled,
+ _('Enable PlantUML')
.form-group
= f.label :plantuml_url, _('PlantUML URL'), class: 'label-bold'
= f.text_field :plantuml_url, class: 'form-control gl-form-input', placeholder: 'http://your-plantuml-instance:8080'
diff --git a/app/views/admin/application_settings/_protected_paths.html.haml b/app/views/admin/application_settings/_protected_paths.html.haml
index d273c81f51d..1f3f67c71c7 100644
--- a/app/views/admin/application_settings/_protected_paths.html.haml
+++ b/app/views/admin/application_settings/_protected_paths.html.haml
@@ -1,14 +1,11 @@
-= form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-protected-paths-settings'), html: { class: 'fieldset-form' } do |f|
+= gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-protected-paths-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :throttle_protected_paths_enabled, class: 'form-check-input'
- = f.label :throttle_protected_paths_enabled, class: 'form-check-label' do
- = _('Enable rate limiting for POST requests to the specified paths')
- %span.form-text.text-muted
- = _('Helps reduce request volume for protected paths.')
+ = f.gitlab_ui_checkbox_component :throttle_protected_paths_enabled,
+ _('Enable rate limiting for POST requests to the specified paths'),
+ help_text: _('Helps reduce request volume for protected paths.')
.form-group
= f.label :throttle_protected_paths_requests_per_period, 'Maximum requests per period per user', class: 'label-bold'
= f.number_field :throttle_protected_paths_requests_per_period, class: 'form-control gl-form-input'
diff --git a/app/views/admin/application_settings/_registry.html.haml b/app/views/admin/application_settings/_registry.html.haml
index 364a7cf5a8e..eb1f94a2f04 100644
--- a/app/views/admin/application_settings/_registry.html.haml
+++ b/app/views/admin/application_settings/_registry.html.haml
@@ -1,4 +1,4 @@
-= form_for @application_setting, url: ci_cd_admin_application_settings_path(anchor: 'js-registry-settings'), html: { class: 'fieldset-form' } do |f|
+= gitlab_ui_form_for @application_setting, url: ci_cd_admin_application_settings_path(anchor: 'js-registry-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
@@ -6,14 +6,13 @@
= f.label :container_registry_token_expire_delay, _('Authorization token duration (minutes)'), class: 'label-bold'
= f.number_field :container_registry_token_expire_delay, class: 'form-control gl-form-input'
.form-group
- .form-check
- = f.check_box :container_expiration_policies_enable_historic_entries, class: 'form-check-input'
- = f.label :container_expiration_policies_enable_historic_entries, class: 'form-check-label' do
- = _("Enable container expiration and retention policies for projects created earlier than GitLab 12.7.")
- = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'cleanup-policy')
- .form-text.text-muted
- = _("Existing projects will be able to use expiration policies. Avoid enabling this if an external Container Registry is being used, as there is a performance risk if many images exist on one project.")
- = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'use-with-external-container-registries')
+ - label = _("Enable container expiration and retention policies for projects created earlier than GitLab 12.7.")
+ - label_link = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'cleanup-policy')
+ - help_text = _("Existing projects will be able to use expiration policies. Avoid enabling this if an external Container Registry is being used, as there is a performance risk if many images exist on one project.")
+ - help_link = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'use-with-external-container-registries')
+ = f.gitlab_ui_checkbox_component :container_expiration_policies_enable_historic_entries,
+ '%{label} %{label_link}'.html_safe % { label: label, label_link: label_link },
+ help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text, help_link: help_link }
- if container_registry_expiration_policies_throttling?
.form-group
= f.label :container_registry_delete_tags_service_timeout, _('Cleanup policy maximum processing time (seconds)'), class: 'label-bold'
@@ -31,12 +30,9 @@
.form-text.text-muted
= _("The maximum number of tags that a single worker accepts for cleanup. If the number of tags goes above this limit, the list of tags to delete is truncated to this number. To remove this limit, set it to 0.")
.form-group
- .form-check
- = f.check_box :container_registry_expiration_policies_caching, class: 'form-check-input'
- = f.label :container_registry_expiration_policies_caching, class: 'form-check-label' do
- = _("Enable container expiration caching.")
- .form-text.text-muted
- = _("When enabled, cleanup polices execute faster but put more load on Redis.")
- = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'set-cleanup-limits-to-conserve-resources')
+ - help_text = _("When enabled, cleanup polices execute faster but put more load on Redis.")
+ - help_link = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'set-cleanup-limits-to-conserve-resources')
+ = f.gitlab_ui_checkbox_component :container_registry_expiration_policies_caching, _("Enable container expiration caching."),
+ help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text, help_link: help_link }
= f.submit _('Save changes'), class: "gl-button btn btn-confirm"
diff --git a/app/views/admin/application_settings/_repository_check.html.haml b/app/views/admin/application_settings/_repository_check.html.haml
index ce81f81c125..c2087efa650 100644
--- a/app/views/admin/application_settings/_repository_check.html.haml
+++ b/app/views/admin/application_settings/_repository_check.html.haml
@@ -1,16 +1,13 @@
-= form_for @application_setting, url: repository_admin_application_settings_path(anchor: 'js-repository-check-settings'), html: { class: 'fieldset-form' } do |f|
+= gitlab_ui_form_for @application_setting, url: repository_admin_application_settings_path(anchor: 'js-repository-check-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.sub-section
%h4= _("Repository checks")
.form-group
- .form-check
- = f.check_box :repository_checks_enabled, class: 'form-check-input'
- = f.label :repository_checks_enabled, class: 'form-check-label' do
- = _("Enable repository checks")
- .form-text.text-muted
- = html_escape(s_('Run %{code_start}git fsck%{code_end} periodically in all project and wiki repositories to look for silent disk corruption issues.')) % { code_start: '<code>'.html_safe, code_end: '</code>'.html_safe }
+ = f.gitlab_ui_checkbox_component :repository_checks_enabled,
+ _("Enable repository checks"),
+ help_text: html_escape(s_('Run %{code_start}git fsck%{code_end} periodically in all project and wiki repositories to look for silent disk corruption issues.')) % { code_start: '<code>'.html_safe, code_end: '</code>'.html_safe }
.form-group
.form-text.text-muted
= _("If you get a lot of false alarms from repository checks, you can clear all repository check information from the database.")
@@ -21,20 +18,11 @@
.sub-section
%h4= _("Housekeeping")
.form-group
- .form-check
- = f.check_box :housekeeping_enabled, class: 'form-check-input'
- = f.label :housekeeping_enabled, class: 'form-check-label' do
- = _("Enable automatic repository housekeeping")
- .form-text.text-muted
- = _("Leaving this setting enabled is recommended.")
- = link_to s_('Learn more.'), help_page_path('administration/housekeeping.md', anchor: 'housekeeping-options'), target: '_blank', rel: 'noopener noreferrer'
- .form-check
- = f.check_box :housekeeping_bitmaps_enabled, class: 'form-check-input'
- = f.label :housekeeping_bitmaps_enabled, class: 'form-check-label' do
- = _("Enable Git pack file bitmap creation")
- .form-text.text-muted
- = _("Improves Git cloning performance.")
- = link_to s_('Learn more.'), help_page_path('administration/housekeeping.md', anchor: 'housekeeping-options'), target: '_blank', rel: 'noopener noreferrer'
+ - help_text = _("Leaving this setting enabled is recommended.")
+ - help_link = link_to s_('Learn more.'), help_page_path('administration/housekeeping.md', anchor: 'housekeeping-options'), 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 }
.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'
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 0c9b04c02d1..dad8d5f3fae 100644
--- a/app/views/admin/application_settings/_repository_mirrors_form.html.haml
+++ b/app/views/admin/application_settings/_repository_mirrors_form.html.haml
@@ -1,15 +1,11 @@
-= form_for @application_setting, url: repository_admin_application_settings_path(anchor: 'js-mirror-settings') do |f|
+= gitlab_ui_form_for @application_setting, url: repository_admin_application_settings_path(anchor: 'js-mirror-settings') do |f|
= form_errors(@application_setting)
%fieldset
.form-group
= f.label :mirror_available, _('Repository mirroring configuration'), class: 'label-bold'
- .form-check
- = f.check_box :mirror_available, class: 'form-check-input'
- = f.label :mirror_available, class: 'form-check-label' do
- = _('Allow project maintainers to configure repository mirroring')
- %span.form-text.text-muted
- = _('If disabled, only administrators can configure repository mirroring.')
+ = f.gitlab_ui_checkbox_component :mirror_available, _('Allow project maintainers to configure repository mirroring'),
+ help_text: _('If disabled, only administrators can configure repository mirroring.')
= render_if_exists 'admin/application_settings/mirror_settings', form: f
diff --git a/app/views/admin/application_settings/_sentry.html.haml b/app/views/admin/application_settings/_sentry.html.haml
index 5fd373d59e9..cfd34f6ca15 100644
--- a/app/views/admin/application_settings/_sentry.html.haml
+++ b/app/views/admin/application_settings/_sentry.html.haml
@@ -1,4 +1,4 @@
-= form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-sentry-settings'), html: { class: 'fieldset-form', id: 'sentry-settings' } do |f|
+= gitlab_ui_form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-sentry-settings'), html: { class: 'fieldset-form', id: 'sentry-settings' } do |f|
= form_errors(@application_setting)
%span.text-muted
@@ -6,9 +6,7 @@
%fieldset
.form-group
- .form-check
- = f.check_box :sentry_enabled, class: 'form-check-input'
- = f.label :sentry_enabled, _('Enable Sentry error tracking'), class: 'form-check-label'
+ = f.gitlab_ui_checkbox_component :sentry_enabled, _('Enable Sentry error tracking')
.form-group
= f.label :sentry_dsn, _('DSN'), class: 'label-light'
= f.text_field :sentry_dsn, class: 'form-control gl-form-input', placeholder: 'https://public@sentry.example.com/1'
diff --git a/app/views/admin/application_settings/_signup.html.haml b/app/views/admin/application_settings/_signup.html.haml
index a658ba63939..85cf43ba5c2 100644
--- a/app/views/admin/application_settings/_signup.html.haml
+++ b/app/views/admin/application_settings/_signup.html.haml
@@ -16,6 +16,6 @@
domain_denylist_raw: @application_setting.domain_denylist_raw,
email_restrictions_enabled: @application_setting[:email_restrictions_enabled].to_s,
supported_syntax_link_url: 'https://github.com/google/re2/wiki/Syntax',
- email_restrictions: @application_setting.email_restrictions,
- after_sign_up_text: @application_setting[:after_sign_up_text],
+ email_restrictions: @application_setting.email_restrictions.to_s,
+ after_sign_up_text: @application_setting[:after_sign_up_text].to_s,
pending_user_count: pending_user_count } }
diff --git a/app/views/admin/application_settings/_snowplow.html.haml b/app/views/admin/application_settings/_snowplow.html.haml
index f7a6a26c645..378c1712ae0 100644
--- a/app/views/admin/application_settings/_snowplow.html.haml
+++ b/app/views/admin/application_settings/_snowplow.html.haml
@@ -9,14 +9,12 @@
- link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('development/snowplow/index') }
= html_escape(_('Configure %{link} to track events. %{link_start}Learn more.%{link_end}')) % { link: link_to('Snowplow', 'https://snowplowanalytics.com/', target: '_blank', rel: 'noopener noreferrer').html_safe, link_start: link_start, link_end: '</a>'.html_safe }
.settings-content
- = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-snowplow-settings'), html: { class: 'fieldset-form', id: 'snowplow-settings' } do |f|
+ = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-snowplow-settings'), html: { class: 'fieldset-form', id: 'snowplow-settings' } do |f|
= form_errors(@application_setting) if expanded
%fieldset
.form-group
- .form-check
- = f.check_box :snowplow_enabled, class: 'form-check-input', data: { qa_selector: 'snowplow_enabled_checkbox' }
- = f.label :snowplow_enabled, _('Enable Snowplow tracking'), class: 'form-check-label'
+ = f.gitlab_ui_checkbox_component :snowplow_enabled, _('Enable Snowplow tracking'), checkbox_options: { data: { qa_selector: 'snowplow_enabled_checkbox' } }
.form-group
= f.label :snowplow_collector_hostname, _('Collector hostname'), class: 'label-light'
= f.text_field :snowplow_collector_hostname, class: 'form-control gl-form-input', placeholder: 'snowplow.example.com'
diff --git a/app/views/admin/application_settings/_sourcegraph.html.haml b/app/views/admin/application_settings/_sourcegraph.html.haml
index 65b2a95bcc1..391f79e431b 100644
--- a/app/views/admin/application_settings/_sourcegraph.html.haml
+++ b/app/views/admin/application_settings/_sourcegraph.html.haml
@@ -16,20 +16,14 @@
.settings-content
- = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-sourcegraph-settings'), html: { class: 'fieldset-form', id: 'sourcegraph-settings' } do |f|
+ = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-sourcegraph-settings'), html: { class: 'fieldset-form', id: 'sourcegraph-settings' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :sourcegraph_enabled, class: 'form-check-input'
- = f.label :sourcegraph_enabled, s_('SourcegraphAdmin|Enable Sourcegraph'), class: 'form-check-label'
+ = f.gitlab_ui_checkbox_component :sourcegraph_enabled, s_('SourcegraphAdmin|Enable Sourcegraph')
.form-group
- .form-check
- = f.check_box :sourcegraph_public_only, class: 'form-check-input'
- = f.label :sourcegraph_public_only, s_('SourcegraphAdmin|Block on private and internal projects'), class: 'form-check-label'
- .form-text.text-muted
- = s_('SourcegraphAdmin|Only public projects have code intelligence enabled and communicate with Sourcegraph.')
+ = f.gitlab_ui_checkbox_component :sourcegraph_public_only, s_('SourcegraphAdmin|Block on private and internal projects'), help_text: s_('SourcegraphAdmin|Only public projects have code intelligence enabled and communicate with Sourcegraph.')
.form-group
= f.label :sourcegraph_url, s_('SourcegraphAdmin|Sourcegraph URL'), class: 'label-bold'
= f.text_field :sourcegraph_url, class: 'form-control gl-form-input', placeholder: s_('SourcegraphAdmin|https://sourcegraph.example.com')
diff --git a/app/views/admin/application_settings/_spam.html.haml b/app/views/admin/application_settings/_spam.html.haml
index 27113fddb27..bb512940be2 100644
--- a/app/views/admin/application_settings/_spam.html.haml
+++ b/app/views/admin/application_settings/_spam.html.haml
@@ -1,4 +1,4 @@
-= form_for @application_setting, url: reporting_admin_application_settings_path(anchor: 'js-spam-settings'), html: { class: 'fieldset-form' } do |f|
+= gitlab_ui_form_for @application_setting, url: reporting_admin_application_settings_path(anchor: 'js-spam-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
@@ -8,20 +8,13 @@
= _('reCAPTCHA helps prevent credential stuffing.')
= link_to _('Only reCAPTCHA v2 is supported:'), 'https://developers.google.com/recaptcha/docs/versions', target: '_blank', rel: 'noopener noreferrer'
.form-group
- .form-check
- = f.check_box :recaptcha_enabled, class: 'form-check-input'
- = f.label :recaptcha_enabled, class: 'form-check-label' do
- = _("Enable reCAPTCHA")
- %span.form-text.text-muted#recaptcha_help_block
- = _('Helps prevent bots from creating accounts.')
- = link_to _('How do I configure it?'), help_page_path('integration/recaptcha.md'), target: '_blank', rel: 'noopener noreferrer'
+ - spam_help_link_url = help_page_path('integration/recaptcha.md')
+ - spam_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: spam_help_link_url }
+ = f.gitlab_ui_checkbox_component :recaptcha_enabled, _("Enable reCAPTCHA"),
+ help_text: _('Helps prevent bots from creating accounts. %{link_start}How do I configure it?%{link_end}').html_safe % { link_start: spam_help_link_start, link_end: '</a>'.html_safe }
.form-group
- .form-check
- = f.check_box :login_recaptcha_protection_enabled, class: 'form-check-input'
- = f.label :login_recaptcha_protection_enabled, class: 'form-check-label' do
- = _('Enable reCAPTCHA for login.')
- %span.form-text.text-muted#recaptcha_help_block
- = _('Helps prevent bots from brute-force attacks.')
+ = f.gitlab_ui_checkbox_component :login_recaptcha_protection_enabled, _('Enable reCAPTCHA for login.'),
+ help_text: _('Helps prevent bots from brute-force attacks.')
.form-group
= f.label :recaptcha_site_key, _('reCAPTCHA site key'), class: 'label-bold'
= f.text_field :recaptcha_site_key, class: 'form-control gl-form-input'
@@ -40,12 +33,8 @@
= link_to _('Read their documentation.'), 'https://github.com/markets/invisible_captcha', target: '_blank', rel: 'noopener noreferrer'
.form-group
- .form-check
- = f.check_box :invisible_captcha_enabled, class: 'form-check-input'
- = f.label :invisible_captcha_enabled, class: 'form-check-label' do
- = _('Enable Invisible Captcha during sign up')
- %span.form-text.text-muted
- = _('Helps prevent bots from creating accounts.')
+ = f.gitlab_ui_checkbox_component :invisible_captcha_enabled, _('Enable Invisible Captcha during sign up'),
+ help_text: _('Helps prevent bots from creating accounts.')
%h5
= _('Akismet')
@@ -54,11 +43,8 @@
= link_to _('How do I configure Akismet?'), help_page_path('integration/akismet.md'), target: '_blank', rel: 'noopener noreferrer'
.form-group
- .form-check
- = f.check_box :akismet_enabled, class: 'form-check-input'
- = f.label :akismet_enabled, class: 'form-check-label' do
- Enable Akismet
- %span.form-text.text-muted#akismet_help_block= _("Helps prevent bots from creating issues.")
+ = f.gitlab_ui_checkbox_component :akismet_enabled, _('Enable Akismet'),
+ help_text: _("Helps prevent bots from creating issues.")
.form-group
= f.label :akismet_api_key, _('Akismet API Key'), class: 'label-bold'
@@ -71,12 +57,8 @@
= _('IP address restrictions')
.form-group
- .form-check
- = f.check_box :unique_ips_limit_enabled, class: 'form-check-input'
- = f.label :unique_ips_limit_enabled, class: 'form-check-label' do
- = _("Limit sign in from multiple IP addresses")
- %span.form-text.text-muted#unique_ip_help_block
- = _("Helps prevent malicious users hide their activity.")
+ = f.gitlab_ui_checkbox_component :unique_ips_limit_enabled, _("Limit sign in from multiple IP addresses"),
+ help_text: _("Helps prevent malicious users hide their activity.")
.form-group
= f.label :unique_ips_limit_per_user, _('IP addresses per user'), class: 'label-bold'
@@ -94,10 +76,8 @@
= _('Spam Check')
.form-group
- .form-check
- = f.check_box :spam_check_endpoint_enabled, class: 'form-check-input'
- = f.label :spam_check_endpoint_enabled, _('Enable Spam Check via external API endpoint'), class: 'form-check-label'
- .form-text.text-muted= _('Define custom rules for what constitutes spam, independent of Akismet')
+ = f.gitlab_ui_checkbox_component :spam_check_endpoint_enabled, _('Enable Spam Check via external API endpoint'),
+ help_text: _('Define custom rules for what constitutes spam, independent of Akismet')
.form-group
= 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 gl-form-input'
diff --git a/app/views/admin/application_settings/_terms.html.haml b/app/views/admin/application_settings/_terms.html.haml
index fdf79004c45..a4b6e061c43 100644
--- a/app/views/admin/application_settings/_terms.html.haml
+++ b/app/views/admin/application_settings/_terms.html.haml
@@ -1,13 +1,9 @@
-= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-terms-settings'), html: { class: 'fieldset-form', id: 'terms-settings' } do |f|
+= gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-terms-settings'), html: { class: 'fieldset-form', id: 'terms-settings' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :enforce_terms, class: 'form-check-input'
- = f.label :enforce_terms, class: 'form-check-label' do
- = _("All users must accept the Terms of Service and Privacy Policy to access GitLab")
- .form-text.text-muted
+ = f.gitlab_ui_checkbox_component :enforce_terms, _("All users must accept the Terms of Service and Privacy Policy to access GitLab")
.form-group
= f.label :terms do
= _("Terms of Service Agreement and Privacy Policy")
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 231c45ec46c..a62e730ee89 100644
--- a/app/views/admin/application_settings/_third_party_offers.html.haml
+++ b/app/views/admin/application_settings/_third_party_offers.html.haml
@@ -8,13 +8,12 @@
%p
= _('Control whether to display customer experience improvement content and third-party offers in GitLab.')
.settings-content
- = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-third-party-offers-settings'), html: { class: 'fieldset-form', id: 'third-party-offers-settings' } do |f|
+ = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-third-party-offers-settings'), html: { class: 'fieldset-form', id: 'third-party-offers-settings' } do |f|
= form_errors(@application_setting) if expanded
%fieldset
.form-group
- .form-check
- = f.check_box :hide_third_party_offers, class: 'form-check-input'
- = f.label :hide_third_party_offers, _('Do not display content for customer experience improvement and offers from third parties'), class: 'form-check-label'
+ = f.gitlab_ui_checkbox_component :hide_third_party_offers,
+ _('Do not display content for customer experience improvement and offers from third parties')
= f.submit _('Save changes'), class: "gl-button btn btn-confirm"
diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml
index 02031880fab..a1285a3f467 100644
--- a/app/views/admin/application_settings/_usage.html.haml
+++ b/app/views/admin/application_settings/_usage.html.haml
@@ -1,68 +1,53 @@
- payload_class = 'js-service-ping-payload'
+- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe
+- link_end = '</a>'.html_safe
-= form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), html: { class: 'fieldset-form' } do |f|
+= gitlab_ui_form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
- .form-group.mb-2
- .form-check
- = f.check_box :version_check_enabled, class: 'form-check-input'
- = f.label :version_check_enabled, class: 'form-check-label' do
- = _("Enable version check")
- .form-text.text-muted
- = _("GitLab informs you if a new version is available.")
- = _("%{link_start}What information does GitLab Inc. collect?%{link_end}").html_safe % { link_start: "<a href='#{help_page_path("user/admin_area/settings/usage_statistics", anchor: "version-check")}'>".html_safe, link_end: '</a>'.html_safe }
+ .form-group
+ - help_link_start = link_start % { url: help_page_path('user/admin_area/settings/usage_statistics', anchor: 'version-check') }
+ = f.gitlab_ui_checkbox_component :version_check_enabled, _('Enable version check'),
+ help_text: _("GitLab informs you if a new version is available. %{link_start}What information does GitLab Inc. collect?%{link_end}").html_safe % { link_start: help_link_start, link_end: link_end }
.form-group
- can_be_configured = @application_setting.usage_ping_can_be_configured?
- .form-check
- = f.check_box :usage_ping_enabled, disabled: !can_be_configured, class: 'form-check-input', data: { qa_selector: 'enable_usage_data_checkbox' }
- = f.label :usage_ping_enabled, class: 'form-check-label' do
- = _('Enable Service Ping')
- .form-text.text-muted
- - if can_be_configured
- %p.mb-2= _('To help improve GitLab and its user experience, GitLab periodically collects usage information.')
-
- - service_ping_path = help_page_path('development/service_ping/index.md')
- - service_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: service_ping_path }
- %p.mb-2= s_('%{service_ping_link_start}What information is shared with GitLab Inc.?%{service_ping_link_end}').html_safe % { service_ping_link_start: service_ping_link_start, service_ping_link_end: '</a>'.html_safe }
-
- %button.gl-button.btn.btn-default.js-payload-preview-trigger{ type: 'button', data: { payload_selector: ".#{payload_class}" } }
- = gl_loading_icon(css_class: 'js-spinner gl-display-none gl-mr-2')
- .js-text.gl-display-inline= _('Preview payload')
- %pre.service-data-payload-container.js-syntax-highlight.code.highlight.gl-mt-2.gl-display-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } }
- - else
- = _('Service ping is disabled in your configuration file, and cannot be enabled through this form.')
- - deactivating_service_ping_path = help_page_path('development/service_ping/index.md', anchor: 'disable-service-ping-using-the-configuration-file')
- - deactivating_service_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: deactivating_service_ping_path }
- = s_('For more information, see the documentation on %{deactivating_service_ping_link_start}deactivating service ping%{deactivating_service_ping_link_end}.').html_safe % { deactivating_service_ping_link_start: deactivating_service_ping_link_start, deactivating_service_ping_link_end: '</a>'.html_safe }
+ - service_ping_link_start = link_start % { url: help_page_path('development/service_ping/index') }
+ - deactivating_service_ping_link_start = link_start % { url: help_page_path('development/service_ping/index', anchor: 'disable-service-ping-using-the-configuration-file') }
+ - usage_ping_help_text = s_('AdminSettings|To help improve GitLab and its user experience, GitLab periodically collects usage information. %{link_start}What information is shared with GitLab Inc.?%{link_end}').html_safe % { link_start: service_ping_link_start, link_end: link_end }
+ - disabled_help_text = s_('AdminSettings|Service ping is disabled in your configuration file, and cannot be enabled through this form. For more information, see the documentation on %{link_start}deactivating service ping%{link_end}.').html_safe % { link_start: deactivating_service_ping_link_start, link_end: link_end }
+ = f.gitlab_ui_checkbox_component :usage_ping_enabled, s_('AdminSettings|Enable Service Ping'),
+ help_text: can_be_configured ? usage_ping_help_text : disabled_help_text,
+ checkbox_options: { disabled: !can_be_configured, data: { qa_selector: 'enable_usage_data_checkbox' } }
+ .form-text.gl-pl-6
+ - if can_be_configured
+ %button.gl-button.btn.btn-default.js-payload-preview-trigger{ type: 'button', data: { payload_selector: ".#{payload_class}" } }
+ = gl_loading_icon(css_class: 'js-spinner gl-display-none gl-mr-2')
+ .js-text.gl-display-inline= s_('AdminSettings|Preview payload')
+ %pre.service-data-payload-container.js-syntax-highlight.code.highlight.gl-mt-2.gl-display-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } }
.form-group
- usage_ping_enabled = @application_setting.usage_ping_enabled?
- .form-check
- = f.check_box :usage_ping_features_enabled?, disabled: !usage_ping_enabled, class: 'form-check-input'
- = f.label :usage_ping_features_enabled?, class: 'form-check-label gl-cursor-not-allowed', id: 'service_ping_features_label' do
- = _('Enable Registration Features')
- = link_to sprite_icon('question-o'), help_page_path('development/service_ping/index.md', anchor: 'registration-features-program')
- .form-text.text-muted
- - if usage_ping_enabled
- %p.gl-mb-3.text-muted{ id: 'service_ping_features_helper_text' }= _('You can enable Registration Features because Service Ping is enabled. To continue using Registration Features in the future, you will also need to register with GitLab via a new cloud licensing service.')
- - else
- %p.gl-mb-3.text-muted{ id: 'service_ping_features_helper_text' }= _('To enable Registration Features, first enable Service Ping.')
-
- %p.gl-mb-3.text-muted= _('Registration Features include:')
- .form-text
- - email_from_gitlab_path = help_page_path('tools/email.md')
- - repo_size_limit_path = help_page_path('user/admin_area/settings/account_and_limit_settings.md', anchor: 'repository-size-limit')
- - restrict_ip_path = help_page_path('user/group/index.md', anchor: 'restrict-group-access-by-ip-address')
- - link_end = '</a>'.html_safe
- - email_from_gitlab_link = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: email_from_gitlab_path }
- - repo_size_limit_link = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: repo_size_limit_path }
- - restrict_ip_link = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: restrict_ip_path }
- %ul
- %li
- = _('Email from GitLab - email users right from the Admin Area. %{link_start}Learn more%{link_end}.').html_safe % { link_start: email_from_gitlab_link, link_end: link_end }
- %li
- = _('Limit project size at a global, group, and project level. %{link_start}Learn more%{link_end}.').html_safe % { link_start: repo_size_limit_link, link_end: link_end }
- %li
- = _('Restrict group access by IP address. %{link_start}Learn more%{link_end}.').html_safe % { link_start: restrict_ip_link, link_end: link_end }
+ - label = s_('AdminSettings|Enable Registration Features')
+ - label_link = link_to sprite_icon('question-o'), help_page_path('development/service_ping/index', anchor: 'registration-features-program')
+ - help_text = usage_ping_enabled ? s_('AdminSettings|You can enable Registration Features because Service Ping is enabled. To continue using Registration Features in the future, you will also need to register with GitLab via a new cloud licensing service.') : s_('AdminSettings|To enable Registration Features, first enable Service Ping.')
+ = f.gitlab_ui_checkbox_component :usage_ping_features_enabled?, '%{label} %{label_link}'.html_safe % { label: label, label_link: label_link },
+ help_text: '<span id="service_ping_features_helper_text">%{help_text}</span>'.html_safe % { help_text: help_text },
+ checkbox_options: { id: 'application_setting_usage_ping_features_enabled' },
+ label_options: { id: 'service_ping_features_label' }
+ .form-text.gl-text-gray-500.gl-pl-6
+ %p.gl-mb-3= s_('AdminSettings|Registration Features include:')
+ - email_from_gitlab_path = help_page_path('user/admin_area/email_from_gitlab')
+ - repo_size_limit_path = help_page_path('user/admin_area/settings/account_and_limit_settings', anchor: 'repository-size-limit')
+ - restrict_ip_path = help_page_path('user/group/index', anchor: 'restrict-group-access-by-ip-address')
+ - email_from_gitlab_link = link_start % { url: email_from_gitlab_path }
+ - repo_size_limit_link = link_start % { url: repo_size_limit_path }
+ - restrict_ip_link = link_start % { url: restrict_ip_path }
+ %ul
+ %li
+ = s_('AdminSettings|Email from GitLab - email users right from the Admin Area. %{link_start}Learn more%{link_end}.').html_safe % { link_start: email_from_gitlab_link, link_end: link_end }
+ %li
+ = s_('AdminSettings|Limit project size at a global, group, and project level. %{link_start}Learn more%{link_end}.').html_safe % { link_start: repo_size_limit_link, link_end: link_end }
+ %li
+ = s_('AdminSettings|Restrict group access by IP address. %{link_start}Learn more%{link_end}.').html_safe % { link_start: restrict_ip_link, link_end: link_end }
= f.submit _('Save changes'), class: "gl-button btn btn-confirm"
diff --git a/app/views/admin/application_settings/_users_api_limits.html.haml b/app/views/admin/application_settings/_users_api_limits.html.haml
index e9b657f8942..9b3502b3cfd 100644
--- a/app/views/admin/application_settings/_users_api_limits.html.haml
+++ b/app/views/admin/application_settings/_users_api_limits.html.haml
@@ -7,8 +7,8 @@
= f.number_field :users_get_by_id_limit, class: 'form-control gl-form-input'
.form-group
= f.label :users_get_by_id_limit_allowlist_raw, _('Users to exclude from the rate limit'), class: 'label-bold'
- = f.text_area :users_get_by_id_limit_allowlist_raw, placeholder: 'username1, username2', class: 'form-control gl-form-input', rows: 5
- .form-text.text-muted
+ = f.text_area :users_get_by_id_limit_allowlist_raw, class: 'form-control gl-form-input', rows: 5, aria: { describedBy: 'users-api-limit-users-allowlist-field-description' }
+ .form-text.text-muted{ id: 'users-api-limit-users-allowlist-field-description' }
= _('List of users allowed to exceed the rate limit.')
= f.submit _('Save changes'), class: "gl-button btn btn-confirm", data: { qa_selector: 'save_changes_button' }
diff --git a/app/views/admin/application_settings/_visibility_and_access.html.haml b/app/views/admin/application_settings/_visibility_and_access.html.haml
index b0810d3d48a..23649bc2d54 100644
--- a/app/views/admin/application_settings/_visibility_and_access.html.haml
+++ b/app/views/admin/application_settings/_visibility_and_access.html.haml
@@ -17,18 +17,16 @@
= render('shared/visibility_radios', model_method: :default_group_visibility, form: f, selected_level: @application_setting.default_group_visibility, form_model: Group.new)
.form-group
= f.label :restricted_visibility_levels, class: 'label-bold'
- - checkbox_name = 'application_setting[restricted_visibility_levels][]'
- = hidden_field_tag(checkbox_name)
- - restricted_level_checkboxes('restricted-visibility-help', checkbox_name, class: 'form-check-input').each do |level|
- .form-check
- = level
+ = hidden_field_tag 'application_setting[restricted_visibility_levels][]'
+ - restricted_level_checkboxes(f).each do |level|
+ = level
%span.form-text.text-muted#restricted-visibility-help
= _('Selected levels cannot be used by non-admin users for groups, projects or snippets. If the public level is restricted, user profiles are only visible to logged in users.')
.form-group
= f.label :import_sources, class: 'label-bold'
= hidden_field_tag 'application_setting[import_sources][]'
- - import_sources_checkboxes('import-sources-help', class: 'form-check-input').each do |source|
- .form-check= source
+ - import_sources_checkboxes(f).each do |source|
+ = source
%span.form-text.text-muted#import-sources-help
= _('Enabled sources for code import during project creation. OmniAuth must be configured for GitHub')
= link_to sprite_icon('question-o'), help_page_path("integration/github")
@@ -40,10 +38,7 @@
= render_if_exists 'admin/application_settings/ldap_access_setting', form: f
.form-group
- .form-check
- = f.check_box :project_export_enabled, class: 'form-check-input'
- = f.label :project_export_enabled, class: 'form-check-label' do
- = _('Project export enabled')
+ = f.gitlab_ui_checkbox_component :project_export_enabled, s_('AdminSettings|Project export enabled')
.form-group
%label.label-bold= _('Enabled Git access protocols')
@@ -57,7 +52,7 @@
%span.form-text.text-muted#custom_http_clone_url_root_help_block
= _('Replaces the clone URL root.')
- - ApplicationSetting::SUPPORTED_KEY_TYPES.each do |type|
+ - Gitlab::SSHPublicKey.supported_types.each do |type|
- field_name = :"#{type}_key_restriction"
.form-group
= f.label field_name, "#{type.upcase} SSH keys", class: 'label-bold'
@@ -65,9 +60,6 @@
.form-group
%label.label-bold= s_('AdminSettings|Feed token')
- .form-check
- = f.check_box :disable_feed_token, class: 'form-check-input'
- = f.label :disable_feed_token, class: 'form-check-label' do
- = s_('AdminSettings|Disable feed token')
+ = f.gitlab_ui_checkbox_component :disable_feed_token, s_('AdminSettings|Disable feed token')
= f.submit _('Save changes'), class: "gl-button btn btn-confirm"
diff --git a/app/views/admin/application_settings/appearances/_form.html.haml b/app/views/admin/application_settings/appearances/_form.html.haml
index 84c26da8772..5816bd42a83 100644
--- a/app/views/admin/application_settings/appearances/_form.html.haml
+++ b/app/views/admin/application_settings/appearances/_form.html.haml
@@ -1,6 +1,6 @@
- parsed_with_gfm = (_("Content parsed with %{link}.") % { link: link_to('GitLab Flavored Markdown', help_page_path('user/markdown'), target: '_blank') }).html_safe
-= form_for @appearance, url: admin_application_settings_appearances_path, html: { class: 'gl-mt-3' } do |f|
+= gitlab_ui_form_for @appearance, url: admin_application_settings_appearances_path, html: { class: 'gl-mt-3' } do |f|
= form_errors(@appearance)
@@ -21,7 +21,7 @@
= f.hidden_field :header_logo_cache
= f.file_field :header_logo, class: "", accept: 'image/*'
.form-text.text-muted
- = _('Maximum file size is 1MB. Pages are optimized for a 28px tall header logo')
+ = _('Maximum file size is 1MB. Pages are optimized for a 24px tall header logo')
%hr
.row
.col-lg-4.profile-settings-sidebar
diff --git a/app/views/admin/application_settings/appearances/_system_header_footer_form.html.haml b/app/views/admin/application_settings/appearances/_system_header_footer_form.html.haml
index 1ce79e61ac6..415606c055d 100644
--- a/app/views/admin/application_settings/appearances/_system_header_footer_form.html.haml
+++ b/app/views/admin/application_settings/appearances/_system_header_footer_form.html.haml
@@ -14,13 +14,10 @@
= form.label :footer_message, _('Footer message'), class: 'col-form-label label-bold'
= form.text_area :footer_message, placeholder: _('State your message to activate'), class: "form-control gl-form-input js-autosize"
.form-group
- .form-check
- = form.check_box :email_header_and_footer_enabled, class: 'form-check-input'
- = form.label :email_header_and_footer_enabled, class: 'label-bold' do
- = _('Enable header and footer in emails')
-
- .form-text.text-muted
- = _('Add header and footer to emails. Please note that color settings will only be applied within the application interface')
+ = form.gitlab_ui_checkbox_component :email_header_and_footer_enabled,
+ _('Enable header and footer in emails'),
+ help_text: _('Add header and footer to emails. Please note that color settings will only be applied within the application interface'),
+ label_options: { class: 'gl-font-weight-bold!' }
.form-group.js-toggle-colors-container
%button.btn.gl-button.btn-link.js-toggle-colors-link{ type: 'button' }
diff --git a/app/views/admin/application_settings/ci_cd.html.haml b/app/views/admin/application_settings/ci_cd.html.haml
index 762dba69e6a..aab4f44d4d7 100644
--- a/app/views/admin/application_settings/ci_cd.html.haml
+++ b/app/views/admin/application_settings/ci_cd.html.haml
@@ -20,8 +20,7 @@
= expanded_by_default? ? _('Collapse') : _('Expand')
%p
= _('Customize CI/CD settings, including Auto DevOps, shared runners, and job artifacts.')
- .settings-content
- = render 'ci_cd'
+ = render 'ci_cd'
= render_if_exists 'admin/application_settings/required_instance_ci_setting', expanded: expanded_by_default?
diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml
index 9eef4bc2a37..bc2fedec69c 100644
--- a/app/views/admin/application_settings/general.html.haml
+++ b/app/views/admin/application_settings/general.html.haml
@@ -93,18 +93,15 @@
%p
= _('Manage Web IDE features.')
.settings-content
- = form_for @application_setting, url: general_admin_application_settings_path(anchor: "#js-web-ide-settings"), html: { class: 'fieldset-form', id: 'web-ide-settings' } do |f|
+ = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: "#js-web-ide-settings"), html: { class: 'fieldset-form', id: 'web-ide-settings' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
- .form-check
- = f.check_box :web_ide_clientside_preview_enabled, class: 'form-check-input'
- = f.label :web_ide_clientside_preview_enabled, class: 'form-check-label' do
- = s_('IDE|Live Preview')
- %span.form-text.text-muted
- - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('user/project/web_ide/index', anchor: 'enable-live-preview') }
- = s_('Preview JavaScript projects in the Web IDE with CodeSandbox Live Preview. %{link_start}Learn more.%{link_end} ').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
+ - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('user/project/web_ide/index', anchor: 'enable-live-preview') }
+ = f.gitlab_ui_checkbox_component :web_ide_clientside_preview_enabled,
+ s_('IDE|Live Preview'),
+ help_text: s_('Preview JavaScript projects in the Web IDE with CodeSandbox Live Preview. %{link_start}Learn more.%{link_end} ').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
= f.submit _('Save changes'), class: "gl-button btn btn-confirm"
= render_if_exists 'admin/application_settings/maintenance_mode_settings_form'
diff --git a/app/views/admin/application_settings/repository.html.haml b/app/views/admin/application_settings/repository.html.haml
index c3a39ddf86d..ce7972827d3 100644
--- a/app/views/admin/application_settings/repository.html.haml
+++ b/app/views/admin/application_settings/repository.html.haml
@@ -21,7 +21,7 @@
= expanded_by_default? ? 'Collapse' : 'Expand'
%p
= _('Configure repository mirroring.')
- = link_to s_('Learn more.'), help_page_path('user/project/repository/repository_mirroring.md'), target: '_blank', rel: 'noopener noreferrer'
+ = link_to s_('Learn more.'), help_page_path('user/project/repository/mirror/index.md'), target: '_blank', rel: 'noopener noreferrer'
.settings-content
= render partial: 'repository_mirrors_form'
diff --git a/app/views/admin/application_settings/service_usage_data.html.haml b/app/views/admin/application_settings/service_usage_data.html.haml
index d9825183d88..ec084c05cf7 100644
--- a/app/views/admin/application_settings/service_usage_data.html.haml
+++ b/app/views/admin/application_settings/service_usage_data.html.haml
@@ -7,10 +7,23 @@
%h3= name
-%button.gl-button.btn.btn-default.js-payload-preview-trigger{ type: 'button', data: { payload_selector: ".#{payload_class}" } }
- .gl-spinner.js-spinner.gl-display-none.gl-mr-2
- .js-text.gl-display-inline= _('Preview payload')
-%button.gl-button.btn.btn-default.js-payload-download-trigger{ type: 'button', data: { endpoint: usage_data_admin_application_settings_path(format: :json) } }
- .gl-spinner.js-spinner.gl-display-none.gl-mr-2
- .js-text.d-inline= _('Download payload')
-%pre.js-syntax-highlight.code.highlight.gl-mt-2.gl-display-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } }
+- if @service_ping_data_present
+ %button.gl-button.btn.btn-default.js-payload-preview-trigger{ type: 'button', data: { payload_selector: ".#{payload_class}" } }
+ = gl_loading_icon(css_class: 'js-spinner gl-display-none gl-mr-2')
+ .js-text.gl-display-inline= _('Preview payload')
+ %button.gl-button.btn.btn-default.js-payload-download-trigger{ type: 'button', data: { endpoint: usage_data_admin_application_settings_path(format: :json) } }
+ = gl_loading_icon(css_class: 'js-spinner gl-display-none gl-mr-2')
+ .js-text.d-inline= _('Download payload')
+ %pre.js-syntax-highlight.code.highlight.gl-mt-2.gl-display-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } }
+- else
+ = render Pajamas::AlertComponent.new(variant: :warning,
+ dismissible: false,
+ title: _('Service Ping payload not found in the application cache')) do
+
+ .gl-alert-body
+ - enable_service_ping_link_url = help_page_path('user/admin_area/settings/usage_statistics', anchor: 'enable-or-disable-usage-statistics')
+ - enable_service_ping_link = '<a href="%{url}">'.html_safe % { url: enable_service_ping_link_url }
+ - generate_manually_link_url = help_page_path('administration/troubleshooting/gitlab_rails_cheat_sheet', anchor: 'generate-service-ping')
+ - generate_manually_link = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: generate_manually_link_url }
+
+ = html_escape(s_('%{enable_service_ping_link_start}Enable%{link_end} or %{generate_manually_link_start}generate%{link_end} Service Ping to preview and download service usage data payload.')) % { enable_service_ping_link_start: enable_service_ping_link, generate_manually_link_start: generate_manually_link, link_end: '</a>'.html_safe }
diff --git a/app/views/admin/applications/_delete_form.html.haml b/app/views/admin/applications/_delete_form.html.haml
index 16ec8014c5e..f9fd5864176 100644
--- a/app/views/admin/applications/_delete_form.html.haml
+++ b/app/views/admin/applications/_delete_form.html.haml
@@ -1,5 +1,4 @@
+- submit_btn_css ||= 'gl-button btn btn-danger btn-danger-secondary btn-sm js-application-delete-button'
-- submit_btn_css ||= 'gl-button btn btn-danger btn-sm js-application-delete-button'
%button{ class: submit_btn_css, data: { path: admin_application_path(application), name: application.name } }
= _('Destroy')
-
diff --git a/app/views/admin/applications/_form.html.haml b/app/views/admin/applications/_form.html.haml
index a1990ad5750..925b3681298 100644
--- a/app/views/admin/applications/_form.html.haml
+++ b/app/views/admin/applications/_form.html.haml
@@ -1,4 +1,4 @@
-= form_for [:admin, @application], url: @url, html: {role: 'form'} do |f|
+= gitlab_ui_form_for [:admin, @application], url: @url, html: {role: 'form'} do |f|
= form_errors(application)
= content_tag :div, class: 'form-group row' do
@@ -45,7 +45,7 @@
.col-sm-2.col-form-label.pt-0
= f.label :scopes
.col-sm-10
- = render 'shared/tokens/scopes_form', prefix: 'doorkeeper_application', token: application, scopes: @scopes
+ = render 'shared/tokens/scopes_form', prefix: 'doorkeeper_application', token: application, scopes: @scopes, f: f
.form-actions
= f.submit _('Save application'), class: "gl-button btn btn-confirm wide"
diff --git a/app/views/admin/applications/index.html.haml b/app/views/admin/applications/index.html.haml
index 86a4ab00ba3..890155ee604 100644
--- a/app/views/admin/applications/index.html.haml
+++ b/app/views/admin/applications/index.html.haml
@@ -1,36 +1,51 @@
-- page_title _("Applications")
+- page_title s_('AdminArea|Instance OAuth applications')
+
%h3.page-title
- = _('System OAuth applications')
+ = s_('AdminArea|Instance OAuth applications')
%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: 'gl-button btn btn-confirm'
-.table-responsive
- %table.table
- %thead
- %tr
- %th
- = _('Name')
- %th
- = _('Callback URL')
- %th
- = _('Clients')
- %th
- = _('Trusted')
- %th
- = _('Confidential')
- %th
- %th
- %tbody.oauth-applications
- - @applications.each do |application|
- %tr{ :id => "application_#{application.id}" }
- %td= link_to application.name, admin_application_path(application)
- %td= application.redirect_uri
- %td= @application_counts[application.id].to_i
- %td= application.trusted? ? _('Yes'): _('No')
- %td= application.confidential? ? _('Yes'): _('No')
- %td= link_to 'Edit', edit_admin_application_path(application), class: 'gl-button btn btn-link'
- %td= render 'delete_form', application: application
+ - docs_link_path = help_page_path('integration/oauth_provider')
+ - docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer nofollow">'.html_safe % { url: docs_link_path }
+ = s_('AdminArea|Manage applications for your instance that can use GitLab as an %{docs_link_start}OAuth provider%{docs_link_end}.').html_safe % { docs_link_start: docs_link_start, docs_link_end: '</a>'.html_safe }
+
+- if @applications.empty?
+ %section.empty-state.gl-text-center.gl-display-flex.gl-flex-direction-column
+ .svg-content.svg-150
+ = image_tag 'illustrations/empty-state/empty-admin-apps.svg', class: 'gl-max-w-full'
+
+ .gl-max-w-full.gl-m-auto
+ %h1.h4.gl-font-size-h-display= s_('AdminArea|No applications found')
+ = link_to _('New application'), new_admin_application_path, class: 'btn gl-button btn-confirm'
+
+- else
+ %hr
+ %p= link_to _('New application'), new_admin_application_path, class: 'gl-button btn btn-confirm'
+
+ .table-responsive
+ %table.b-table.gl-table.gl-w-full{ role: 'table' }
+ %thead
+ %tr
+ %th
+ = _('Name')
+ %th
+ = _('Callback URL')
+ %th
+ = _('Clients')
+ %th
+ = _('Trusted')
+ %th
+ = _('Confidential')
+ %th
+ %th
+ %tbody.oauth-applications
+ - @applications.each do |application|
+ %tr{ id: "application_#{application.id}" }
+ %td= link_to application.name, admin_application_path(application)
+ %td= application.redirect_uri
+ %td= @application_counts[application.id].to_i
+ %td= application.trusted? ? _('Yes'): _('No')
+ %td= application.confidential? ? _('Yes'): _('No')
+ %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/background_migrations/_migration.html.haml b/app/views/admin/background_migrations/_migration.html.haml
index b6077bc54d6..9cef8332259 100644
--- a/app/views/admin/background_migrations/_migration.html.haml
+++ b/app/views/admin/background_migrations/_migration.html.haml
@@ -7,7 +7,7 @@
- else
= _('Unknown')
%td{ role: 'cell', data: { label: _('Status') } }
- = gl_badge_tag migration.status.humanize, { size: :sm, variant: batched_migration_status_badge_variant(migration) }
+ = gl_badge_tag migration.status_name.to_s.humanize, { size: :sm, variant: batched_migration_status_badge_variant(migration) }
%td{ role: 'cell', data: { label: _('Action') } }
- if migration.active?
= button_to pause_admin_background_migration_path(migration),
diff --git a/app/views/admin/broadcast_messages/_form.html.haml b/app/views/admin/broadcast_messages/_form.html.haml
index 3e698f0508c..4102918931f 100644
--- a/app/views/admin/broadcast_messages/_form.html.haml
+++ b/app/views/admin/broadcast_messages/_form.html.haml
@@ -1,20 +1,5 @@
-.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? ) }
- .gl-alert-container
- = sprite_icon('bullhorn', css_class: 'vertical-align-text-top')
- .js-broadcast-message-preview
- .gl-alert-content
- - if @broadcast_message.message.present?
- = render_broadcast_message(@broadcast_message)
- - else
- = _('Your message here')
-.d-flex.justify-content-center
- .broadcast-message.broadcast-notification-message.preview.js-broadcast-notification-message-preview.mt-2{ class: ('hidden' unless @broadcast_message.notification? ) }
- = sprite_icon('bullhorn', css_class: 'vertical-align-text-top')
- .js-broadcast-message-preview
- - if @broadcast_message.message.present?
- = render_broadcast_message(@broadcast_message)
- - else
- = _('Your message here')
+#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)
@@ -34,19 +19,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 :color, _("Background color")
+ = f.label :theme, _("Theme")
.col-sm-10
.input-group
- .input-group-prepend
- .input-group-text.label-color-preview{ :style => 'background-color: ' + @broadcast_message.color + '; color: ' + @broadcast_message.font }
- = '&nbsp;'.html_safe
- = f.text_field :color, class: "form-control gl-form-input js-broadcast-message-color"
- .form-text.text-muted
- = _('Choose any color.')
- %br
- = _("Or you can choose one of the suggested colors below")
-
- = render_suggested_colors
+ = 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
diff --git a/app/views/admin/broadcast_messages/_preview.html.haml b/app/views/admin/broadcast_messages/_preview.html.haml
new file mode 100644
index 00000000000..56168926a6e
--- /dev/null
+++ b/app/views/admin/broadcast_messages/_preview.html.haml
@@ -0,0 +1,3 @@
+.js-broadcast-banner-message-preview
+ = render "shared/broadcast_message", { message: @broadcast_message, preview: true } do
+ = _('Your message here')
diff --git a/app/views/admin/dashboard/_security_newsletter_callout.html.haml b/app/views/admin/dashboard/_security_newsletter_callout.html.haml
index aced997bada..9b994b757f9 100644
--- a/app/views/admin/dashboard/_security_newsletter_callout.html.haml
+++ b/app/views/admin/dashboard/_security_newsletter_callout.html.haml
@@ -1,11 +1,12 @@
- return unless show_security_newsletter_user_callout?
-= render 'shared/global_alert',
- title: s_('AdminArea|Get security updates from GitLab and stay up to date'),
- variant: :tip,
- alert_class: 'js-security-newsletter-callout',
- alert_data: { feature_id: Users::CalloutsHelper::SECURITY_NEWSLETTER_CALLOUT, dismiss_endpoint: callouts_path, defer_links: 'true' },
- close_button_data: { testid: 'close-security-newsletter-callout' } do
+= render Pajamas::AlertComponent.new(variant: :tip,
+ title: s_('AdminArea|Get security updates from GitLab and stay up to date'),
+ alert_class: 'js-security-newsletter-callout',
+ alert_data: { feature_id: Users::CalloutsHelper::SECURITY_NEWSLETTER_CALLOUT,
+ dismiss_endpoint: callouts_path,
+ defer_links: 'true' },
+ close_button_data: { testid: 'close-security-newsletter-callout' }) do
.gl-alert-body
= s_('AdminArea|Sign up for the GitLab Security Newsletter to get notified for security updates.')
.gl-alert-actions
diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml
index 0c3ce1f3fa4..8ac6f63cdfb 100644
--- a/app/views/admin/groups/_form.html.haml
+++ b/app/views/admin/groups/_form.html.haml
@@ -18,7 +18,7 @@
.form-group.row
.offset-sm-2.col-sm-10
- = render 'shared/allow_request_access', form: f, bold_label: true
+ = render 'shared/allow_request_access', form: f
= render 'groups/group_admin_settings', f: f
@@ -27,7 +27,7 @@
- if @group.new_record?
.form-group.row
.offset-sm-2.col-sm-10
- = render 'shared/global_alert', dismissible: false do
+ = render Pajamas::AlertComponent.new(dismissible: false) do
.gl-alert-body
= render 'shared/group_tips'
.form-actions
diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml
index 17dccae44b5..2ea5890be2c 100644
--- a/app/views/admin/groups/index.html.haml
+++ b/app/views/admin/groups/index.html.haml
@@ -5,9 +5,8 @@
= form_tag admin_groups_path, method: :get, class: 'js-search-form' do |f|
= hidden_field_tag :sort, @sort
.search-holder
- - 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' }
+ = search_field_tag :name, params[:name].presence, class: "form-control search-text-input js-search-input", autofocus: true, spellcheck: false, placeholder: 'Search by name', data: { qa_selector: 'group_search_field' }
= 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: "gl-button btn btn-confirm" do
diff --git a/app/views/admin/hooks/_form.html.haml b/app/views/admin/hooks/_form.html.haml
index bd63172a0ee..a309e874317 100644
--- a/app/views/admin/hooks/_form.html.haml
+++ b/app/views/admin/hooks/_form.html.haml
@@ -11,24 +11,18 @@
.form-group
= form.label :url, _('Trigger'), class: 'label-bold'
.form-text.text-secondary.gl-mb-5= _('System hooks are triggered on sets of events like creating a project or adding an SSH key. You can also enable extra triggers, such as push events.')
- %fieldset.form-group.form-check
- = form.check_box :repository_update_events, class: 'form-check-input'
- = form.label :repository_update_events, _('Repository update events'), class: 'label-bold form-check-label'
- .text-secondary= _('URL is triggered when repository is updated')
- %fieldset.form-group.form-check
- = form.check_box :push_events, class: 'form-check-input'
- = form.label :push_events, _('Push events'), class: 'label-bold form-check-label'
- .text-secondary= _('URL is triggered for each branch updated to the repository')
- %fieldset.form-group.form-check
- = form.check_box :tag_push_events, class: 'form-check-input'
- = form.label :tag_push_events, _('Tag push events'), class: 'label-bold form-check-label'
- .text-secondary= _('URL is triggered when a new tag is pushed to the repository')
- %fieldset.form-group.form-check
- = form.check_box :merge_requests_events, class: 'form-check-input'
- = form.label :merge_requests_events, _('Merge request events'), class: 'label-bold form-check-label'
- .text-secondary= _('URL is triggered when a merge request is created, updated, or merged')
+ %fieldset.form-group
+ = form.gitlab_ui_checkbox_component :repository_update_events, _('Repository update events'),
+ help_text: _('URL is triggered when repository is updated')
+ %fieldset.form-group
+ = form.gitlab_ui_checkbox_component :push_events, _('Push events'),
+ help_text: _('URL is triggered for each branch updated to the repository')
+ %fieldset.form-group
+ = form.gitlab_ui_checkbox_component :tag_push_events, _('Tag push events'),
+ help_text: _('URL is triggered when a new tag is pushed to the repository')
+ %fieldset.form-group
+ = form.gitlab_ui_checkbox_component :merge_requests_events, _('Merge request events'),
+ help_text: _('URL is triggered when a merge request is created, updated, or merged')
.form-group
= form.label :enable_ssl_verification, _('SSL verification'), class: 'label-bold checkbox'
- .form-check
- = form.check_box :enable_ssl_verification, class: 'form-check-input'
- = form.label :enable_ssl_verification, _('Enable SSL verification'), class: 'label-bold form-check-label'
+ = form.gitlab_ui_checkbox_component :enable_ssl_verification, _('Enable SSL verification')
diff --git a/app/views/admin/hooks/edit.html.haml b/app/views/admin/hooks/edit.html.haml
index 566d8a99ac6..e8176e9f8bb 100644
--- a/app/views/admin/hooks/edit.html.haml
+++ b/app/views/admin/hooks/edit.html.haml
@@ -8,7 +8,7 @@
= render 'shared/web_hooks/title_and_docs', hook: @hook
.col-lg-9.gl-mb-3
- = form_for @hook, as: :hook, url: admin_hook_path do |f|
+ = gitlab_ui_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 gl-button btn-confirm gl-mr-3'
diff --git a/app/views/admin/hooks/index.html.haml b/app/views/admin/hooks/index.html.haml
index 3e2cd126e1a..f23d77c8da5 100644
--- a/app/views/admin/hooks/index.html.haml
+++ b/app/views/admin/hooks/index.html.haml
@@ -5,7 +5,7 @@
= render 'shared/web_hooks/title_and_docs', hook: @hook
.col-lg-8.gl-mb-3
- = form_for @hook, as: :hook, url: admin_hooks_path do |f|
+ = gitlab_ui_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 gl-button btn-confirm'
diff --git a/app/views/admin/identities/index.html.haml b/app/views/admin/identities/index.html.haml
index 3b3042b5506..a4f1ce4afc0 100644
--- a/app/views/admin/identities/index.html.haml
+++ b/app/views/admin/identities/index.html.haml
@@ -15,5 +15,3 @@
= render @identities
- else
%h4= _('This user has no identities')
-
-= render partial: 'admin/users/modals'
diff --git a/app/views/admin/impersonation_tokens/index.html.haml b/app/views/admin/impersonation_tokens/index.html.haml
index 26fbba83a32..2c526bb38d8 100644
--- a/app/views/admin/impersonation_tokens/index.html.haml
+++ b/app/views/admin/impersonation_tokens/index.html.haml
@@ -28,5 +28,3 @@
impersonation: true,
active_tokens: @active_impersonation_tokens,
revoke_route_helper: ->(token) { revoke_admin_user_impersonation_token_path(token.user, token) }
-
-= render partial: 'admin/users/modals'
diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml
index e8bcf479d70..be7055e6f7b 100644
--- a/app/views/admin/projects/show.html.haml
+++ b/app/views/admin/projects/show.html.haml
@@ -14,11 +14,9 @@
- if @project.last_repository_check_failed?
.row
.col-md-12
- = render 'shared/global_alert',
- variant: :danger,
+ = render Pajamas::AlertComponent.new(variant: :danger,
alert_class: 'gl-mb-5',
- alert_data: { testid: 'last-repository-check-failed-alert' },
- is_container: true do
+ alert_data: { testid: 'last-repository-check-failed-alert' }) do
.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) }
diff --git a/app/views/admin/runners/edit.html.haml b/app/views/admin/runners/edit.html.haml
index 55fd09ac203..5570c46c17f 100644
--- a/app/views/admin/runners/edit.html.haml
+++ b/app/views/admin/runners/edit.html.haml
@@ -25,10 +25,9 @@
- if project
%tr
%td
- = render 'shared/global_alert',
- variant: :danger,
+ = render Pajamas::AlertComponent.new(variant: :danger,
dismissible: false,
- title: project.full_name do
+ title: project.full_name) do
.gl-alert-actions
= 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'
diff --git a/app/views/admin/topics/_form.html.haml b/app/views/admin/topics/_form.html.haml
index c40484ea494..50ef375dd35 100644
--- a/app/views/admin/topics/_form.html.haml
+++ b/app/views/admin/topics/_form.html.haml
@@ -27,7 +27,7 @@
= topic_icon(@topic, alt: _('Topic avatar'), class: 'avatar topic-avatar s90')
= render 'shared/choose_avatar_button', f: f
- if @topic.avatar?
- .js-remove-topic-avatar{ data: { path: admin_topic_avatar_path(@topic) } }
+ .js-remove-topic-avatar{ data: { path: admin_topic_avatar_path(@topic), name: @topic.name } }
- if @topic.new_record?
.form-actions
diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml
index 1e4c3f3bb62..51e6af56377 100644
--- a/app/views/admin/users/_access_levels.html.haml
+++ b/app/views/admin/users/_access_levels.html.haml
@@ -11,7 +11,7 @@
.col-sm-2.col-form-label.gl-pt-0
= f.label :can_create_group
.col-sm-10
- = f.check_box :can_create_group
+ = f.gitlab_ui_checkbox_component :can_create_group, ''
.form-group.row
.col-sm-2.col-form-label.gl-pt-0
@@ -39,10 +39,7 @@
= f.label :external
.hidden{ data: user_internal_regex_data }
.col-sm-10.gl-display-flex.gl-align-items-baseline
- = f.check_box :external do
- = s_('AdminUsers|External')
- %p.light.gl-pl-2
- = s_('AdminUsers|External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects, groups, or personal snippets.')
+ = f.gitlab_ui_checkbox_component :external, s_('AdminUsers|External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects, groups, or personal snippets.')
%row.hidden#warning_external_automatically_set
= gl_badge_tag s_('AdminUsers|Automatically marked as default internal user'), variant: :warning
@@ -50,12 +47,9 @@
- @user.credit_card_validation || @user.build_credit_card_validation
= f.fields_for :credit_card_validation do |ff|
.col-sm-2.col-form-label.gl-pt-0
- = ff.label s_("AdminUsers|Validate user account")
+ = ff.label s_('AdminUsers|Validate user account')
.col-sm-10.gl-display-flex.gl-align-items-baseline
- = ff.check_box :credit_card_validated_at, checked: @user.credit_card_validated_at.present?
- .gl-pl-2
- .light
- = s_('AdminUsers|User is validated and can use free CI minutes on shared runners.')
- .gl-text-gray-600
- = s_('AdminUsers|A user can validate themselves by inputting a credit/debit card, or an admin can manually validate a user.')
-
+ = ff.gitlab_ui_checkbox_component :credit_card_validated_at,
+ s_('AdminUsers|User is validated and can use free CI minutes on shared runners.'),
+ help_text: s_('AdminUsers|A user can validate themselves by inputting a credit/debit card, or an admin can manually validate a user.'),
+ checkbox_options: { checked: @user.credit_card_validated_at.present? }
diff --git a/app/views/admin/users/_modals.html.haml b/app/views/admin/users/_modals.html.haml
deleted file mode 100644
index 0890990f476..00000000000
--- a/app/views/admin/users/_modals.html.haml
+++ /dev/null
@@ -1,20 +0,0 @@
-#js-delete-user-modal
-#js-modal-texts.hidden{ "hidden": true, "aria-hidden": "true" }
- %div{ data: { modal: "delete",
- title: s_("AdminUsers|Delete User %{username}?"),
- action: s_('AdminUsers|Delete user'),
- 'secondary-action': s_('AdminUsers|Block user') } }
- = s_('AdminUsers|You are about to permanently delete the user %{username}. Issues, merge requests,
- and groups linked to them will be transferred to a system-wide "Ghost-user". To avoid data loss,
- consider using the %{strongStart}block user%{strongEnd} feature instead. Once you %{strongStart}Delete user%{strongEnd},
- it cannot be undone or recovered.')
-
- %div{ data: { modal: "delete-with-contributions",
- title: s_("AdminUsers|Delete User %{username} and contributions?"),
- action: s_('AdminUsers|Delete user and contributions') ,
- '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 %{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/_users.html.haml b/app/views/admin/users/_users.html.haml
index ad7ce57ebda..86391b980c0 100644
--- a/app/views/admin/users/_users.html.haml
+++ b/app/views/admin/users/_users.html.haml
@@ -1,8 +1,7 @@
- if registration_features_can_be_prompted?
- = render 'shared/global_alert',
- variant: :tip,
+ = render Pajamas::AlertComponent.new(variant: :tip,
alert_class: 'gl-my-5',
- dismissible: false do
+ dismissible: false) do
.gl-alert-body
= render 'shared/registration_features_discovery_message', feature_title: s_('RegistrationFeatures|send emails to users')
@@ -68,5 +67,3 @@
= gl_loading_icon(size: 'lg', css_class: 'gl-my-7')
= paginate_collection @users
-
-= render partial: 'admin/users/modals'
diff --git a/app/views/admin/users/keys.html.haml b/app/views/admin/users/keys.html.haml
index 28024ae084f..5f9d11af7c1 100644
--- a/app/views/admin/users/keys.html.haml
+++ b/app/views/admin/users/keys.html.haml
@@ -3,4 +3,3 @@
- page_title _("SSH Keys"), @user.name, _("Users")
= render 'admin/users/head'
= render 'profiles/keys/key_table', admin: true
-= render partial: 'admin/users/modals'
diff --git a/app/views/admin/users/projects.html.haml b/app/views/admin/users/projects.html.haml
index 580cfe9f956..2f6c08f123e 100644
--- a/app/views/admin/users/projects.html.haml
+++ b/app/views/admin/users/projects.html.haml
@@ -48,5 +48,3 @@
- if member.respond_to? :project
= link_to project_project_member_path(project, member), data: { confirm: remove_member_message(member), confirm_btn_variant: 'danger' }, aria: { label: _('Remove') }, remote: true, method: :delete, class: "btn btn-sm btn-danger gl-button btn-icon gl-ml-3", title: _('Remove user from project') do
= sprite_icon('remove', size: 16, css_class: 'gl-icon')
-
-= render partial: 'admin/users/modals'
diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml
index 94542af3b96..9197d6684e0 100644
--- a/app/views/admin/users/show.html.haml
+++ b/app/views/admin/users/show.html.haml
@@ -40,7 +40,7 @@
%span.light= _('Secondary email:')
%strong
= render partial: 'shared/email_with_badge', locals: { email: email.email, verified: email.confirmed? }
- = link_to remove_email_admin_user_path(@user, email), data: { confirm: _("Are you sure you want to remove %{email}?") % { email: email.email } }, method: :delete, class: "btn btn-sm btn-danger gl-button btn-icon float-right", title: _('Remove secondary email'), id: "remove_email_#{email.id}" do
+ = link_to remove_email_admin_user_path(@user, email), data: { confirm: _("Are you sure you want to remove %{email}?") % { email: email.email }, 'confirm-btn-variant': 'danger' }, method: :delete, class: "btn btn-sm btn-danger gl-button btn-icon float-right", title: _('Remove secondary email'), id: "remove_email_#{email.id}" do
= sprite_icon('close', size: 16, css_class: 'gl-icon')
%li
%span.light ID:
@@ -56,7 +56,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-danger float-right', title: _('Disable Two-factor Authentication')
+ = link_to _('Disable'), disable_two_factor_admin_user_path(@user), aria: { label: _('Disable') }, data: { confirm: _('Are you sure?'), 'confirm-btn-variant': 'danger' }, method: :patch, class: 'btn gl-button btn-sm btn-danger float-right', title: _('Disable Two-factor Authentication')
- else
= _('Disabled')
@@ -146,4 +146,3 @@
.col-md-6.gl-display-none.gl-md-display-block
= render 'admin/users/profile', user: @user
= render 'admin/users/user_detail_note'
-= render partial: 'admin/users/modals'
diff --git a/app/views/clusters/clusters/_banner.html.haml b/app/views/clusters/clusters/_banner.html.haml
index 6fb3f26ff4f..b7d1aa6f944 100644
--- a/app/views/clusters/clusters/_banner.html.haml
+++ b/app/views/clusters/clusters/_banner.html.haml
@@ -6,17 +6,13 @@
%span.gl-spinner.gl-spinner-dark{ 'aria-label': 'Loading' }
%span.gl-ml-2= s_('ClusterIntegration|Kubernetes cluster is being created...')
-= render 'shared/global_alert',
- variant: :warning,
- alert_class: 'hidden js-cluster-api-unreachable',
- close_button_class: 'js-close' do
+= render Pajamas::AlertComponent.new(variant: :warning,
+ alert_class: 'hidden js-cluster-api-unreachable') do
.gl-alert-body
= s_('ClusterIntegration|Your cluster API is unreachable. Please ensure your API URL is correct.')
-= render 'shared/global_alert',
- variant: :warning,
- alert_class: 'hidden js-cluster-authentication-failure js-cluster-api-unreachable',
- close_button_class: 'js-close' do
+= render Pajamas::AlertComponent.new(variant: :warning,
+ alert_class: 'hidden js-cluster-authentication-failure js-cluster-api-unreachable') do
.gl-alert-body
= s_('ClusterIntegration|There was a problem authenticating with your cluster. Please ensure your CA Certificate and Token are valid.')
diff --git a/app/views/clusters/clusters/_deprecation_alert.html.haml b/app/views/clusters/clusters/_deprecation_alert.html.haml
new file mode 100644
index 00000000000..202e2c14d3f
--- /dev/null
+++ b/app/views/clusters/clusters/_deprecation_alert.html.haml
@@ -0,0 +1,7 @@
+= render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, alert_class: 'gl-mt-6 gl-mb-3') do
+ .gl-alert-body
+ - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe
+ - issue_link_start = link_start % { url: 'https://gitlab.com/gitlab-org/configure/general/-/issues/199' }
+ - docs_link_start = link_start % { url: help_page_path('user/clusters/agent/index.md') }
+ - link_end = '</a>'.html_safe
+ = s_('ClusterIntegration|This process is %{issue_link_start}deprecated%{issue_link_end}. Use the %{docs_link_start}the GitLab agent for Kubernetes%{docs_link_end} instead.').html_safe % { docs_link_start: docs_link_start, docs_link_end: link_end, issue_link_start: issue_link_start, issue_link_end: link_end }
diff --git a/app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml b/app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml
index 3a4632affdc..ffd910b1b9d 100644
--- a/app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml
+++ b/app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml
@@ -1,8 +1,8 @@
- link = link_to(s_('ClusterIntegration|sign up'), 'https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral', target: '_blank', rel: 'noopener noreferrer')
-= render 'shared/global_alert',
- title: s_('ClusterIntegration|Did you know?'),
+
+= render Pajamas::AlertComponent.new(title: s_('ClusterIntegration|Did you know?'),
alert_class: 'gcp-signup-offer',
- alert_data: { feature_id: Users::CalloutsHelper::GCP_SIGNUP_OFFER, dismiss_endpoint: callouts_path } do
+ alert_data: { feature_id: Users::CalloutsHelper::GCP_SIGNUP_OFFER, dismiss_endpoint: callouts_path }) do
.gl-alert-body
= s_('ClusterIntegration|Every new Google Cloud Platform (GCP) account receives $300 in credit upon %{sign_up_link}. In partnership with Google, GitLab is able to offer an additional $200 for both new and existing GCP accounts to get started with GitLab\'s Google Kubernetes Engine Integration.').html_safe % { sign_up_link: link }
.gl-alert-actions
diff --git a/app/views/clusters/clusters/_sidebar.html.haml b/app/views/clusters/clusters/_sidebar.html.haml
index bda774ee780..045c03df4fa 100644
--- a/app/views/clusters/clusters/_sidebar.html.haml
+++ b/app/views/clusters/clusters/_sidebar.html.haml
@@ -1,8 +1,14 @@
+- is_connect_page = local_assigns.fetch(:is_connect_page, false)
+- docs_mode = local_assigns.fetch(:docs_mode, false)
+- title = is_connect_page ? s_('ClusterIntegration|Connect a Kubernetes cluster') : s_('ClusterIntegration|Create a Kubernetes cluster')
+
%h3
- = s_('ClusterIntegration|Connect a Kubernetes cluster')
+ = title
%p
= clusterable.sidebar_text
-%p
- = clusterable.learn_more_link
-= render 'clusters/clusters/multiple_clusters_message'
+- if !docs_mode
+ %p
+ = clusterable.learn_more_link
+
+ = render 'clusters/clusters/multiple_clusters_message'
diff --git a/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml b/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml
index 826dc749dad..807f98b7b0a 100644
--- a/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml
+++ b/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml
@@ -1,12 +1,15 @@
- provider = local_assigns.fetch(:provider)
- is_current_provider = provider == params[:provider]
- logo_path = local_assigns.fetch(:logo_path)
+- help_path = local_assigns.fetch(:help_path)
- label = local_assigns.fetch(:label)
- last = local_assigns.fetch(:last, false)
-- classes = ["btn btn-confirm gl-button btn-confirm-secondary gl-flex-direction-column gl-w-half js-create-#{provider}-cluster-button"]
-- conditional_classes = [('gl-mr-5' unless last), ('active' if is_current_provider)]
+- docs_mode = local_assigns.fetch(:docs_mode, false)
+- classes = ["btn btn-confirm gl-button btn-confirm-secondary gl-flex-direction-column gl-w-half"]
+- conditional_classes = [("gl-mr-5" unless last), ("active" if is_current_provider && !docs_mode), ("js-create-#{provider}-cluster-button" if !docs_mode)]
+- link = docs_mode ? help_path : clusterable.new_path(provider: provider)
-= link_to clusterable.new_path(provider: provider), class: classes + conditional_classes do
- .svg-content.gl-p-3= image_tag logo_path, alt: label, class: 'gl-w-64 gl-h-64'
+= link_to link, class: classes + conditional_classes do
+ .svg-content.gl-p-3= image_tag logo_path, alt: label, class: "gl-w-64 gl-h-64"
%span
= label
diff --git a/app/views/clusters/clusters/cloud_providers/_cloud_provider_selector.html.haml b/app/views/clusters/clusters/cloud_providers/_cloud_provider_selector.html.haml
index 321fb854e0d..69250141816 100644
--- a/app/views/clusters/clusters/cloud_providers/_cloud_provider_selector.html.haml
+++ b/app/views/clusters/clusters/cloud_providers/_cloud_provider_selector.html.haml
@@ -1,11 +1,15 @@
- gke_label = s_('ClusterIntegration|Google GKE')
- eks_label = s_('ClusterIntegration|Amazon EKS')
- create_cluster_label = s_('ClusterIntegration|Where do you want to create a cluster?')
+- eks_help_path = help_page_path('user/infrastructure/clusters/connect/new_eks_cluster')
+- gke_help_path = help_page_path('user/infrastructure/clusters/connect/new_gke_cluster')
+- docs_mode = local_assigns.fetch(:docs_mode, false)
+
.gl-p-5
%h4.gl-mb-5
= create_cluster_label
.gl-display-flex
= render partial: 'clusters/clusters/cloud_providers/cloud_provider_button',
- locals: { provider: 'aws', label: eks_label, logo_path: 'illustrations/logos/amazon_eks.svg' }
+ locals: { provider: 'aws', label: eks_label, logo_path: 'illustrations/logos/amazon_eks.svg', help_path: eks_help_path, docs_mode: docs_mode }
= render partial: 'clusters/clusters/cloud_providers/cloud_provider_button',
- locals: { provider: 'gcp', label: gke_label, logo_path: 'illustrations/logos/google_gke.svg', last: true }
+ locals: { provider: 'gcp', label: gke_label, logo_path: 'illustrations/logos/google_gke.svg', help_path: gke_help_path, docs_mode: docs_mode, last: true }
diff --git a/app/views/clusters/clusters/connect.html.haml b/app/views/clusters/clusters/connect.html.haml
index 1043f78bd3c..ec00a9c345a 100644
--- a/app/views/clusters/clusters/connect.html.haml
+++ b/app/views/clusters/clusters/connect.html.haml
@@ -3,9 +3,11 @@
- breadcrumb_title _('Connect a cluster')
- page_title _('Connect a Kubernetes Cluster')
-.row.gl-mt-3
- .col-md-3
- = render 'sidebar'
- .col-md-9
+= render 'deprecation_alert'
+
+.gl-md-display-flex.gl-mt-3
+ .gl-w-quarter.gl-xs-w-full.gl-flex-shrink-0.gl-md-mr-5
+ = render 'sidebar', is_connect_page: true
+ .gl-w-full
#js-cluster-new{ data: js_cluster_new }
= render 'clusters/clusters/user/form'
diff --git a/app/views/clusters/clusters/new.html.haml b/app/views/clusters/clusters/new.html.haml
index a184f412565..53d521fface 100644
--- a/app/views/clusters/clusters/new.html.haml
+++ b/app/views/clusters/clusters/new.html.haml
@@ -4,12 +4,14 @@
- page_title _('Create a Kubernetes cluster')
- provider = params[:provider]
+= render 'deprecation_alert'
+
= render_gcp_signup_offer
-.row.gl-mt-3
- .col-md-3
- = render 'sidebar'
- .col-md-9
+.gl-md-display-flex.gl-mt-3
+ .gl-w-quarter.gl-xs-w-full.gl-flex-shrink-0.gl-md-mr-5
+ = render 'sidebar', is_connect_page: false
+ .gl-w-full
= render 'clusters/clusters/cloud_providers/cloud_provider_selector'
- if ['aws', 'gcp'].include?(provider)
diff --git a/app/views/clusters/clusters/new_cluster_docs.html.haml b/app/views/clusters/clusters/new_cluster_docs.html.haml
new file mode 100644
index 00000000000..9b99aef0e72
--- /dev/null
+++ b/app/views/clusters/clusters/new_cluster_docs.html.haml
@@ -0,0 +1,13 @@
+- @content_class = 'limit-container-width' unless fluid_layout
+- add_to_breadcrumbs _('Kubernetes Clusters'), clusterable.index_path
+- breadcrumb_title _('Create a cluster')
+- page_title _('Create a Kubernetes cluster')
+- docs_mode = true
+
+= render_gcp_signup_offer
+
+.gl-md-display-flex.gl-mt-3
+ .gl-w-quarter.gl-xs-w-full.gl-flex-shrink-0.gl-md-mr-5
+ = render 'sidebar', docs_mode: docs_mode, is_connect_page: false
+ .gl-w-full
+ = render 'clusters/clusters/cloud_providers/cloud_provider_selector', docs_mode: docs_mode
diff --git a/app/views/dashboard/milestones/index.html.haml b/app/views/dashboard/milestones/index.html.haml
index 872099f98fc..2bbca851dcc 100644
--- a/app/views/dashboard/milestones/index.html.haml
+++ b/app/views/dashboard/milestones/index.html.haml
@@ -12,16 +12,29 @@
path: '-/milestones/new', label: 'New milestone',
include_groups: true, type: :milestones
-.top-area
- = render 'shared/milestones_filter', counts: @milestone_states
- .nav-controls
- = render 'shared/milestones/search_form'
+- if @milestone_states.any? { |name, count| count > 0 }
+ .top-area
+ = render 'shared/milestones_filter', counts: @milestone_states
+ .nav-controls
+ = render 'shared/milestones/search_form'
-- if @milestones.blank?
- = render 'shared/empty_states/milestones'
+ - if @milestones.blank?
+ = render 'shared/empty_states/milestones_tab', active_tab: params[:state] do
+ - if current_user
+ .page-title-controls
+ = render 'shared/new_project_item_select',
+ path: '-/milestones/new', label: 'New milestone',
+ include_groups: true, type: :milestones
+ - else
+ .milestones
+ %ul.content-list
+ - @milestones.each do |milestone|
+ = render 'milestone', milestone: milestone
+ = paginate @milestones, theme: 'gitlab'
- else
- .milestones
- %ul.content-list
- - @milestones.each do |milestone|
- = render 'milestone', milestone: milestone
- = paginate @milestones, theme: 'gitlab'
+ = render 'shared/empty_states/milestones' do
+ - if current_user
+ .page-title-controls
+ = render 'shared/new_project_item_select',
+ path: '-/milestones/new', label: 'New milestone',
+ include_groups: true, type: :milestones
diff --git a/app/views/devise/sessions/_new_base.html.haml b/app/views/devise/sessions/_new_base.html.haml
index b40373ecc37..83e3fd85511 100644
--- a/app/views/devise/sessions/_new_base.html.haml
+++ b/app/views/devise/sessions/_new_base.html.haml
@@ -1,23 +1,24 @@
-= form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: 'new_user gl-show-field-errors', 'aria-live' => 'assertive'}) do |f|
+= gitlab_ui_form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: 'new_user gl-show-field-errors js-sign-in-form', aria: { live: 'assertive' }, data: { testid: 'sign-in-form' }}) do |f|
.form-group
= f.label _('Username or email'), for: 'user_login', class: 'label-bold'
- = f.text_field :login, value: @invite_email, class: 'form-control gl-form-input top', autofocus: 'autofocus', autocapitalize: 'off', autocorrect: 'off', required: true, title: _('This field is required.'), data: { qa_selector: 'login_field' }
+ = f.text_field :login, value: @invite_email, class: 'form-control gl-form-input top js-username-field', autofocus: 'autofocus', autocapitalize: 'off', autocorrect: 'off', required: true, title: _('This field is required.'), data: { qa_selector: 'login_field', testid: 'username-field' }
.form-group
= f.label :password, class: 'label-bold'
= f.password_field :password, class: 'form-control gl-form-input bottom', autocomplete: 'current-password', required: true, title: _('This field is required.'), data: { qa_selector: 'password_field' }
- if devise_mapping.rememberable?
%div
- %label{ for: 'user_remember_me' }
- = f.check_box :remember_me
- %span= _('Remember me')
- .float-right
+ .gl-display-inline-block
+ = f.gitlab_ui_checkbox_component :remember_me, _('Remember me')
+ .gl-float-right
- if unconfirmed_email?
= link_to _('Resend confirmation email'), new_user_confirmation_path
- else
= link_to _('Forgot your password?'), new_password_path(:user)
%div
- - if captcha_enabled? || captcha_on_login_required?
+ - if Feature.enabled?(:arkose_labs_login_challenge)
+ = render_if_exists 'devise/sessions/arkose_labs'
+ - elsif captcha_enabled? || captcha_on_login_required?
= recaptcha_tags nonce: content_security_policy_nonce
.submit-container.move-submit-down
- = f.submit _('Sign in'), class: 'gl-button btn btn-confirm', data: { qa_selector: 'sign_in_button' }
+ = f.button _('Sign in'), type: :submit, class: "gl-button btn btn-block btn-confirm js-sign-in-button#{' js-no-auto-disable' if Feature.enabled?(:arkose_labs_login_challenge)}", data: { qa_selector: 'sign_in_button', testid: 'sign-in-button' }
diff --git a/app/views/devise/shared/_email_opted_in.html.haml b/app/views/devise/shared/_email_opted_in.html.haml
index 898b8f31f1d..d8ed0028222 100644
--- a/app/views/devise/shared/_email_opted_in.html.haml
+++ b/app/views/devise/shared/_email_opted_in.html.haml
@@ -3,5 +3,4 @@
.gl-mb-3.js-email-opt-in.hidden
.gl-font-weight-bold.gl-mb-3
= _('Email updates (optional)')
- = f.check_box :email_opted_in
- = f.label :email_opted_in, _("I'd like to receive updates about GitLab via email"), class: 'gl-font-weight-normal'
+ = f.gitlab_ui_checkbox_component :email_opted_in, _("I'd like to receive updates about GitLab via email")
diff --git a/app/views/errors/_footer.html.haml b/app/views/errors/_footer.html.haml
index 62bac62c70c..3adde3ef544 100644
--- a/app/views/errors/_footer.html.haml
+++ b/app/views/errors/_footer.html.haml
@@ -4,8 +4,8 @@
= link_to s_('Nav|Home'), root_path
%li
- if current_user
- = link_to s_('Nav|Sign out and sign in with a different account'), '#', id: 'sign_out_link'
- %form{ action: destroy_user_session_path, method: :post, id: 'sign_out_form' }
+ = link_to s_('Nav|Sign out and sign in with a different account'), '#', class: 'js-sign-out-link'
+ %form.js-sign-out-form{ action: destroy_user_session_path, method: :post }
- else
= link_to s_('Nav|Sign In / Register'), new_session_path(:user, redirect_to_referer: 'yes')
%li
diff --git a/app/views/groups/_group_admin_settings.html.haml b/app/views/groups/_group_admin_settings.html.haml
index ab6861b5f24..785ca71b371 100644
--- a/app/views/groups/_group_admin_settings.html.haml
+++ b/app/views/groups/_group_admin_settings.html.haml
@@ -2,14 +2,12 @@
.col-sm-2.col-form-label.pt-0
= f.label :lfs_enabled, _('Large File Storage')
.col-sm-10
- .form-check
- = f.check_box :lfs_enabled, checked: @group.lfs_enabled?, class: 'form-check-input'
- = f.label :lfs_enabled, class: 'form-check-label' do
- %strong
- = _('Allow projects within this group to use Git LFS')
- = link_to sprite_icon('question-o'), help_page_path('topics/git/lfs/index')
- %br/
- %span= _('This setting can be overridden in each project.')
+ - label = _('Allow projects within this group to use Git LFS')
+ - help_link = link_to sprite_icon('question-o'), help_page_path('topics/git/lfs/index'), class: 'gl-ml-2'
+ = f.gitlab_ui_checkbox_component :lfs_enabled,
+ '%{label}%{help_link}'.html_safe % { label: label, help_link: help_link },
+ help_text: _('This setting can be overridden in each project.'),
+ checkbox_options: { checked: @group.lfs_enabled? }
.form-group.row
.col-sm-2.col-form-label
= f.label s_('ProjectCreationLevel|Allowed to create projects')
@@ -26,12 +24,9 @@
.col-sm-2.col-form-label.pt-0
= f.label :require_two_factor_authentication, _('Two-factor authentication')
.col-sm-10
- .form-check
- = f.check_box :require_two_factor_authentication, class: 'form-check-input'
- = f.label :require_two_factor_authentication, class: 'form-check-label' do
- %strong
- = _("Require all users in this group to set up two-factor authentication")
- = link_to sprite_icon('question-o'), help_page_path('security/two_factor_authentication', anchor: 'enforce-2fa-for-all-users-in-a-group')
+ - label = _("Require all users in this group to set up two-factor authentication")
+ - help_link = link_to sprite_icon('question-o'), help_page_path('security/two_factor_authentication', anchor: 'enforce-2fa-for-all-users-in-a-group'), class: 'gl-ml-2'
+ = f.gitlab_ui_checkbox_component :require_two_factor_authentication, '%{label}%{help_link}'.html_safe % { label: label, help_link: help_link }
.form-group.row
.offset-sm-2.col-sm-10
.form-check
diff --git a/app/views/groups/_import_group_from_another_instance_panel.html.haml b/app/views/groups/_import_group_from_another_instance_panel.html.haml
index 5b9cd80799c..95b3ad26e99 100644
--- a/app/views/groups/_import_group_from_another_instance_panel.html.haml
+++ b/app/views/groups/_import_group_from_another_instance_panel.html.haml
@@ -4,8 +4,8 @@
%h4.gl-display-flex
= s_('GroupsNew|Import groups from another instance of GitLab')
= link_to _('History'), history_import_bulk_imports_path, class: 'gl-link gl-ml-auto'
- .gl-alert.gl-alert-warning{ role: 'alert' }
- = sprite_icon('warning', css_class: 'gl-icon s16 gl-alert-icon gl-alert-icon-no-title')
+ = render Pajamas::AlertComponent.new(dismissible: false,
+ variant: :warning) do
.gl-alert-body
- docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/group/import/index.md') }
- docs_link_end = '</a>'.html_safe
diff --git a/app/views/groups/_import_group_from_file_panel.html.haml b/app/views/groups/_import_group_from_file_panel.html.haml
index ee0967f708a..ddd7481e0bd 100644
--- a/app/views/groups/_import_group_from_file_panel.html.haml
+++ b/app/views/groups/_import_group_from_file_panel.html.haml
@@ -6,8 +6,8 @@
.gl-border-l-solid.gl-border-r-solid.gl-border-gray-100.gl-border-1.gl-p-5
%h4
= _('Import group from file')
- .gl-alert.gl-alert-warning{ role: 'alert' }
- = sprite_icon('warning', css_class: 'gl-icon s16 gl-alert-icon gl-alert-icon-no-title')
+ = render Pajamas::AlertComponent.new(variant: :warning,
+ dismissible: false) do
.gl-alert-body
- docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/group/import/index.md') }
- link_end = '</a>'.html_safe
diff --git a/app/views/groups/_subgroups_and_projects.html.haml b/app/views/groups/_subgroups_and_projects.html.haml
index 651d182b9cc..427a36aaec4 100644
--- a/app/views/groups/_subgroups_and_projects.html.haml
+++ b/app/views/groups/_subgroups_and_projects.html.haml
@@ -4,5 +4,4 @@
%section{ data: { hide_projects: 'false', group_id: group.id, path: group_path(group) } }
.js-groups-list-holder{ data: { show_schema_markup: 'true'} }
- .loading-container.text-center.prepend-top-20
- .gl-spinner.gl-spinner-md
+ = gl_loading_icon(size: 'md', css_class: 'gl-mt-6')
diff --git a/app/views/groups/crm/contacts/index.html.haml b/app/views/groups/crm/contacts/index.html.haml
index 81293937f77..8a971e451a4 100644
--- a/app/views/groups/crm/contacts/index.html.haml
+++ b/app/views/groups/crm/contacts/index.html.haml
@@ -1,4 +1,8 @@
-- breadcrumb_title _('Customer Relations Contacts')
-- page_title _('Customer Relations Contacts')
+- breadcrumb_title _('Customer relations contacts')
+- page_title _('Customer relations contacts')
+- @content_wrapper_class = "gl-relative"
+
+= content_for :after_content do
+ #js-crm-form-portal
#js-crm-contacts-app{ data: { group_full_path: @group.full_path, group_issues_path: issues_group_path(@group), group_id: @group.id, can_admin_crm_contact: can?(current_user, :admin_crm_contact, @group).to_s, base_path: group_crm_contacts_path(@group) } }
diff --git a/app/views/groups/crm/organizations/index.html.haml b/app/views/groups/crm/organizations/index.html.haml
index 1647805b976..ff1ba678de0 100644
--- a/app/views/groups/crm/organizations/index.html.haml
+++ b/app/views/groups/crm/organizations/index.html.haml
@@ -1,4 +1,8 @@
-- breadcrumb_title _('Customer Relations Organizations')
-- page_title _('Customer Relations Organizations')
+- breadcrumb_title _('Customer relations organizations')
+- page_title _('Customer relations organizations')
+- @content_wrapper_class = "gl-relative"
+
+= content_for :after_content do
+ #js-crm-form-portal
#js-crm-organizations-app{ data: { base_path: group_crm_organizations_path(@group), can_admin_crm_organization: can?(current_user, :admin_crm_organization, @group).to_s, group_full_path: @group.full_path, group_id: @group.id, group_issues_path: issues_group_path(@group) } }
diff --git a/app/views/groups/dependency_proxies/show.html.haml b/app/views/groups/dependency_proxies/show.html.haml
index 47caec717af..940a504438d 100644
--- a/app/views/groups/dependency_proxies/show.html.haml
+++ b/app/views/groups/dependency_proxies/show.html.haml
@@ -4,4 +4,4 @@
#js-dependency-proxy{ data: { group_path: @group.full_path,
dependency_proxy_available: dependency_proxy_available.to_s,
- no_manifests_illustration: image_path('illustrations/docker-empty-state.svg') } }
+ no_manifests_illustration: image_path('illustrations/docker-empty-state.svg'), group_id: @group.id } }
diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml
index f3494149087..3dcc75ce8f4 100644
--- a/app/views/groups/edit.html.haml
+++ b/app/views/groups/edit.html.haml
@@ -4,6 +4,7 @@
- expanded = expanded_by_default?
= render 'shared/namespaces/cascading_settings/lock_popovers'
+= render_if_exists 'shared/minute_limit_banner', namespace: @group
%section.settings.gs-general.no-animate.expanded#js-general-settings
.settings-header
diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml
index 5c579cf6488..9aa626724a8 100644
--- a/app/views/groups/group_members/index.html.haml
+++ b/app/views/groups/group_members/index.html.haml
@@ -1,6 +1,8 @@
- add_page_specific_style 'page_bundles/members'
- page_title _('Group members')
+= render_if_exists 'shared/user_over_limit_free_plan_alert', source: @group
+
.row.gl-mt-3
.col-lg-12
.gl-display-flex.gl-flex-wrap
@@ -25,5 +27,7 @@
.js-group-members-list-app{ data: { members_data: group_members_app_data(@group,
members: @members,
invited: @invited_members,
- access_requests: @requesters).to_json } }
+ access_requests: @requesters,
+ include_relations: @include_relations,
+ search: params[:search_groups]).to_json } }
= gl_loading_icon(css_class: 'gl-my-5', size: 'md')
diff --git a/app/views/groups/harbor/repositories/index.html.haml b/app/views/groups/harbor/repositories/index.html.haml
index 1ee15557e21..6a1e66520b5 100644
--- a/app/views/groups/harbor/repositories/index.html.haml
+++ b/app/views/groups/harbor/repositories/index.html.haml
@@ -4,6 +4,8 @@
#js-harbor-registry-list-group{ data: { endpoint: group_harbor_registries_path(@group),
"no_containers_image" => image_path('illustrations/docker-empty-state.svg'),
"containers_error_image" => image_path('illustrations/docker-error-state.svg'),
- "help_page_path" => help_page_path('user/packages/container_registry/index'),
+ "repository_url" => 'demo.harbor.com/gitlab-cn/build/cng-images/gitlab-kas',
+ "registry_host_url_with_port" => 'demo.harbor.com',
connection_error: (!!@connection_error).to_s,
- invalid_path_error: (!!@invalid_path_error).to_s, } }
+ invalid_path_error: (!!@invalid_path_error).to_s,
+ is_group_page: true.to_s } }
diff --git a/app/views/groups/milestones/index.html.haml b/app/views/groups/milestones/index.html.haml
index 1c7427fef87..5c0487db0fc 100644
--- a/app/views/groups/milestones/index.html.haml
+++ b/app/views/groups/milestones/index.html.haml
@@ -1,23 +1,32 @@
- page_title _("Milestones")
- add_page_specific_style 'page_bundles/milestone'
-.top-area
- = render 'shared/milestones_filter', counts: @milestone_states
+- if @milestone_states.any? { |name, count| count > 0 }
+ .top-area
+ = render 'shared/milestones_filter', counts: @milestone_states
- .nav-controls
- = render 'shared/milestones/search_form'
- = render 'shared/milestones_sort_dropdown'
- - if can?(current_user, :admin_milestone, @group)
- = link_to _('New milestone'), new_group_milestone_path(@group), class: "btn gl-button btn-confirm", data: { qa_selector: "new_group_milestone_link" }
+ .nav-controls
+ = render 'shared/milestones/search_form'
+ = render 'shared/milestones_sort_dropdown'
+ - if can?(current_user, :admin_milestone, @group)
+ = link_to _('New milestone'), new_group_milestone_path(@group), class: "btn gl-button btn-confirm", data: { qa_selector: "new_group_milestone_link" }
-- if @milestones.blank?
- = render 'shared/empty_states/milestones'
+ - if @milestones.blank?
+ = render 'shared/empty_states/milestones_tab', learn_more_path: help_page_path('user/project/milestones/index') do
+ - if can?(current_user, :admin_milestone, @group)
+ .text-center
+ = link_to _('New milestone'), new_group_milestone_path(@group), class: "btn gl-button btn-confirm", data: { qa_selector: "new_group_milestone_link" }
+ - else
+ .milestones
+ %ul.content-list
+ - @milestones.each do |milestone|
+ - if milestone.project_milestone?
+ = render 'projects/milestones/milestone', milestone: milestone
+ - else
+ = render 'milestone', milestone: milestone
+ = paginate @milestones, theme: "gitlab"
- else
- .milestones
- %ul.content-list
- - @milestones.each do |milestone|
- - if milestone.project_milestone?
- = render 'projects/milestones/milestone', milestone: milestone
- - else
- = render 'milestone', milestone: milestone
- = paginate @milestones, theme: "gitlab"
+ = render 'shared/empty_states/milestones', learn_more_path: help_page_path('user/project/milestones/index') do
+ - if can?(current_user, :admin_milestone, @group)
+ .text-center
+ = link_to _('New milestone'), new_group_milestone_path(@group), class: "btn gl-button btn-confirm", data: { qa_selector: "new_group_milestone_link" }
diff --git a/app/views/groups/runners/_settings.html.haml b/app/views/groups/runners/_settings.html.haml
index bbcadc08a8b..087b06ee37d 100644
--- a/app/views/groups/runners/_settings.html.haml
+++ b/app/views/groups/runners/_settings.html.haml
@@ -1,4 +1,6 @@
- if Feature.enabled?(:runner_list_group_view_vue_ui, @group, default_enabled: :yaml)
+ .gl-mb-6
+ #update-shared-runners-form{ data: group_shared_runners_settings_data(@group) }
.gl-card.gl-px-8.gl-py-6.gl-line-height-20
.gl-card-body.gl-display-flex{ :class => "gl-p-0!" }
.gl-banner-illustration
@@ -11,107 +13,107 @@
%a.btn.btn-confirm.btn-md.gl-button{ :href => group_runners_path(@group) }
%span.gl-button-text
= s_('Runners|Take me there!')
+- else
+ = render 'shared/runners/runner_description'
-= render 'shared/runners/runner_description'
-
-%hr
+ %hr
-.row
- .col-sm-6
- = render 'groups/runners/group_runners'
- .col-sm-6
- = render 'groups/runners/shared_runners'
+ .row
+ .col-sm-6
+ = render 'groups/runners/group_runners'
+ .col-sm-6
+ = render 'groups/runners/shared_runners'
-%h4.underlined-title
- = _('Available runners: %{runners}').html_safe % { runners: limited_counter_with_delimiter(@all_group_runners) }
+ %h4.underlined-title
+ = _('Available runners: %{runners}').html_safe % { runners: limited_counter_with_delimiter(@all_group_runners) }
--# haml-lint:disable NoPlainNodes
-.row
- .col-sm-9
- = form_tag group_settings_ci_cd_path, id: 'runners-search', method: :get, class: 'filter-form js-filter-form' do
- .filtered-search-wrapper.d-flex
- .filtered-search-box
- = dropdown_tag(_('Recent searches'),
- options: { wrapper_class: 'filtered-search-history-dropdown-wrapper',
- toggle_class: 'gl-button btn btn-default 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: group_settings_ci_cd_path } }
- .filtered-search-box-input-container.droplab-dropdown
- .scroll-container
- %ul.tokens-container.list-unstyled
- %li.input-token
- %input.form-control.filtered-search{ search_filter_input_options('runners') }
- #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: 'gl-button btn btn-link' do
- -# Encapsulate static class name `{{icon}}` inside #{} to bypass
- -# haml lint's ClassAttributeWithStaticValue
- %svg
- %use{ 'xlink:href': "#{'{{icon}}'}" }
- %span.js-filter-hint
- {{formattedKey}}
- #js-dropdown-operator.filtered-search-input-dropdown-menu.dropdown-menu
- %ul.filter-dropdown{ data: { dropdown: true, dynamic: true } }
- %li.filter-dropdown-item{ data: { value: "{{ title }}" } }
- = button_tag class: 'gl-button btn btn-link' do
- {{ title }}
- %span.btn-helptext
- {{ help }}
- #js-dropdown-admin-runner-status.filtered-search-input-dropdown-menu.dropdown-menu
- %ul{ data: { dropdown: true } }
- - Ci::Runner::AVAILABLE_STATUSES.each do |status|
- %li.filter-dropdown-item{ data: { value: status } }
+ -# haml-lint:disable NoPlainNodes
+ .row
+ .col-sm-9
+ = form_tag group_settings_ci_cd_path, id: 'runners-search', method: :get, class: 'filter-form js-filter-form' do
+ .filtered-search-wrapper.d-flex
+ .filtered-search-box
+ = dropdown_tag(_('Recent searches'),
+ options: { wrapper_class: 'filtered-search-history-dropdown-wrapper',
+ toggle_class: 'gl-button btn btn-default 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: group_settings_ci_cd_path } }
+ .filtered-search-box-input-container.droplab-dropdown
+ .scroll-container
+ %ul.tokens-container.list-unstyled
+ %li.input-token
+ %input.form-control.filtered-search{ search_filter_input_options('runners') }
+ #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: '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|
- - next if runner_type == 'instance_type'
- %li.filter-dropdown-item{ data: { value: runner_type } }
+ -# Encapsulate static class name `{{icon}}` inside #{} to bypass
+ -# haml lint's ClassAttributeWithStaticValue
+ %svg
+ %use{ 'xlink:href': "#{'{{icon}}'}" }
+ %span.js-filter-hint
+ {{formattedKey}}
+ #js-dropdown-operator.filtered-search-input-dropdown-menu.dropdown-menu
+ %ul.filter-dropdown{ data: { dropdown: true, dynamic: true } }
+ %li.filter-dropdown-item{ data: { value: "{{ title }}" } }
= button_tag class: 'gl-button btn btn-link' do
- = runner_type.titleize
+ {{ title }}
+ %span.btn-helptext
+ {{ help }}
+ #js-dropdown-admin-runner-status.filtered-search-input-dropdown-menu.dropdown-menu
+ %ul{ data: { dropdown: true } }
+ - Ci::Runner::AVAILABLE_STATUSES.each do |status|
+ %li.filter-dropdown-item{ data: { value: status } }
+ = button_tag class: '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|
+ - next if runner_type == 'instance_type'
+ %li.filter-dropdown-item{ data: { value: runner_type } }
+ = button_tag class: 'gl-button btn btn-link' do
+ = runner_type.titleize
- #js-dropdown-runner-tag.filtered-search-input-dropdown-menu.dropdown-menu
- %ul{ data: { dropdown: true } }
- %li.filter-dropdown-item{ data: { value: 'none' } }
- = button_tag class: 'gl-button btn btn-link' do
- = _('No Tag')
- %li.divider.droplab-item-ignore
- %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
- %li.filter-dropdown-item
- = button_tag class: 'gl-button btn btn-link js-data-value' do
- %span.dropdown-light-content
- {{name}}
+ #js-dropdown-runner-tag.filtered-search-input-dropdown-menu.dropdown-menu
+ %ul{ data: { dropdown: true } }
+ %li.filter-dropdown-item{ data: { value: 'none' } }
+ = button_tag class: 'gl-button btn btn-link' do
+ = _('No Tag')
+ %li.divider.droplab-item-ignore
+ %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
+ %li.filter-dropdown-item
+ = button_tag class: 'gl-button btn btn-link js-data-value' do
+ %span.dropdown-light-content
+ {{name}}
- = button_tag class: 'clear-search hidden' do
- = sprite_icon('close', size: 16, css_class: 'clear-search-icon')
- .filter-dropdown-container
- = render 'groups/runners/sort_dropdown'
+ = button_tag class: 'clear-search hidden' do
+ = sprite_icon('close', size: 16, css_class: 'clear-search-icon')
+ .filter-dropdown-container
+ = render 'groups/runners/sort_dropdown'
- .col-sm-3.text-right-lg
- = _('Runners currently online: %{active_runners_count}') % { active_runners_count: limited_counter_with_delimiter(@all_group_runners.online) }
+ .col-sm-3.text-right-lg
+ = _('Runners currently online: %{active_runners_count}') % { active_runners_count: limited_counter_with_delimiter(@all_group_runners.online) }
-- if @group_runners.any?
- .content-list{ data: { testid: 'runners-table' } }
- .table-holder
- .gl-responsive-table-row.table-row-header{ role: 'row' }
- .table-section.section-10{ role: 'rowheader' }= _('Type/State')
- .table-section.section-30{ role: 'rowheader' }= s_('Runners|Runner')
- .table-section.section-10{ role: 'rowheader' }= _('Version')
- .table-section.section-10{ role: 'rowheader' }= _('IP Address')
- .table-section.section-5{ role: 'rowheader' }= _('Projects')
- .table-section.section-5{ role: 'rowheader' }= _('Jobs')
- .table-section.section-10{ role: 'rowheader' }= _('Tags')
- .table-section.section-10{ role: 'rowheader' }= _('Last contact')
- .table-section.section-10{ role: 'rowheader' }
+ - if @group_runners.any?
+ .content-list{ data: { testid: 'runners-table' } }
+ .table-holder
+ .gl-responsive-table-row.table-row-header{ role: 'row' }
+ .table-section.section-10{ role: 'rowheader' }= _('Type/State')
+ .table-section.section-30{ role: 'rowheader' }= s_('Runners|Runner')
+ .table-section.section-10{ role: 'rowheader' }= _('Version')
+ .table-section.section-10{ role: 'rowheader' }= _('IP Address')
+ .table-section.section-5{ role: 'rowheader' }= _('Projects')
+ .table-section.section-5{ role: 'rowheader' }= _('Jobs')
+ .table-section.section-10{ role: 'rowheader' }= _('Tags')
+ .table-section.section-10{ role: 'rowheader' }= _('Last contact')
+ .table-section.section-10{ role: 'rowheader' }
- - @group_runners.each do |runner|
- - runner = runner.present(current_user: current_user)
- = render 'groups/runners/runner', runner: runner
- = paginate @group_runners, theme: 'gitlab', :params => { :anchor => 'runners-settings' }
-- else
- .nothing-here-block= _('No runners found')
+ - @group_runners.each do |runner|
+ - runner = runner.present(current_user: current_user)
+ = render 'groups/runners/runner', runner: runner
+ = paginate @group_runners, theme: 'gitlab', :params => { :anchor => 'runners-settings' }
+ - else
+ .nothing-here-block= _('No runners found')
diff --git a/app/views/groups/runners/_sort_dropdown.html.haml b/app/views/groups/runners/_sort_dropdown.html.haml
index e914bd00dac..b7b10cecee8 100644
--- a/app/views/groups/runners/_sort_dropdown.html.haml
+++ b/app/views/groups/runners/_sort_dropdown.html.haml
@@ -1,10 +1,3 @@
-- sorted_by = sort_options_hash[@sort] || sort_title_created_date
+- runners_sort_options = runners_sort_options_hash.map { |value, text| { value: value, text: text, href: page_filter_path(sort: value) } }
-.dropdown.inline.gl-ml-3
- %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown', display: 'static' } }
- = sorted_by
- = sprite_icon('chevron-down', css_class: 'dropdown-menu-toggle-icon gl-top-3')
- %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable.dropdown-menu-sort
- %li
- = sortable_item(sort_title_created_date, page_filter_path(sort: sort_value_created_date), sorted_by)
- = sortable_item(sort_title_contacted_date, page_filter_path(sort: sort_value_contacted_date), sorted_by)
+= gl_redirect_listbox_tag runners_sort_options, @sort, class: 'gl-ml-3', data: { display: 'static' }
diff --git a/app/views/groups/settings/_export.html.haml b/app/views/groups/settings/_export.html.haml
index 81403fd88b2..62bc574231f 100644
--- a/app/views/groups/settings/_export.html.haml
+++ b/app/views/groups/settings/_export.html.haml
@@ -1,12 +1,9 @@
-- return unless Feature.enabled?(:group_import_export, @group, default_enabled: true)
-
- group = local_assigns.fetch(:group)
.sub-section
%h4= s_('GroupSettings|Export group')
%p= _('Export this group with all related data.')
- .gl-alert.gl-alert-warning.gl-mb-4{ role: 'alert' }
- = sprite_icon('warning', css_class: 'gl-icon s16 gl-alert-icon gl-alert-icon-no-title')
+ = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, alert_class: 'gl-mb-4') do
.gl-alert-body
- docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/group/import/index.md') }
- docs_link_end = '</a>'.html_safe
@@ -15,17 +12,18 @@
- export_information = _('After the export is complete, download the data file from a notification email or from this page. You can then import the data file from the %{strong_text_start}Create new group%{strong_text_end} page of another GitLab instance.') % { strong_text_start: '<strong>'.html_safe, strong_text_end: '</strong>'.html_safe}
= export_information.html_safe
= link_to _('Learn more.'), help_page_path('user/group/settings/import_export.md'), target: '_blank', rel: 'noopener noreferrer'
- .bs-callout.bs-callout-info
- %p.gl-mb-0
- %p= _('The following items will be exported:')
- %ul
- - group_export_descriptions.each do |description|
- %li= description
- %p= _('The following items will NOT be exported:')
- %ul
- %li= _('Projects')
- %li= _('Runner tokens')
- %li= _('SAML discovery tokens')
+ = render Pajamas::AlertComponent.new(dismissible: false, alert_class: 'gl-mb-5') do
+ .gl-alert-body
+ %p.gl-mb-0
+ %p= _('The following items will be exported:')
+ %ul
+ - group_export_descriptions.each do |description|
+ %li= description
+ %p= _('The following items will NOT be exported:')
+ %ul
+ %li= _('Projects')
+ %li= _('Runner tokens')
+ %li= _('SAML discovery tokens')
- if group.export_file_exists?
= link_to _('Download export'), download_export_group_path(group),
rel: 'nofollow', method: :get, class: 'btn gl-button btn-default', data: { qa_selector: 'download_export_link' }
diff --git a/app/views/groups/settings/_permissions.html.haml b/app/views/groups/settings/_permissions.html.haml
index dd62c9e118d..1a2f770cd59 100644
--- a/app/views/groups/settings/_permissions.html.haml
+++ b/app/views/groups/settings/_permissions.html.haml
@@ -34,6 +34,8 @@
= render 'groups/settings/ip_restriction_registration_features_cta', f: f
= render_if_exists 'groups/settings/ip_restriction', f: f, group: @group
= render_if_exists 'groups/settings/allowed_email_domain', f: f, group: @group
+ - if Feature.enabled?(:group_wiki_settings_toggle, @group, default_enabled: :yaml)
+ = render_if_exists 'groups/settings/wiki', f: f, group: @group
= render 'groups/settings/lfs', f: f
= render 'groups/settings/project_creation_level', f: f, group: @group
= render 'groups/settings/subgroup_creation_level', f: f, group: @group
diff --git a/app/views/groups/settings/_remove_button.html.haml b/app/views/groups/settings/_remove_button.html.haml
index 1d5b7160049..66d6b516a86 100644
--- a/app/views/groups/settings/_remove_button.html.haml
+++ b/app/views/groups/settings/_remove_button.html.haml
@@ -1,8 +1,7 @@
- remove_form_id = local_assigns.fetch(:remove_form_id, nil)
- if group.paid?
- .gl-alert.gl-alert-info.gl-mb-5{ data: { testid: 'group-has-linked-subscription-alert' } }
- = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
+ = render Pajamas::AlertComponent.new(dismissible: false, alert_class: 'gl-mb-5', alert_data: { testid: 'group-has-linked-subscription-alert' }) do
.gl-alert-body
= html_escape(_("This group can't be removed because it is linked to a subscription. To remove this group, %{linkStart}link the subscription%{linkEnd} with a different group.")) % { linkStart: "<a href=\"#{help_page_path('subscriptions/index', anchor: 'change-the-linked-namespace')}\">".html_safe, linkEnd: '</a>'.html_safe }
diff --git a/app/views/groups/settings/_transfer.html.haml b/app/views/groups/settings/_transfer.html.haml
index dde8213b293..f5d9d0e2587 100644
--- a/app/views/groups/settings/_transfer.html.haml
+++ b/app/views/groups/settings/_transfer.html.haml
@@ -13,8 +13,7 @@
%li= s_('GroupSettings|You will need to update your local repositories to point to the new location.')
%li= s_("GroupSettings|If the parent group's visibility is lower than the group's current visibility, visibility levels for subgroups and projects will be changed to match the new parent group's visibility.")
- if group.paid?
- .gl-alert.gl-alert-info.gl-mb-5
- = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
+ = render Pajamas::AlertComponent.new(dismissible: false, alert_class: 'gl-mb-5') do
.gl-alert-body
= html_escape(_("This group can't be transferred because it is linked to a subscription. To transfer this group, %{linkStart}link the subscription%{linkEnd} with a different group.")) % { linkStart: "<a href=\"#{help_page_path('subscriptions/index', anchor: 'change-the-linked-namespace')}\">".html_safe, linkEnd: '</a>'.html_safe }
.js-transfer-group-form{ data: initial_data }
diff --git a/app/views/groups/settings/ci_cd/_auto_devops_form.html.haml b/app/views/groups/settings/ci_cd/_auto_devops_form.html.haml
index 12c0f15aff5..86c0a8d0c52 100644
--- a/app/views/groups/settings/ci_cd/_auto_devops_form.html.haml
+++ b/app/views/groups/settings/ci_cd/_auto_devops_form.html.haml
@@ -1,16 +1,16 @@
-= form_for group, url: update_auto_devops_group_settings_ci_cd_path(group), method: :patch do |f|
+= gitlab_ui_form_for group, url: update_auto_devops_group_settings_ci_cd_path(group), method: :patch do |f|
= form_errors(group)
%fieldset
.form-group
.card.auto-devops-card
.card-body
- .form-check
- = f.check_box :auto_devops_enabled, class: 'form-check-input', checked: group.auto_devops_enabled?
- = f.label :auto_devops_enabled, class: 'form-check-label' do
- %strong= s_('GroupSettings|Default to Auto DevOps pipeline for all projects within this group')
- = gl_badge_tag badge_for_auto_devops_scope(group), variant: :info
- .form-text.text-muted
- = s_('GroupSettings|The Auto DevOps pipeline runs if no alternative CI configuration file is found.')
- = link_to _('Learn more.'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer'
+ - learn_more_link = link_to _('Learn more.'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer'
+ - help_text = s_('GroupSettings|The Auto DevOps pipeline runs if no alternative CI configuration file is found.')
+ - badge = gl_badge_tag badge_for_auto_devops_scope(group), variant: :info
+ - label = s_('GroupSettings|Default to Auto DevOps pipeline for all projects within this group')
+ = f.gitlab_ui_checkbox_component :auto_devops_enabled,
+ '%{label} %{badge}'.html_safe % { label: label, badge: badge.html_safe },
+ help_text: '%{help_text} %{learn_more_link}'.html_safe % { help_text: help_text, learn_more_link: learn_more_link },
+ checkbox_options: { checked: group.auto_devops_enabled? }
= f.submit _('Save changes'), class: 'btn gl-button btn-confirm gl-mt-5'
diff --git a/app/views/groups/settings/ci_cd/show.html.haml b/app/views/groups/settings/ci_cd/show.html.haml
index 331cb31c626..f6dda9358f3 100644
--- a/app/views/groups/settings/ci_cd/show.html.haml
+++ b/app/views/groups/settings/ci_cd/show.html.haml
@@ -3,6 +3,7 @@
- expanded = expanded_by_default?
- general_expanded = @group.errors.empty? ? expanded : true
+= render_if_exists 'shared/minute_limit_banner', namespace: @group
-# Given we only have one field in this form which is also admin-only,
-# we don't want to show an empty section to non-admin users,
diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml
index bb409190dd8..7bbc2f839f7 100644
--- a/app/views/groups/show.html.haml
+++ b/app/views/groups/show.html.haml
@@ -7,6 +7,8 @@
= render_if_exists 'shared/thanks_for_purchase_banner', plan_title: plan_title, quantity: params[:purchased_quantity].to_i
= render_if_exists 'shared/qrtly_reconciliation_alert', group: @group
+= render_if_exists 'shared/user_over_limit_free_plan_alert', source: @group
+= render_if_exists 'shared/minute_limit_banner', namespace: @group
- if show_invite_banner?(@group)
= content_for :group_invite_members_banner do
@@ -37,16 +39,15 @@
.scrolling-tabs-container.inner-page-scroll-tabs
.fade-left= sprite_icon('chevron-lg-left', size: 12)
.fade-right= sprite_icon('chevron-lg-right', size: 12)
- %ul.nav-links.scrolling-tabs.mobile-separator.nav.nav-tabs
- %li.js-subgroups_and_projects-tab
- = link_to group_path, data: { target: 'div#subgroups_and_projects', action: 'subgroups_and_projects', toggle: 'tab'} do
- = _("Subgroups and projects")
- %li.js-shared-tab
- = link_to group_shared_path, data: { target: 'div#shared', action: 'shared', toggle: 'tab'} do
- = _("Shared projects")
- %li.js-archived-tab
- = link_to group_archived_path, data: { target: 'div#archived', action: 'archived', toggle: 'tab'} do
- = _("Archived projects")
+ -# `item_active` is set to `false` as the active state is set by `app/assets/javascripts/pages/groups/shared/group_details.js`
+ -# TODO: Replace this approach in https://gitlab.com/gitlab-org/gitlab/-/issues/23466
+ = gl_tabs_nav({ class: 'nav-links scrolling-tabs gl-display-flex gl-flex-grow-1 gl-flex-nowrap gl-border-0' }) do
+ = gl_tab_link_to group_path, item_active: false, tab_class: 'js-subgroups_and_projects-tab', data: { target: 'div#subgroups_and_projects', action: 'subgroups_and_projects', toggle: 'tab' } do
+ = _("Subgroups and projects")
+ = gl_tab_link_to group_shared_path, item_active: false, tab_class: 'js-shared-tab', data: { target: 'div#shared', action: 'shared', toggle: 'tab' } do
+ = _("Shared projects")
+ = gl_tab_link_to group_archived_path, item_active: false, tab_class: 'js-archived-tab', data: { target: 'div#archived', action: 'archived', toggle: 'tab' } do
+ = _("Archived projects")
.nav-controls.d-block.d-md-flex
.group-search
diff --git a/app/views/import/_githubish_status.html.haml b/app/views/import/_githubish_status.html.haml
index 8f18d68fd55..08f7cd57732 100644
--- a/app/views/import/_githubish_status.html.haml
+++ b/app/views/import/_githubish_status.html.haml
@@ -3,6 +3,7 @@
- extra_data = local_assigns.fetch(:extra_data, {})
- filterable = local_assigns.fetch(:filterable, true)
- paginatable = local_assigns.fetch(:paginatable, false)
+- default_namespace_path = (local_assigns[:default_namespace] || current_user.namespace).full_path
- provider_title = Gitlab::ImportSources.title(provider)
- header_title _("New project"), new_project_path
@@ -14,6 +15,7 @@
namespaces_path: import_available_namespaces_path,
repos_path: url_for([:status, :import, provider, format: :json]),
jobs_path: url_for([:realtime_changes, :import, provider, format: :json]),
+ default_target_namespace: default_namespace_path,
import_path: url_for([:import, provider, format: :json]),
filterable: filterable.to_s,
paginatable: paginatable.to_s }.merge(extra_data) }
diff --git a/app/views/import/github/new.html.haml b/app/views/import/github/new.html.haml
index ef6479f8be2..fbb27ba620a 100644
--- a/app/views/import/github/new.html.haml
+++ b/app/views/import/github/new.html.haml
@@ -10,7 +10,7 @@
= import_github_authorize_message
- if github_import_configured? && !has_ci_cd_only_params?
- = link_to status_import_github_path, class: 'gl-button btn btn-confirm' do
+ = link_to status_import_github_path(namespace_id: params[:namespace_id]), class: 'gl-button btn btn-confirm' do
= sprite_icon('github', css_class: 'gl-mr-2')
= title
@@ -23,6 +23,7 @@
= form_tag personal_access_token_import_github_path, method: :post do
.form-group
%label.label-bold= _('Personal Access Token')
+ = hidden_field_tag(:namespace_id, params[:namespace_id])
= text_field_tag :personal_access_token, '', class: 'form-control gl-form-input', placeholder: _('e.g. %{token}') % { token: '8d3f016698e...' }, data: { qa_selector: 'personal_access_token_field' }
%span.form-text.text-muted
= import_github_personal_access_token_message
diff --git a/app/views/import/github/status.html.haml b/app/views/import/github/status.html.haml
index 820c2f06c8f..26b048c8195 100644
--- a/app/views/import/github/status.html.haml
+++ b/app/views/import/github/status.html.haml
@@ -7,4 +7,4 @@
- paginatable = Feature.enabled?(:remove_legacy_github_client)
-= render 'import/githubish_status', provider: 'github', paginatable: paginatable
+= render 'import/githubish_status', provider: 'github', paginatable: paginatable, default_namespace: @namespace
diff --git a/app/views/import/history/index.html.haml b/app/views/import/history/index.html.haml
new file mode 100644
index 00000000000..bca2d884848
--- /dev/null
+++ b/app/views/import/history/index.html.haml
@@ -0,0 +1,4 @@
+- add_to_breadcrumbs _('Create a new project'), new_project_path
+- page_title _('Import history')
+
+#import-history-mount-element{ data: { logo: asset_url('gitlab_logo.png') } }
diff --git a/app/views/import/shared/_errors.html.haml b/app/views/import/shared/_errors.html.haml
index 3e8a99c541a..aa6fcc445fd 100644
--- a/app/views/import/shared/_errors.html.haml
+++ b/app/views/import/shared/_errors.html.haml
@@ -1,8 +1,7 @@
- if @errors.present?
- = render 'shared/global_alert',
- variant: :danger,
+ = render Pajamas::AlertComponent.new(variant: :danger,
dismissible: false,
- alert_class: 'gl-mb-5' do
+ alert_class: 'gl-mb-5') do
.gl-alert-body
- @errors.each do |error|
= error
diff --git a/app/views/jira_connect/users/show.html.haml b/app/views/jira_connect/users/show.html.haml
index cf88acd6976..29805a2c42d 100644
--- a/app/views/jira_connect/users/show.html.haml
+++ b/app/views/jira_connect/users/show.html.haml
@@ -1,8 +1,14 @@
-.jira-connect-users-container.gl-text-center
- - user_link = link_to(current_user.to_reference, user_path(current_user), target: '_blank', rel: 'noopener noreferrer')
- %h2= _('You are signed in to GitLab as %{user_link}').html_safe % { user_link: user_link }
+.gl-text-center.gl-mx-auto.gl-pt-6
+ %h3.gl-mb-4
+ = _('You are signed in to GitLab as:')
- %p= s_('Integrations|You can now close this window and return to the GitLab for Jira application.')
+ .gl-display-flex.gl-flex-direction-column.gl-align-items-center.gl-mb-4
+ = link_to user_path(current_user), target: '_blank', rel: 'noopener noreferrer' do
+ = user_avatar_without_link(user: current_user, size: 60, css_class: 'gl-mr-0! gl-mb-2', has_tooltip: false)
+ = link_to current_user.to_reference, user_path(current_user), target: '_blank', rel: 'noopener noreferrer'
+
+ %p.gl-mb-6
+ = s_('JiraService|You can now close this window and%{br}return to the GitLab for Jira application.').html_safe % { br: '<br>'.html_safe }
- if @jira_app_link
%p= external_link s_('Integrations|Return to GitLab for Jira'), @jira_app_link, class: 'gl-button btn btn-confirm'
diff --git a/app/views/layouts/_diffs_colors_css.haml b/app/views/layouts/_diffs_colors_css.haml
new file mode 100644
index 00000000000..d2efa392bd9
--- /dev/null
+++ b/app/views/layouts/_diffs_colors_css.haml
@@ -0,0 +1,20 @@
+- deletion_color = local_assigns.fetch(:deletion, nil)
+- addition_color = local_assigns.fetch(:addition, nil)
+
+- if deletion_color.present? || request.path == profile_preferences_path
+ = stylesheet_link_tag_defer "highlight/diff_custom_colors_deletion"
+- if deletion_color.present?
+ - deletion_color_rgb = hex_color_to_rgb_array(deletion_color).join(',')
+ :css
+ :root {
+ --diff-deletion-color: rgba(#{deletion_color_rgb},0.2);
+ }
+
+- if addition_color.present? || request.path == profile_preferences_path
+ = stylesheet_link_tag_defer "highlight/diff_custom_colors_addition"
+- if addition_color.present?
+ - addition_color_rgb = hex_color_to_rgb_array(addition_color).join(',')
+ :css
+ :root {
+ --diff-addition-color: rgba(#{addition_color_rgb},0.2);
+ }
diff --git a/app/views/layouts/_header_search.html.haml b/app/views/layouts/_header_search.html.haml
index d2fe9a9a6ee..f7b7aac6de4 100644
--- a/app/views/layouts/_header_search.html.haml
+++ b/app/views/layouts/_header_search.html.haml
@@ -1,4 +1,4 @@
-#js-header-search.header-search{ data: { 'search-context' => header_search_context.to_json,
+#js-header-search.header-search.is-not-active.gl-relative{ data: { 'search-context' => header_search_context.to_json,
'search-path' => search_path,
'issues-path' => issues_dashboard_path,
'mr-path' => merge_requests_dashboard_path,
@@ -6,7 +6,10 @@
= form_tag search_path, method: :get do |_f|
.gl-search-box-by-type
= sprite_icon('search', css_class: 'gl-search-box-by-type-search-icon gl-icon')
- %input{ id: 'search', name: 'search', type: "text", placeholder: s_('GlobalSearch|Search GitLab'), class: 'form-control gl-form-input gl-search-box-by-type-input', autocomplete: 'off' }
+ %input{ id: 'search', name: 'search', type: "text", placeholder: s_('GlobalSearch|Search GitLab'),
+ class: 'form-control gl-form-input gl-search-box-by-type-input',
+ autocomplete: 'off',
+ data: { qa_selector: 'search_box' } }
= hidden_field_tag :group_id, header_search_context[:group][:id] if header_search_context[:group]
= hidden_field_tag :project_id, header_search_context[:project][:id] if header_search_context[:project]
diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml
index a656b61dc8f..3c4b612f33f 100644
--- a/app/views/layouts/_page.html.haml
+++ b/app/views/layouts/_page.html.haml
@@ -20,6 +20,7 @@
= dispensable_render_if_exists "shared/namespace_user_cap_reached_alert"
= dispensable_render_if_exists "shared/new_user_signups_cap_reached_alert"
= yield :page_level_alert
+ = yield :user_over_limit_free_plan_alert
= yield :group_invite_members_banner
- unless @hide_breadcrumbs
= render "layouts/nav/breadcrumbs"
diff --git a/app/views/layouts/_snowplow.html.haml b/app/views/layouts/_snowplow.html.haml
index 8e9a5ea9406..0dad6d367c3 100644
--- a/app/views/layouts/_snowplow.html.haml
+++ b/app/views/layouts/_snowplow.html.haml
@@ -1,6 +1,6 @@
- return unless Gitlab::Tracking.enabled?
-- namespace = @group || @project&.namespace
+- namespace = @group || @project&.namespace || @namespace
= javascript_tag do
:plain
diff --git a/app/views/layouts/_startup_css.haml b/app/views/layouts/_startup_css.haml
index 67c871b95f5..64a86cf319e 100644
--- a/app/views/layouts/_startup_css.haml
+++ b/app/views/layouts/_startup_css.haml
@@ -1,6 +1,9 @@
- startup_filename_default = user_application_theme == 'gl-dark' ? 'dark' : 'general'
- startup_filename = local_assigns.fetch(:startup_filename, nil) || startup_filename_default
+- diffs_colors = user_diffs_colors
%style
= Rails.application.assets_manifest.find_sources("themes/#{user_application_theme_css_filename}.css").first.to_s.html_safe if user_application_theme_css_filename
= Rails.application.assets_manifest.find_sources("startup/startup-#{startup_filename}.css").first.to_s.html_safe
+
+= render 'layouts/diffs_colors_css', diffs_colors if diffs_colors.present? || request.path == profile_preferences_path
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 26e3d9b3b92..bdab5d7ea07 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -1,6 +1,6 @@
- page_classes = page_class << @html_class
- page_classes = page_classes.flatten.compact
-- body_classes = [user_application_theme, user_tab_width, @body_class, client_class_list]
+- body_classes = [user_application_theme, user_tab_width, @body_class, client_class_list, *custom_diff_color_classes]
!!! 5
%html{ lang: I18n.locale, class: page_classes }
diff --git a/app/views/layouts/errors.html.haml b/app/views/layouts/errors.html.haml
index 57260ccedea..3ddd8c6780f 100644
--- a/app/views/layouts/errors.html.haml
+++ b/app/views/layouts/errors.html.haml
@@ -22,8 +22,8 @@
}
// We do not have rails_ujs here, so we're manually making a link trigger a form submit.
- document.getElementById('sign_out_link').addEventListener('click', function(e) {
+ document.querySelector('.js-sign-out-link')?.addEventListener('click', (e) => {
e.preventDefault();
- document.getElementById('sign_out_form').submit();
+ document.querySelector('.js-sign-out-form')?.submit();
});
}());
diff --git a/app/views/layouts/header/_current_user_dropdown.html.haml b/app/views/layouts/header/_current_user_dropdown.html.haml
index daa48980c5b..11dd8ba6c08 100644
--- a/app/views/layouts/header/_current_user_dropdown.html.haml
+++ b/app/views/layouts/header/_current_user_dropdown.html.haml
@@ -27,7 +27,6 @@
%li
= link_to s_("CurrentUser|Preferences"), profile_preferences_path
= render_if_exists 'layouts/header/buy_pipeline_minutes', project: @project, namespace: @group
- = render_if_exists 'layouts/header/upgrade'
- if current_user_menu?(:help)
%li.divider.d-md-none
diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml
index 512a4185bee..c15a5e54a42 100644
--- a/app/views/layouts/header/_default.html.haml
+++ b/app/views/layouts/header/_default.html.haml
@@ -40,7 +40,7 @@
- search_menu_item = top_nav_search_menu_item_attrs
%li.nav-item.header-search-new.d-none.d-lg-block.m-auto
- unless current_controller?(:search)
- - if Feature.enabled?(:new_header_search)
+ - if Feature.enabled?(:new_header_search, default_enabled: :yaml)
= render 'layouts/header_search'
- else
= render 'layouts/search'
diff --git a/app/views/layouts/header/_registration_enabled_callout.html.haml b/app/views/layouts/header/_registration_enabled_callout.html.haml
index d1d23c86c81..affee15c4d0 100644
--- a/app/views/layouts/header/_registration_enabled_callout.html.haml
+++ b/app/views/layouts/header/_registration_enabled_callout.html.haml
@@ -1,11 +1,11 @@
- return unless show_registration_enabled_user_callout?
-= render 'shared/global_alert',
- title: _('Anyone can register for an account.'),
+= render Pajamas::AlertComponent.new(title: _('Anyone can register for an account.'),
variant: :warning,
alert_class: 'js-registration-enabled-callout',
- alert_data: { feature_id: Users::CalloutsHelper::REGISTRATION_ENABLED_CALLOUT, dismiss_endpoint: callouts_path },
- close_button_data: { testid: 'close-registration-enabled-callout' } do
+ alert_data: { feature_id: Users::CalloutsHelper::REGISTRATION_ENABLED_CALLOUT,
+ dismiss_endpoint: callouts_path },
+ close_button_data: { testid: 'close-registration-enabled-callout' }) do
.gl-alert-body
= _('Only allow anyone to register for accounts on GitLab instances that you intend to be used by anyone. Allowing anyone to register makes GitLab instances more vulnerable.')
.gl-alert-actions
diff --git a/app/views/layouts/header/_storage_enforcement_banner.html.haml b/app/views/layouts/header/_storage_enforcement_banner.html.haml
index 851fc57e44d..92c02d6ecfd 100644
--- a/app/views/layouts/header/_storage_enforcement_banner.html.haml
+++ b/app/views/layouts/header/_storage_enforcement_banner.html.haml
@@ -3,7 +3,12 @@
- banner_info = storage_enforcement_banner_info(namespace)
- return unless banner_info.present?
-= render 'shared/global_alert', variant: :warning, alert_class: 'js-storage-enforcement-banner', alert_data: { feature_id: banner_info[:callouts_feature_name], dismiss_endpoint: banner_info[:callouts_path], group_id: namespace.id, defer_links: "true" } do
+= render Pajamas::AlertComponent.new(variant: :warning,
+ alert_class: 'js-storage-enforcement-banner',
+ alert_data: { feature_id: banner_info[:callouts_feature_name],
+ dismiss_endpoint: banner_info[:callouts_path],
+ group_id: namespace.id,
+ defer_links: "true" }) do
.gl-alert-body
= banner_info[:text]
= banner_info[:learn_more_link]
diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml
index 52eea73ecd2..94c708783e4 100644
--- a/app/views/layouts/nav/sidebar/_admin.html.haml
+++ b/app/views/layouts/nav/sidebar/_admin.html.haml
@@ -53,7 +53,7 @@
= _('Gitaly Servers')
= nav_link(controller: admin_analytics_nav_links) do
- = link_to admin_dev_ops_report_path, data: { qa_selector: 'admin_analytics_link' }, class: 'has-sub-items' do
+ = link_to admin_dev_ops_reports_path, data: { qa_selector: 'admin_analytics_link' }, class: 'has-sub-items' do
.nav-icon-container
= sprite_icon('chart')
%span.nav-item-name
@@ -61,12 +61,12 @@
%ul.sidebar-sub-level-items{ data: { qa_selector: 'admin_sidebar_analytics_submenu_content' } }
= nav_link(controller: admin_analytics_nav_links, html_options: { class: "fly-out-top-item" }) do
- = link_to admin_dev_ops_report_path do
+ = link_to admin_dev_ops_reports_path do
%strong.fly-out-top-item-name
= _('Analytics')
%li.divider.fly-out-top-item
= nav_link(controller: :dev_ops_report) do
- = link_to admin_dev_ops_report_path, title: _('DevOps Reports') do
+ = link_to admin_dev_ops_reports_path, title: _('DevOps Reports') do
%span
= _('DevOps Reports')
= nav_link(controller: :usage_trends) do
@@ -269,11 +269,10 @@
= link_to metrics_and_profiling_admin_application_settings_path, title: _('Metrics and profiling'), class: 'qa-admin-settings-metrics-and-profiling-item' do
%span
= _('Metrics and profiling')
- - if Feature.enabled?(:admin_application_settings_service_usage_data_center, default_enabled: :yaml)
- = nav_link(path: ['application_settings#service_usage_data']) do
- = link_to service_usage_data_admin_application_settings_path, title: _('Service usage data') do
- %span
- = _('Service usage data')
+ = nav_link(path: ['application_settings#service_usage_data']) do
+ = link_to service_usage_data_admin_application_settings_path, title: _('Service usage data') do
+ %span
+ = _('Service usage data')
= nav_link(path: 'application_settings#network') do
= link_to network_admin_application_settings_path, title: _('Network'), data: { qa_selector: 'admin_settings_network_item' } do
%span
diff --git a/app/views/notify/_note_email.html.haml b/app/views/notify/_note_email.html.haml
index 55984472047..2f0e62981ec 100644
--- a/app/views/notify/_note_email.html.haml
+++ b/app/views/notify/_note_email.html.haml
@@ -2,16 +2,18 @@
- diff_limit = local_assigns.fetch(:diff_limit, nil)
- target_url = local_assigns.fetch(:target_url, @target_url)
- note_style = local_assigns.fetch(:note_style, "")
+- include_stylesheet_link = local_assigns.fetch(:include_stylesheet_link, true)
-- discussion = note.discussion if note.part_of_discussion?
+- author = local_assigns.fetch(:author) { note.author }
+- discussion = local_assigns.fetch(:discussion) { note.discussion } if note.part_of_discussion?
%p{ style: "color: #777777;" }
= succeed ':' do
- = link_to note.author_name, user_url(note.author)
+ = link_to author.name, user_url(author)
- if discussion.nil?
= link_to 'commented', target_url
- else
- - if note.start_of_discussion?
+ - if discussion.first_note == note
started a new
- else
commented on a
@@ -22,14 +24,15 @@
= link_to 'discussion', target_url
- if discussion&.diff_discussion? && discussion.on_text?
- = content_for :head do
- = stylesheet_link_tag 'mailers/highlighted_diff_email'
+ - if include_stylesheet_link
+ = content_for :head do
+ = stylesheet_link_tag 'mailers/highlighted_diff_email'
- %table.code
+ %table.code.gl-mb-5
= render partial: "projects/diffs/email_line",
collection: discussion.truncated_diff_lines(diff_limit: diff_limit),
as: :line,
locals: { diff_file: discussion.diff_file }
.md{ style: note_style }
- = markdown(note.note, pipeline: :email, author: note.author, current_user: @recipient, issuable_reference_expansion_enabled: true)
+ = markdown(note.note, pipeline: :email, author: author, current_user: @recipient, issuable_reference_expansion_enabled: true)
diff --git a/app/views/notify/_note_email.text.erb b/app/views/notify/_note_email.text.erb
index 8e2f7e6f76e..8853519fb8d 100644
--- a/app/views/notify/_note_email.text.erb
+++ b/app/views/notify/_note_email.text.erb
@@ -1,13 +1,14 @@
<% note = local_assigns.fetch(:note, @note) -%>
<% diff_limit = local_assigns.fetch(:diff_limit, nil) -%>
<% target_url = local_assigns.fetch(:target_url, @target_url) -%>
-<% discussion = note.discussion if note.part_of_discussion? -%>
+<% author = local_assigns.fetch(:author) { note.author } -%>
+<% discussion = local_assigns.fetch(:discussion) { note.discussion } if note.part_of_discussion? -%>
-<%= sanitize_name(note.author_name) -%>
+<%= sanitize_name(author.name) -%>
<% if discussion.nil? -%>
<%= 'commented' -%>:
<% else -%>
-<% if note.start_of_discussion? -%>
+<% if discussion.first_note == note -%>
<%= 'started a new discussion' -%>
<% else -%>
<%= 'commented on a discussion' -%>
diff --git a/app/views/notify/issue_due_email.html.haml b/app/views/notify/issue_due_email.html.haml
index e512d7732e2..3208d061928 100644
--- a/app/views/notify/issue_due_email.html.haml
+++ b/app/views/notify/issue_due_email.html.haml
@@ -1,11 +1,11 @@
%p.details
- #{link_to @issue.author_name, user_url(@issue.author)}'s issue #{issue_reference_link(@issue)} is due soon.
+ = sprintf(s_("Notify|%{author_link}'s issue %{issue_reference_link} is due soon."), { author_link: link_to(@issue.author_name, user_url(@issue.author)), issue_reference_link: issue_reference_link(@issue) })
- if @issue.assignees.any?
%p
= assignees_label(@issue)
%p
- This issue is due on: #{@issue.due_date.to_s(:medium)}
+ = sprintf(s_('Notify|This issue is due on: %{issue_due_date}'), { issue_due_date: @issue.due_date.to_s(:medium) }).html_safe
- if @issue.description
.md
diff --git a/app/views/notify/issue_moved_email.html.haml b/app/views/notify/issue_moved_email.html.haml
index b766cb1a523..c77a863d1a4 100644
--- a/app/views/notify/issue_moved_email.html.haml
+++ b/app/views/notify/issue_moved_email.html.haml
@@ -1,9 +1,7 @@
%p
- Issue was moved to another project.
+ = s_('Notify|Issue was moved to another project.')
- if @can_access_project
%p
- New issue:
- = link_to project_issue_url(@new_project, @new_issue) do
- = @new_issue.title
+ = sprintf(s_('Notify|New issue: %{project_issue_url}'), { project_issue_url: link_to(@new_issue.title, project_issue_url(@new_project, @new_issue)) } ).html_safe
- else
- You don't have access to the project.
+ = s_("Notify|You don't have access to the project.")
diff --git a/app/views/notify/issue_status_changed_email.html.haml b/app/views/notify/issue_status_changed_email.html.haml
index 66e73a9b03f..545f9c006af 100644
--- a/app/views/notify/issue_status_changed_email.html.haml
+++ b/app/views/notify/issue_status_changed_email.html.haml
@@ -1,2 +1,2 @@
%p
- Issue was #{@issue_status} by #{sanitize_name(@updated_by.name)}
+ = sprintf(s_('Notify|Issue was %{issue_status} by %{updated_by}'), { issue_status: @issue_status, updated_by: sanitize_name(@updated_by.name) }).html_safe
diff --git a/app/views/notify/merge_request_status_email.html.haml b/app/views/notify/merge_request_status_email.html.haml
index 49f2366c594..8e8d27b3cec 100644
--- a/app/views/notify/merge_request_status_email.html.haml
+++ b/app/views/notify/merge_request_status_email.html.haml
@@ -1,3 +1,3 @@
%p
- Merge request #{merge_request_reference_link(@merge_request)}
- was #{@mr_status} by #{sanitize_name(@updated_by.name)}
+ = sprintf(s_('Notify|Merge request %{merge_request} was %{mr_status} by %{updated_by}'),
+ { merge_request: merge_request_reference_link(@merge_request), mr_status: @mr_status, updated_by: sanitize_name(@updated_by.name) }).html_safe
diff --git a/app/views/notify/merge_request_status_email.text.haml b/app/views/notify/merge_request_status_email.text.haml
index 1a8f848218c..f3845b2b910 100644
--- a/app/views/notify/merge_request_status_email.text.haml
+++ b/app/views/notify/merge_request_status_email.text.haml
@@ -1,9 +1,9 @@
-Merge request #{@merge_request.to_reference} was #{@mr_status} by #{sanitize_name(@updated_by.name)}
+= sprintf(s_('Notify|Merge request %{merge_request} was %{mr_status}'), { merge_request: @merge_request.to_reference, mr_status: sanitize_name(@updated_by.name) })
-Merge request URL: #{project_merge_request_url(@merge_request.target_project, @merge_request)}
+= sprintf(s_('Notify|Merge request URL: %{merge_request_url}'), { merge_request_url: project_merge_request_url(@merge_request.target_project, @merge_request) })
= merge_path_description(@merge_request, 'to')
-Author: #{sanitize_name(@merge_request.author_name)}
+= sprintf(s_('Notify|Author: %{author_name}'), { author_name: sanitize_name(@merge_request.author_name) })
= assignees_label(@merge_request)
= reviewers_label(@merge_request)
diff --git a/app/views/notify/merge_request_unmergeable_email.html.haml b/app/views/notify/merge_request_unmergeable_email.html.haml
index fddf9eaf95a..6bcff28985c 100644
--- a/app/views/notify/merge_request_unmergeable_email.html.haml
+++ b/app/views/notify/merge_request_unmergeable_email.html.haml
@@ -1,2 +1,2 @@
%p
- Merge request #{merge_request_reference_link(@merge_request)} can no longer be merged due to conflict.
+ = sprintf(s_('Notify|Merge request %{merge_request} can no longer be merged due to conflict.'), { merge_request: merge_request_reference_link(@merge_request) }).html_safe
diff --git a/app/views/notify/merge_request_unmergeable_email.text.haml b/app/views/notify/merge_request_unmergeable_email.text.haml
index 3db5f21e6c2..22d56e73ca8 100644
--- a/app/views/notify/merge_request_unmergeable_email.text.haml
+++ b/app/views/notify/merge_request_unmergeable_email.text.haml
@@ -1,9 +1,9 @@
-Merge request #{@merge_request.to_reference} can no longer be merged due to conflict.
+= sprintf(s_('Notify|Merge request %{merge_request} can no longer be merged due to conflict.'), { merge_request: @merge_request.to_reference })
-Merge request URL: #{project_merge_request_url(@merge_request.target_project, @merge_request)}
+= sprintf(s_('Notify|Merge request URL: %{merge_request_url}'), { merge_request_url: project_merge_request_url(@merge_request.target_project, @merge_request) })
= merge_path_description(@merge_request, 'to')
-Author: #{sanitize_name(@merge_request.author_name)}
+= sprintf(s_('Author: %{author_name}'), { author_name: sanitize_name(@merge_request.author_name) })
= assignees_label(@merge_request)
= reviewers_label(@merge_request)
diff --git a/app/views/notify/merged_merge_request_email.html.haml b/app/views/notify/merged_merge_request_email.html.haml
index f0dadd9ce91..0622e2f6ffb 100644
--- a/app/views/notify/merged_merge_request_email.html.haml
+++ b/app/views/notify/merged_merge_request_email.html.haml
@@ -1,2 +1,2 @@
%p
- Merge request #{merge_request_reference_link(@merge_request)} was merged
+ = sprintf(s_('Notify|Merge request %{merge_request} was merged'), { merge_request: merge_request_reference_link(@merge_request) }).html_safe
diff --git a/app/views/notify/merged_merge_request_email.text.haml b/app/views/notify/merged_merge_request_email.text.haml
index 91f920dec21..d6ec916641d 100644
--- a/app/views/notify/merged_merge_request_email.text.haml
+++ b/app/views/notify/merged_merge_request_email.text.haml
@@ -1,9 +1,9 @@
-Merge request #{@merge_request.to_reference} was merged
+= sprintf(s_('Notify|Merge request %{merge_request} was merged'), { merge_request: @merge_request.to_reference })
-Merge request URL: #{project_merge_request_url(@merge_request.target_project, @merge_request)}
+= sprintf(s_('Notify|Merge request URL: %{merge_request_url}'), { merge_request_url: project_merge_request_url(@merge_request.target_project, @merge_request) })
= merge_path_description(@merge_request, 'to')
-Author: #{sanitize_name(@merge_request.author_name)}
+= sprintf(s_('Notify|Author: %{author_name}'), { author_name: sanitize_name(@merge_request.author_name) })
= assignees_label(@merge_request)
= reviewers_label(@merge_request)
diff --git a/app/views/notify/new_email_address_added_email.erb b/app/views/notify/new_email_address_added_email.erb
new file mode 100644
index 00000000000..3af1953c902
--- /dev/null
+++ b/app/views/notify/new_email_address_added_email.erb
@@ -0,0 +1,5 @@
+<%= say_hi(@user) %>
+
+<%= new_email_address_added_text(@email) %>
+
+<%= remove_email_address_text %>
diff --git a/app/views/notify/new_email_address_added_email.haml b/app/views/notify/new_email_address_added_email.haml
new file mode 100644
index 00000000000..6d00aaedfd5
--- /dev/null
+++ b/app/views/notify/new_email_address_added_email.haml
@@ -0,0 +1,6 @@
+%p
+ = say_hi(@user)
+%p
+ = new_email_address_added_text(@email)
+%p
+ = remove_email_address_text(format: :html)
diff --git a/app/views/notify/new_merge_request_email.html.haml b/app/views/notify/new_merge_request_email.html.haml
index f67ac5f8fb2..1542d5bba85 100644
--- a/app/views/notify/new_merge_request_email.html.haml
+++ b/app/views/notify/new_merge_request_email.html.haml
@@ -2,18 +2,17 @@
= html_escape(_('%{user} created a merge request: %{mr_link}')) % { user: link_to(@merge_request.author_name, user_url(@merge_request.author)),
mr_link: merge_request_reference_link(@merge_request) }
-%p
- .branch
- = merge_path_description(@merge_request, 'to')
- .author
- Author: #{@merge_request.author_name}
- .assignee
- = assignees_label(@merge_request)
- .reviewer
- = reviewers_label(@merge_request)
- .approvers
- = render_if_exists 'notify/merge_request_approvers', presenter: @mr_presenter
+.branch
+ = merge_path_description(@merge_request, 'to')
+.author
+ Author: #{@merge_request.author_name}
+.assignee
+ = assignees_label(@merge_request)
+.reviewer
+ = reviewers_label(@merge_request)
+.approvers
+ = render_if_exists 'notify/merge_request_approvers', presenter: @mr_presenter
- if @merge_request.description
- .md
+ .md.gl-mt-5
= markdown(@merge_request.description, pipeline: :email, author: @merge_request.author, current_user: @recipient, issuable_reference_expansion_enabled: true)
diff --git a/app/views/notify/new_review_email.html.haml b/app/views/notify/new_review_email.html.haml
index 11da7723d8d..afc1bd68215 100644
--- a/app/views/notify/new_review_email.html.haml
+++ b/app/views/notify/new_review_email.html.haml
@@ -1,3 +1,7 @@
+- if @include_diff_discussion_stylesheet
+ = content_for :head do
+ = stylesheet_link_tag 'mailers/highlighted_diff_email'
+
%table{ border: "0", cellpadding: "0", cellspacing: "0", style: "width:100%;margin:0 auto;border-collapse:separate;border-spacing:0;" }
%tbody
%tr
@@ -5,12 +9,16 @@
%table{ border: "0", cellpadding: "0", cellspacing: "0", style: "width:100%;border-collapse:separate;border-spacing:0;" }
%tbody
%tr
- %td{ style: "color:#333333;border-bottom:1px solid #ededed;font-size:15px;font-weight:bold;line-height:1.4;padding: 20px 0;" }
+ %td{ style: "color:#333333;border-bottom:1px solid #ededed;font-weight:bold;line-height:1.4;padding: 20px 0;" }
- mr_link = link_to(@merge_request.to_reference(@project), project_merge_request_url(@project, @merge_request))
- mr_author_link = link_to(@author_name, user_url(@author))
= _('Merge request %{mr_link} was reviewed by %{mr_author}').html_safe % { mr_link: mr_link, mr_author: mr_author_link }
%tr
- %td{ style: "overflow:hidden;font-size:14px;line-height:1.4;display:grid;" }
+ %td{ style: "overflow:hidden;line-height:1.4;display:grid;" }
- @notes.each do |note|
+ -# Get preloaded note discussion
+ - discussion = @discussions[note.discussion_id] if note.part_of_discussion?
+ -# Preload project for discussions first note
+ - discussion.first_note.project = @project if discussion&.first_note
- target_url = project_merge_request_url(@project, @merge_request, anchor: "note_#{note.id}")
- = render 'note_email', note: note, diff_limit: 3, target_url: target_url, note_style: "border-bottom:1px solid #ededed;"
+ = render 'note_email', note: note, diff_limit: 3, target_url: target_url, note_style: "border-bottom:1px solid #ededed; padding-bottom: 1em;", include_stylesheet_link: false, discussion: discussion, author: @author
diff --git a/app/views/notify/new_review_email.text.erb b/app/views/notify/new_review_email.text.erb
index 164735abad0..7bf878aefd0 100644
--- a/app/views/notify/new_review_email.text.erb
+++ b/app/views/notify/new_review_email.text.erb
@@ -4,8 +4,10 @@
--
<% @notes.each_with_index do |note, index| %>
+ <!-- Get preloaded note discussion-->
+ <% discussion = @discussions[note.discussion_id] if note.part_of_discussion?%>
<% target_url = project_merge_request_url(@project, @merge_request, anchor: "note_#{note.id}") %>
- <%= render 'note_email', note: note, diff_limit: 3, target_url: target_url %>
+ <%= render 'note_email', note: note, diff_limit: 3, target_url: target_url, discussion: discussion, author: @author %>
<% if index != @notes.length-1 %>
--
diff --git a/app/views/notify/push_to_merge_request_email.html.haml b/app/views/notify/push_to_merge_request_email.html.haml
index 3e9f9b442e0..5197a1bdd08 100644
--- a/app/views/notify/push_to_merge_request_email.html.haml
+++ b/app/views/notify/push_to_merge_request_email.html.haml
@@ -3,24 +3,25 @@
pushed new commits to merge request
= merge_request_reference_link(@merge_request)
-- if @existing_commits.any?
- - count = @existing_commits.size
+- if @total_existing_commits_count > 0
%ul
%li
- - if count == 1
+ - if @total_existing_commits_count == 1
- commit_id = @existing_commits.first[:short_id]
= link_to(commit_id, project_commit_url(@merge_request.target_project, commit_id))
- else
= link_to(project_compare_url(@merge_request.target_project, from: @existing_commits.first[:short_id], to: @existing_commits.last[:short_id])) do
#{@existing_commits.first[:short_id]}...#{@existing_commits.last[:short_id]}
= precede '&nbsp;- ' do
- - commits_text = "#{count} commit".pluralize(count)
+ - commits_text = "#{@total_existing_commits_count} commit".pluralize(@total_existing_commits_count)
#{commits_text} from branch `#{@merge_request.target_branch}`
-- if @new_commits.any?
+- if @total_new_commits_count > 0
%ul
- @new_commits.each do |commit|
%li
= link_to(commit[:short_id], project_commit_url(@merge_request.target_project, commit[:short_id]))
= precede ' - ' do
#{commit[:title]}
+ - if @total_stripped_new_commits_count > 0
+ %li And #{@total_stripped_new_commits_count} more
diff --git a/app/views/notify/service_desk_new_note_email.html.haml b/app/views/notify/service_desk_new_note_email.html.haml
index 0c16cf3315f..02f6b3914c9 100644
--- a/app/views/notify/service_desk_new_note_email.html.haml
+++ b/app/views/notify/service_desk_new_note_email.html.haml
@@ -1,5 +1,5 @@
- if Gitlab::CurrentSettings.email_author_in_body
- %div
+ .gl-mb-5
= _("%{author_link} wrote:").html_safe % { author_link: link_to(@note.author_name, user_url(@note.author)) }
.md
= markdown(@note.note, pipeline: :email, author: @note.author, issuable_reference_expansion_enabled: true)
diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml
index fdcee3670b7..8568e61aa33 100644
--- a/app/views/profiles/accounts/show.html.haml
+++ b/app/views/profiles/accounts/show.html.haml
@@ -2,18 +2,15 @@
- @content_class = "limit-container-width" unless fluid_layout
- if current_user.ldap_user?
- = render 'shared/global_alert',
- variant: :info,
- alert_class: 'gl-my-5',
- dismissible: false do
+ = render Pajamas::AlertComponent.new(alert_class: 'gl-my-5',
+ dismissible: false) do
.gl-alert-body
= s_('Profiles|Some options are unavailable for LDAP accounts')
- if params[:two_factor_auth_enabled_successfully]
- = render 'shared/global_alert',
- variant: :success,
+ = render Pajamas::AlertComponent.new(variant: :success,
alert_class: 'gl-my-5',
- close_button_class: 'js-close-2fa-enabled-success-alert' do
+ close_button_class: 'js-close-2fa-enabled-success-alert') do
.gl-alert-body
= html_escape(_('You have set up 2FA for your account! If you lose access to your 2FA device, you can use your recovery codes to access your account. Alternatively, if you upload an SSH key, you can %{anchorOpen}use that key to generate additional recovery codes%{anchorClose}.')) % { anchorOpen: '<a href="%{href}">'.html_safe % { href: help_page_path('user/profile/account/two_factor_authentication', anchor: 'generate-new-recovery-codes-using-ssh') }, anchorClose: '</a>'.html_safe }
diff --git a/app/views/profiles/keys/_form.html.haml b/app/views/profiles/keys/_form.html.haml
index bebbe49a485..941b8545745 100644
--- a/app/views/profiles/keys/_form.html.haml
+++ b/app/views/profiles/keys/_form.html.haml
@@ -9,9 +9,9 @@
%p.form-text.text-muted= s_('Profiles|Begins with %{ssh_key_algorithms}.') % { ssh_key_algorithms: ssh_key_allowed_algorithms }
.form-row
.col.form-group
- = f.label :title, _('Title'), class: 'label-bold'
- = f.text_field :title, class: "form-control gl-form-input input-lg qa-key-title-field", required: true, placeholder: s_('Profiles|e.g. My MacBook key')
- %p.form-text.text-muted= s_('Profiles|Give your individual key a title. This will be publicly visible.')
+ = f.label :title, s_('Profiles|Title'), class: 'label-bold'
+ = f.text_field :title, class: "form-control gl-form-input input-lg qa-key-title-field", required: true, placeholder: s_('Profiles|Example: MacBook key')
+ %p.form-text.text-muted= s_('Profiles|Key titles are publicly visible.')
.col.form-group
= f.label :expires_at, s_('Profiles|Expiration date'), class: 'label-bold'
diff --git a/app/views/profiles/keys/index.html.haml b/app/views/profiles/keys/index.html.haml
index 7d4c3b6115f..5c8acc053f4 100644
--- a/app/views/profiles/keys/index.html.haml
+++ b/app/views/profiles/keys/index.html.haml
@@ -11,7 +11,7 @@
%h5.gl-mt-0
= _('Add an SSH key')
%p.profile-settings-content
- - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('ssh/index.md') }
+ - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/ssh.md') }
= _('Add an SSH key for secure access to GitLab. %{help_link_start}Learn more.%{help_link_end}').html_safe % {help_link_start: help_link_start, help_link_end: '</a>'.html_safe }
= render 'form'
%hr
diff --git a/app/views/profiles/notifications/_email_settings.html.haml b/app/views/profiles/notifications/_email_settings.html.haml
index f2121199412..b4db99a8bd4 100644
--- a/app/views/profiles/notifications/_email_settings.html.haml
+++ b/app/views/profiles/notifications/_email_settings.html.haml
@@ -5,6 +5,4 @@
.help-block
= local_assigns.fetch(:help_text, nil)
.form-group
- %label{ for: 'user_email_opted_in' }
- = form.check_box :email_opted_in
- %span= _('Receive product marketing emails')
+ = form.gitlab_ui_checkbox_component :email_opted_in, _('Receive product marketing emails')
diff --git a/app/views/profiles/notifications/show.html.haml b/app/views/profiles/notifications/show.html.haml
index 22cb95b346a..5d74bbe9971 100644
--- a/app/views/profiles/notifications/show.html.haml
+++ b/app/views/profiles/notifications/show.html.haml
@@ -3,16 +3,11 @@
%div
- if @user.errors.any?
- .gl-alert.gl-alert-danger.gl-my-5
- .gl-alert-container
- %button.js-close.btn.gl-dismiss-btn.btn-default.btn-sm.gl-button.btn-default-tertiary.btn-icon{ type: 'button', 'aria-label' => _('Dismiss') }
- = sprite_icon('close', css_class: 'gl-icon')
- = sprite_icon('error', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
- .gl-alert-content
- .gl-alert-body
- %ul
- - @user.errors.full_messages.each do |msg|
- %li= msg
+ = render Pajamas::AlertComponent.new(variant: :danger) do
+ .gl-alert-body
+ %ul
+ - @user.errors.full_messages.each do |msg|
+ %li= msg
= hidden_field_tag :notification_type, 'global'
.row.gl-mt-3
@@ -27,7 +22,7 @@
%h5.gl-mt-0
= _('Global notification settings')
- = form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications gl-mt-3' } do |f|
+ = gitlab_ui_form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications gl-mt-3' } do |f|
= render_if_exists 'profiles/notifications/email_settings', form: f
= label_tag :global_notification_level, "Global notification level", class: "label-bold"
@@ -39,10 +34,9 @@
.clearfix
- = form_for @user, url: profile_notifications_path, method: :put do |f|
- %label{ for: 'user_notified_of_own_activity' }
- = f.check_box :notified_of_own_activity
- %span= _('Receive notifications about your own activity')
+ = gitlab_ui_form_for @user, url: profile_notifications_path, method: :put do |f|
+ .form-group
+ = f.gitlab_ui_checkbox_component :notified_of_own_activity, _('Receive notifications about your own activity')
%hr
%h5
diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml
index 48be2001c9c..3fb48f3d3e3 100644
--- a/app/views/profiles/preferences/show.html.haml
+++ b/app/views/profiles/preferences/show.html.haml
@@ -8,7 +8,7 @@
- Gitlab::Themes.each do |theme|
= stylesheet_link_tag "themes/#{theme.css_filename}" if theme.css_filename
-= form_for @user, url: profile_preferences_path, remote: true, method: :put, html: { id: "profile-preferences-form" } do |f|
+= gitlab_ui_form_for @user, url: profile_preferences_path, remote: true, method: :put, html: { id: "profile-preferences-form" } do |f|
.row.gl-mt-3.js-preferences-form.js-search-settings-section
.col-lg-4.application-theme#navigation-theme
%h4.gl-mt-0
@@ -45,6 +45,19 @@
%hr
.row.js-preferences-form.js-search-settings-section
+ .col-lg-4.profile-settings-sidebar#diffs-colors
+ %h4.gl-mt-0
+ = s_('Preferences|Diff colors')
+ %p
+ = s_('Preferences|Customize the colors of removed and added lines in diffs.')
+ .col-lg-8
+ .form-group
+ #js-profile-preferences-diffs-colors-app{ data: user_diffs_colors }
+
+ .col-sm-12
+ %hr
+
+ .row.js-preferences-form.js-search-settings-section
.col-lg-4.profile-settings-sidebar#behavior
%h4.gl-mt-0
= s_('Preferences|Behavior')
@@ -74,27 +87,19 @@
= f.select :project_view, project_view_choices, {}, class: 'select2'
.form-text.text-muted
= s_('Preferences|Choose what content you want to see on a project’s overview page.')
- .form-group.form-check
- = f.check_box :render_whitespace_in_code, class: 'form-check-input'
- = f.label :render_whitespace_in_code, class: 'form-check-label' do
- = s_('Preferences|Render whitespace characters in the Web IDE')
- .form-group.form-check
- = f.check_box :show_whitespace_in_diffs, class: 'form-check-input'
- = f.label :show_whitespace_in_diffs, class: 'form-check-label' do
- = s_('Preferences|Show whitespace changes in diffs')
- .form-group.form-check
- = f.check_box :view_diffs_file_by_file, class: 'form-check-input'
- = f.label :view_diffs_file_by_file, class: 'form-check-label' do
- = s_("Preferences|Show one file at a time on merge request's Changes tab")
- .form-text.text-muted
- = s_("Preferences|Instead of all the files changed, show only one file at a time. To switch between files, use the file browser.")
- .form-group.form-check
- = f.check_box :markdown_surround_selection, class: 'form-check-input'
- = f.label :markdown_surround_selection, class: 'form-check-label' do
- = s_('Preferences|Surround text selection when typing quotes or brackets')
- .form-text.text-muted
- - supported_characters = %w(" ' ` \( [ { < * _).map {|char| "<code>#{char}</code>" }.join(', ')
- = sprintf(s_( "Preferences|When you type in a description or comment box, selected text is surrounded by the corresponding character after typing one of the following characters: %{supported_characters}."), { supported_characters: supported_characters }).html_safe
+ .form-group
+ = f.gitlab_ui_checkbox_component :render_whitespace_in_code, s_('Preferences|Render whitespace characters in the Web IDE')
+ .form-group
+ = f.gitlab_ui_checkbox_component :show_whitespace_in_diffs, s_('Preferences|Show whitespace changes in diffs')
+ .form-group
+ = f.gitlab_ui_checkbox_component :view_diffs_file_by_file,
+ s_("Preferences|Show one file at a time on merge request's Changes tab"),
+ help_text: s_("Preferences|Instead of all the files changed, show only one file at a time. To switch between files, use the file browser.")
+ .form-group
+ - supported_characters = %w(" ' ` &#40; [ { < * _).map {|char| "<code>#{char}</code>" }.join(', ')
+ = f.gitlab_ui_checkbox_component :markdown_surround_selection,
+ s_('Preferences|Surround text selection when typing quotes or brackets'),
+ help_text: sprintf(s_( "Preferences|When you type in a description or comment box, selected text is surrounded by the corresponding character after typing one of the following characters: %{supported_characters}."), { supported_characters: supported_characters }).html_safe
.form-group
= f.label :tab_width, s_('Preferences|Tab width'), class: 'label-bold'
@@ -138,16 +143,12 @@
= succeed '.' do
= link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'time-preferences'), target: '_blank', rel: 'noopener noreferrer'
.col-lg-8
- .form-group.form-check
- = f.check_box :time_display_relative, class: 'form-check-input'
- = f.label :time_display_relative, class: 'form-check-label' do
- = s_('Preferences|Use relative times')
- .form-text.text-muted
- = s_('Preferences|For example: 30 minutes ago.')
+ .form-group
+ = f.gitlab_ui_checkbox_component :time_display_relative,
+ s_('Preferences|Use relative times'),
+ help_text: s_('Preferences|For example: 30 minutes ago.')
- if Feature.enabled?(:user_time_settings)
- .form-group.form-check
- = f.check_box :time_format_in_24h, class: 'form-check-input'
- = f.label :time_format_in_24h, class: 'form-check-label' do
- = s_('Preferences|Display time in 24-hour format')
+ .form-group
+ = f.gitlab_ui_checkbox_component :time_format_in_24h, s_('Preferences|Display time in 24-hour format')
#js-profile-preferences-app{ data: data_attributes }
diff --git a/app/views/profiles/two_factor_auths/show.html.haml b/app/views/profiles/two_factor_auths/show.html.haml
index 5f8b21b2646..3ae64643420 100644
--- a/app/views/profiles/two_factor_auths/show.html.haml
+++ b/app/views/profiles/two_factor_auths/show.html.haml
@@ -34,13 +34,15 @@
= _('To add the entry manually, provide the following details to the application on your phone.')
%p.gl-mt-0.gl-mb-0
= _('Account: %{account}') % { account: @account_string }
- %p.gl-mt-0.gl-mb-0{ data: { qa_selector: 'otp_secret_content' } }
+ %p.gl-mt-0.gl-mb-0.two-factor-secret{ data: { qa_selector: 'otp_secret_content' } }
= _('Key: %{key}') %{ key: current_user.otp_secret.scan(/.{4}/).join(' ') }
%p.two-factor-new-manual-content
= _('Time based: Yes')
= form_tag profile_two_factor_auth_path, method: :post do |f|
- if @error
- = render 'shared/global_alert', title: @error[:message], variant: :danger, dismissible: false do
+ = render Pajamas::AlertComponent.new(title: @error[:message],
+ variant: :danger,
+ dismissible: false) do
.gl-alert-body
= link_to _('Try the troubleshooting steps here.'), help_page_path('user/profile/account/two_factor_authentication.md', anchor: 'troubleshooting'), target: '_blank', rel: 'noopener noreferrer'
diff --git a/app/views/projects/_deletion_failed.html.haml b/app/views/projects/_deletion_failed.html.haml
index b713b805009..f9d8a2d2989 100644
--- a/app/views/projects/_deletion_failed.html.haml
+++ b/app/views/projects/_deletion_failed.html.haml
@@ -1,7 +1,9 @@
- project = local_assigns.fetch(:project)
- return unless project.delete_error.present?
-= render 'shared/global_alert', variant: :warning, dismissible: false, alert_class: 'project-deletion-failed-message' do
+= render Pajamas::AlertComponent.new(variant: :warning,
+ dismissible: false,
+ alert_class: 'project-deletion-failed-message') do
.gl-alert-body
This project was scheduled for deletion, but failed with the following message:
= project.delete_error
diff --git a/app/views/projects/_files.html.haml b/app/views/projects/_files.html.haml
index a7cf50623f0..74ace549bb1 100644
--- a/app/views/projects/_files.html.haml
+++ b/app/views/projects/_files.html.haml
@@ -20,6 +20,6 @@
= render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout), project_buttons: true
#js-tree-list{ data: vue_file_list_data(project, ref) }
- - if !Feature.enabled?(:new_dir_modal, default_enabled: :yaml) && can_edit_tree?
+ - if can_edit_tree?
= render 'projects/blob/new_dir'
diff --git a/app/views/projects/_import_project_pane.html.haml b/app/views/projects/_import_project_pane.html.haml
index a8b809d1871..6dfb338a916 100644
--- a/app/views/projects/_import_project_pane.html.haml
+++ b/app/views/projects/_import_project_pane.html.haml
@@ -1,10 +1,12 @@
- active_tab = local_assigns.fetch(:active_tab, 'blank')
- track_label = local_assigns.fetch(:track_label, 'import_project')
+- namespace_id = local_assigns.fetch(:destination_namespace_id, nil)
.project-import
.form-group.import-btn-container.clearfix
- %h5
+ %h5.gl-display-flex
= _("Import project from")
+ = link_to _('History'), import_history_index_path, class: 'gl-link gl-ml-auto gl-font-weight-normal'
.import-buttons
- if gitlab_project_import_enabled?
.import_gitlab_project.has-tooltip{ data: { container: 'body', qa_selector: 'gitlab_import_button' } }
@@ -15,7 +17,7 @@
- if github_import_enabled?
%div
- = link_to new_import_github_path, class: 'gl-button btn-default btn js-import-github js-import-project-btn', data: { platform: 'github', **tracking_attrs_data(track_label, 'click_button', 'github') } do
+ = link_to new_import_github_path(namespace_id: namespace_id), class: 'gl-button btn-default btn js-import-github js-import-project-btn', data: { platform: 'github', **tracking_attrs_data(track_label, 'click_button', 'github') } do
.gl-button-icon
= sprite_icon('github')
GitHub
@@ -79,7 +81,7 @@
.js-toggle-content.toggle-import-form{ class: ('hide' if active_tab != 'import') }
- = form_for @project, html: { class: 'new_project gl-show-field-errors js-project-import' } do |f|
+ = gitlab_ui_form_for @project, html: { class: 'new_project gl-show-field-errors js-project-import' } do |f|
%hr
= render "shared/import_form", f: f
= render 'projects/new_project_fields', f: f, project_name_id: "import-url-name", hide_init_with_readme: true, track_label: track_label
diff --git a/app/views/projects/_last_push.html.haml b/app/views/projects/_last_push.html.haml
index 88cce9e71c0..66857dadb65 100644
--- a/app/views/projects/_last_push.html.haml
+++ b/app/views/projects/_last_push.html.haml
@@ -1,9 +1,8 @@
- event = last_push_event
- if event && show_last_push_widget?(event)
- = render 'shared/global_alert',
- variant: :success,
+ = render Pajamas::AlertComponent.new(variant: :success,
alert_class: 'gl-mt-3',
- close_button_class: 'js-close-banner' do
+ close_button_class: 'js-close-banner') do
.gl-alert-body
%span= s_("LastPushEvent|You pushed to")
%strong.gl-display-inline-flex.gl-max-w-50p{ data: { toggle: 'tooltip' }, title: event.ref_name }
diff --git a/app/views/projects/_new_project_fields.html.haml b/app/views/projects/_new_project_fields.html.haml
index 1fb045544aa..e79825bdfc4 100644
--- a/app/views/projects/_new_project_fields.html.haml
+++ b/app/views/projects/_new_project_fields.html.haml
@@ -9,33 +9,37 @@
= f.label :name, class: 'label-bold' do
%span= _("Project name")
= f.text_field :name, placeholder: "My awesome project", class: "form-control gl-form-input input-lg", data: { qa_selector: 'project_name', track_label: "#{track_label}", track_action: "activate_form_input", track_property: "project_name", track_value: "" }, required: true, aria: { required: true }
- .form-group.project-path.col-sm-6
+ .form-group.project-path.col-sm-6.gl-pr-0
= f.label :namespace_id, class: 'label-bold' do
%span= _('Project URL')
.input-group.gl-flex-nowrap
- if current_user.can_select_namespace?
- namespace_id = namespace_id_from(params)
- .js-vue-new-project-url-select{ data: { namespace_full_path: GroupFinder.new(current_user).execute(id: namespace_id)&.full_path,
- namespace_id: namespace_id,
+ .js-vue-new-project-url-select{ data: { namespace_full_path: GroupFinder.new(current_user).execute(id: namespace_id)&.full_path || @current_user_group&.full_path,
+ namespace_id: namespace_id || @current_user_group&.id,
root_url: root_url,
track_label: track_label,
- user_namespace_full_path: current_user.namespace.full_path,
user_namespace_id: current_user.namespace.id } }
- else
.input-group-prepend.static-namespace.flex-shrink-0.has-tooltip{ title: user_url(current_user.username) + '/' }
.input-group-text.border-0
#{user_url(current_user.username)}/
= f.hidden_field :namespace_id, value: current_user.namespace_id
+ .gl-align-self-center.gl-pl-5 /
.form-group.project-path.col-sm-6
= f.label :path, class: 'label-bold' do
%span= _("Project slug")
= f.text_field :path, placeholder: "my-awesome-project", class: "form-control gl-form-input", required: true, aria: { required: true }, data: { qa_selector: 'project_path', username: current_user.username }
+.js-group-namespace-error.form-text.gl-text-red-500.gl-display-none
+ = s_('ProjectsNew|Pick a group or namespace where you want to create this project.')
- if current_user.can_create_group?
.form-text.text-muted
- link_start_group_path = '<a href="%{path}">' % { path: new_group_path }
- project_tip = s_('ProjectsNew|Want to house several dependent projects under the same namespace? %{link_start}Create a group.%{link_end}') % { link_start: link_start_group_path, link_end: '</a>' }
= project_tip.html_safe
-= render 'shared/global_alert', alert_class: "gl-mb-4 gl-display-none js-user-readme-repo", dismissible: false, variant: :success do
+= render Pajamas::AlertComponent.new(alert_class: "gl-mb-4 gl-display-none js-user-readme-repo",
+ dismissible: false,
+ variant: :success) do
.gl-alert-body
- help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/profile/index', anchor: 'add-details-to-your-profile-with-a-readme') }
= html_escape(_('%{project_path} is a project that you can use to add a README to your GitLab profile. Create a public project and initialize the repository with a README to get started. %{help_link_start}Learn more.%{help_link_end}')) % { project_path: "<strong>#{current_user.username} / #{current_user.username}</strong>".html_safe, help_link_start: help_link_start, help_link_end: '</a>'.html_safe }
@@ -45,7 +49,7 @@
= s_('ProjectsNew|Project description %{tag_start}(optional)%{tag_end}').html_safe % { tag_start: '<span>'.html_safe, tag_end: '</span>'.html_safe }
= f.text_area :description, placeholder: s_('ProjectsNew|Description format'), class: "form-control gl-form-input", rows: 3, maxlength: 250, data: { qa_selector: 'project_description', track_label: "#{track_label}", track_action: "activate_form_input", track_property: "project_description", track_value: "" }
-- unless Gitlab::CurrentSettings.current_application_settings.hide_third_party_offers?
+- unless Gitlab::CurrentSettings.current_application_settings.hide_third_party_offers? || !Gitlab.com?
.js-deployment-target-select
= f.label :visibility_level, class: 'label-bold' do
@@ -64,15 +68,14 @@
.form-text.text-muted
= s_('ProjectsNew|Allows you to immediately clone this project’s repository. Skip this if you plan to push up an existing repository.')
- - experiment(:new_project_sast_enabled, user: current_user) do |e|
- - e.variant(:candidate) do
- = render 'new_project_initialize_with_sast', experiment_name: e.name, track_label: track_label, checked: true, with_free_badge: false
- - e.variant(:unchecked_candidate) do
- = render 'new_project_initialize_with_sast', experiment_name: e.name, track_label: track_label, checked: false, with_free_badge: false
- - e.variant(:free_indicator) do
- = render 'new_project_initialize_with_sast', experiment_name: e.name, track_label: track_label, checked: true, with_free_badge: true
- - e.variant(:unchecked_free_indicator) do
- = render 'new_project_initialize_with_sast', experiment_name: e.name, track_label: track_label, checked: false, with_free_badge: true
+ .form-group
+ .form-check.gl-mb-3
+ = check_box_tag 'project[initialize_with_sast]', '1', false, class: 'form-check-input', data: { qa_selector: 'initialize_with_sast_checkbox', track_label: track_label, track_action: 'activate_form_input', track_property: 'init_with_sast' }
+ = label_tag 'project[initialize_with_sast]', class: 'form-check-label' do
+ = s_('ProjectsNew|Enable Static Application Security Testing (SAST)')
+ .form-text.text-muted
+ = s_('ProjectsNew|Analyze your source code for known security vulnerabilities.')
+ = link_to _('Learn more.'), help_page_path('user/application_security/sast/index'), target: '_blank', rel: 'noopener noreferrer', data: { track_action: 'followed' }
-= f.submit _('Create project'), class: "btn gl-button btn-confirm", data: { qa_selector: 'project_create_button', track_label: "#{track_label}", track_action: "click_button", track_property: "create_project", track_value: "" }
+= f.submit _('Create project'), class: "btn gl-button btn-confirm js-create-project-button", data: { qa_selector: 'project_create_button', track_label: "#{track_label}", track_action: "click_button", track_property: "create_project", track_value: "" }
= link_to _('Cancel'), dashboard_projects_path, class: 'btn gl-button btn-default btn-cancel', data: { track_label: "#{track_label}", track_action: "click_button", track_property: "cancel", track_value: "" }
diff --git a/app/views/projects/_new_project_initialize_with_sast.html.haml b/app/views/projects/_new_project_initialize_with_sast.html.haml
deleted file mode 100644
index ec12abbf789..00000000000
--- a/app/views/projects/_new_project_initialize_with_sast.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-- experiment_name = local_assigns.fetch(:experiment_name)
-- track_label = local_assigns.fetch(:track_label)
-
-- with_free_badge = local_assigns.fetch(:with_free_badge, false)
-- checked = local_assigns.fetch(:checked, false)
-
-.form-group
- .form-check.gl-mb-3
- = check_box_tag 'project[initialize_with_sast]', '1', checked, class: 'form-check-input', data: { qa_selector: 'initialize_with_sast_checkbox', track_experiment: experiment_name, track_label: track_label, track_action: 'activate_form_input', track_property: 'init_with_sast' }
- = label_tag 'project[initialize_with_sast]', class: 'form-check-label' do
- = s_('ProjectsNew|Enable Static Application Security Testing (SAST)')
- - if with_free_badge
- = gl_badge_tag _('Free'), variant: :info, size: :sm
- .form-text.text-muted
- = s_('ProjectsNew|Analyze your source code for known security vulnerabilities.')
- = link_to _('Learn more.'), help_page_path('user/application_security/sast/index'), target: '_blank', rel: 'noopener noreferrer', data: { track_action: 'followed', track_experiment: experiment_name }
diff --git a/app/views/projects/_transfer.html.haml b/app/views/projects/_transfer.html.haml
index 9f9daa7ec6f..9e6648c71fc 100644
--- a/app/views/projects/_transfer.html.haml
+++ b/app/views/projects/_transfer.html.haml
@@ -9,6 +9,11 @@
.form-group
- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'transferring-an-existing-project-into-another-namespace') }
%p= _("Transfer your project into another namespace. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
+ %p= _('When you transfer your project to a group, you can easily manage multiple projects, view usage quotas for storage, pipeline minutes, and users, and start a trial or upgrade to a paid tier.')
+ %p
+ = _("Don't have a group?")
+ = link_to _('Create one'), new_group_path, target: '_blank'
+ = _('Things to be aware of before transferring:')
%ul
%li= _("Be careful. Changing the project's namespace can have unintended side effects.")
%li= _('You can only transfer the project to namespaces you manage.')
diff --git a/app/views/projects/alert_management/details.html.haml b/app/views/projects/alert_management/details.html.haml
index b1d680e4f3d..66bbed8c5ec 100644
--- a/app/views/projects/alert_management/details.html.haml
+++ b/app/views/projects/alert_management/details.html.haml
@@ -2,4 +2,4 @@
- page_title s_('AlertManagement|Alert detail')
- add_page_specific_style 'page_bundles/alert_management_details'
-#js-alert_details{ data: alert_management_detail_data(@project, @alert_id) }
+#js-alert_details{ data: alert_management_detail_data(current_user, @project, @alert_id) }
diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml
index ae8f89bf16a..7f72438c3f9 100644
--- a/app/views/projects/blame/show.html.haml
+++ b/app/views/projects/blame/show.html.haml
@@ -22,7 +22,7 @@
.table-responsive.file-content.blame.code{ class: user_color_scheme }
%table
- - current_line = 1
+ - current_line = @blame.first_line
- @blame.groups.each do |blame_group|
- commit_data = @blame.commit_data(blame_group[:commit])
- line_count = blame_group[:lines].count
diff --git a/app/views/projects/blob/_upload.html.haml b/app/views/projects/blob/_upload.html.haml
index 1d3bec1ad44..629fa9c0e8a 100644
--- a/app/views/projects/blob/_upload.html.haml
+++ b/app/views/projects/blob/_upload.html.haml
@@ -15,7 +15,9 @@
#{ dropzone_text.html_safe }
%br
- .dropzone-alerts.gl-alert.gl-alert-danger.gl-mb-5.data{ style: "display:none" }
+ = render Pajamas::AlertComponent.new(variant: :danger,
+ alert_class: 'dropzone-alerts gl-alert gl-alert-danger gl-mb-5 data gl-display-none',
+ dismissible: false)
= render 'shared/new_commit_form', placeholder: placeholder, ref: local_assigns[:ref]
diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml
index 773137ff3f2..aefa4a41ab5 100644
--- a/app/views/projects/blob/edit.html.haml
+++ b/app/views/projects/blob/edit.html.haml
@@ -4,10 +4,9 @@
- webpack_preload_asset_tag('monaco')
- if @conflict
- = render 'shared/global_alert',
- alert_class: 'gl-mb-5 gl-mt-5',
+ = render Pajamas::AlertComponent.new(alert_class: 'gl-mb-5 gl-mt-5',
variant: :danger,
- dismissible: false do
+ dismissible: false) do
- blob_url = project_blob_path(@project, @id)
- external_link_icon = content_tag 'span', { aria: { label: _('Opens new window') }} do
- sprite_icon('external-link', css_class: 'gl-icon').html_safe
diff --git a/app/views/projects/blob/viewers/_balsamiq.html.haml b/app/views/projects/blob/viewers/_balsamiq.html.haml
deleted file mode 100644
index b20106e8c3a..00000000000
--- a/app/views/projects/blob/viewers/_balsamiq.html.haml
+++ /dev/null
@@ -1 +0,0 @@
-.file-content.balsamiq-viewer#js-balsamiq-viewer{ data: { endpoint: blob_raw_path } }
diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml
index f5e61c010cc..e4ec7a43d61 100644
--- a/app/views/projects/branches/_branch.html.haml
+++ b/app/views/projects/branches/_branch.html.haml
@@ -7,6 +7,7 @@
= sprite_icon('branch', size: 12, css_class: 'gl-flex-shrink-0')
= link_to project_tree_path(@project, branch.name), class: 'item-title str-truncated-100 ref-name gl-ml-3 qa-branch-name' do
= branch.name
+ = clipboard_button(text: branch.name, title: _("Copy branch name"))
- if branch.name == @repository.root_ref
= gl_badge_tag s_('DefaultBranchLabel|default'), { variant: :info, size: :sm }, { class: 'gl-ml-2' }
- elsif merged
diff --git a/app/views/projects/branches/_panel.html.haml b/app/views/projects/branches/_panel.html.haml
index f03b5cf2eff..bd6831ff3b2 100644
--- a/app/views/projects/branches/_panel.html.haml
+++ b/app/views/projects/branches/_panel.html.haml
@@ -7,7 +7,7 @@
- return unless branches.any?
-.card.gl-mt-3
+.card
.card-header
= panel_title
%ul.content-list.all-branches.qa-all-branches
diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml
index 96acd863a4c..85a0346e691 100644
--- a/app/views/projects/branches/index.html.haml
+++ b/app/views/projects/branches/index.html.haml
@@ -27,11 +27,6 @@
= render_if_exists 'projects/commits/mirror_status'
.js-branch-list{ data: { diverging_counts_endpoint: diverging_commit_counts_namespace_project_branches_path(@project.namespace, @project, format: :json), default_branch: @project.default_branch } }
-- if can?(current_user, :admin_project, @project)
- - project_settings_link = link_to s_('Branches|project settings'), project_protected_branches_path(@project)
- .row-content-block
- %h5
- = s_('Branches|Protected branches can be managed in %{project_settings_link}.').html_safe % { project_settings_link: project_settings_link }
- if @gitaly_unavailable
= render 'shared/errors/gitaly_unavailable', reason: s_('Branches|Unable to load branches')
diff --git a/app/views/projects/branches/new.html.haml b/app/views/projects/branches/new.html.haml
index 5cc83111b34..07bae7819a4 100644
--- a/app/views/projects/branches/new.html.haml
+++ b/app/views/projects/branches/new.html.haml
@@ -2,9 +2,7 @@
- default_ref = params[:ref] || @project.default_branch
- if @error
- = render 'shared/global_alert',
- variant: :danger,
- close_button_class: 'js-close' do
+ = render Pajamas::AlertComponent.new(variant: :danger) do
.gl-alert-body
= @error
%h3.page-title
diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml
index a3343aa4228..23572d1d6ac 100644
--- a/app/views/projects/commit/_commit_box.html.haml
+++ b/app/views/projects/commit/_commit_box.html.haml
@@ -47,9 +47,7 @@
- if can?(current_user, :read_pipeline, @last_pipeline)
.well-segment.pipeline-info
- .status-icon-container
- = link_to project_pipeline_path(@project, @last_pipeline.id), class: "ci-status-icon-#{@last_pipeline.status}" do
- = ci_icon_for_status(@last_pipeline.status)
+ .js-commit-pipeline-status{ data: { full_path: @project.full_path, iid: @last_pipeline.iid, graphql_resource_etag: graphql_etag_pipeline_path(@last_pipeline) } }
#{ _('Pipeline') }
= link_to "##{@last_pipeline.id}", project_pipeline_path(@project, @last_pipeline.id)
= ci_label_for_status(@last_pipeline.status)
@@ -57,7 +55,7 @@
#{ n_(s_('Pipeline|with stage'), s_('Pipeline|with stages'), @last_pipeline.stages_count) }
.mr-widget-pipeline-graph
.stage-cell
- .js-commit-pipeline-mini-graph{ data: { stages: @last_pipeline_stages.to_json.html_safe, full_path: @project.full_path, iid: @last_pipeline.iid } }
+ .js-commit-pipeline-mini-graph{ data: { stages: @last_pipeline_stages.to_json.html_safe, full_path: @project.full_path, iid: @last_pipeline.iid, graphql_resource_etag: graphql_etag_pipeline_path(@last_pipeline) } }
- if @last_pipeline.duration
in
= time_interval_in_words @last_pipeline.duration
diff --git a/app/views/projects/commit/show.html.haml b/app/views/projects/commit/show.html.haml
index e22d33e3c72..c26f24dd52c 100644
--- a/app/views/projects/commit/show.html.haml
+++ b/app/views/projects/commit/show.html.haml
@@ -16,6 +16,7 @@
diffs: @diffs,
environment: @environment,
diff_page_context: "is-commit",
+ page: pagination_params[:page],
paginate_diffs: true,
paginate_diffs_per_page: Projects::CommitController::COMMIT_DIFFS_PER_PAGE
diff --git a/app/views/projects/commits/_commits.html.haml b/app/views/projects/commits/_commits.html.haml
index 02b5fe00ad0..82d3bfbcfe6 100644
--- a/app/views/projects/commits/_commits.html.haml
+++ b/app/views/projects/commits/_commits.html.haml
@@ -35,9 +35,8 @@
- if hidden > 0
%li
- = render 'shared/global_alert',
- variant: :warning,
- dismissible: false do
+ = render Pajamas::AlertComponent.new(variant: :warning,
+ dismissible: false) do
.gl-alert-body
= n_('%s additional commit has been omitted to prevent performance issues.', '%s additional commits have been omitted to prevent performance issues.', hidden) % number_with_delimiter(hidden)
diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml
index 36641a8c508..e5be3a897a5 100644
--- a/app/views/projects/commits/show.html.haml
+++ b/app/views/projects/commits/show.html.haml
@@ -20,7 +20,7 @@
= link_to _("View open merge request"), project_merge_request_path(@project, @merge_request), class: 'btn gl-button'
- elsif create_mr_button?(from: @repository.root_ref, to: @ref, source_project: @project, target_project: @project)
.control.d-none.d-md-block
- = link_to _("Create merge request"), create_mr_path(from: @repository.root_ref, to: @ref, source_project: @project, target_project: @project), class: 'btn gl-button btn-success'
+ = link_to _("Create merge request"), create_mr_path(from: @repository.root_ref, to: @ref, source_project: @project, target_project: @project), class: 'btn gl-button btn-confirm'
.control
= form_tag(project_commits_path(@project, @id), method: :get, class: 'commits-search-form js-signature-container', data: { 'signatures-path' => namespace_project_signatures_path }) do
diff --git a/app/views/projects/compare/show.html.haml b/app/views/projects/compare/show.html.haml
index 1fc067b6be1..cb2c2d488e8 100644
--- a/app/views/projects/compare/show.html.haml
+++ b/app/views/projects/compare/show.html.haml
@@ -13,6 +13,7 @@
diffs: @diffs,
environment: @environment,
diff_page_context: "is-compare",
+ page: pagination_params[:page],
paginate_diffs: true,
paginate_diffs_per_page: Projects::CompareController::COMMIT_DIFFS_PER_PAGE
- else
diff --git a/app/views/projects/deploy_keys/edit.html.haml b/app/views/projects/deploy_keys/edit.html.haml
index f0214ade313..263b0025fe8 100644
--- a/app/views/projects/deploy_keys/edit.html.haml
+++ b/app/views/projects/deploy_keys/edit.html.haml
@@ -3,7 +3,7 @@
%hr
%div
- = form_for [@project, @deploy_key], include_id: false, html: { class: 'js-requires-input' } do |f|
+ = gitlab_ui_form_for [@project, @deploy_key], include_id: false, html: { class: 'js-requires-input' } do |f|
= render partial: 'shared/deploy_keys/form', locals: { form: f, deploy_key: @deploy_key }
.form-actions
= f.submit _('Save changes'), class: 'gl-button btn btn-confirm'
diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml
index bb2682bb7c0..6f4ffecd5e0 100644
--- a/app/views/projects/diffs/_diffs.html.haml
+++ b/app/views/projects/diffs/_diffs.html.haml
@@ -5,7 +5,8 @@
- load_diff_files_async = Feature.enabled?(:async_commit_diff_files, @project) && diff_page_context == "is-commit"
- paginate_diffs = local_assigns.fetch(:paginate_diffs, false) && !load_diff_files_async
- paginate_diffs_per_page = local_assigns.fetch(:paginate_diffs_per_page, nil)
-- diff_files = conditionally_paginate_diff_files(diffs, paginate: paginate_diffs, per: paginate_diffs_per_page)
+- page = local_assigns.fetch(:page, nil)
+- diff_files = conditionally_paginate_diff_files(diffs, paginate: paginate_diffs, page: page, per: paginate_diffs_per_page)
.content-block.oneline-block.files-changed.diff-files-changed.js-diff-files-changed
.files-changed-inner
@@ -24,10 +25,10 @@
.btn-group.gl-ml-3
= inline_diff_btn
= parallel_diff_btn
- = render 'projects/diffs/stats', diff_files: diff_files
+ = render Diffs::StatsComponent.new(diff_files: diff_files)
- if render_overflow_warning?(diffs)
- = render 'projects/diffs/warning', diff_files: diffs
+ = render Diffs::OverflowWarningComponent.new(diffs: diffs, diff_files: diff_files, project: @project, commit: @commit, merge_request: @merge_request)
.files{ data: { can_create_note: can_create_note } }
- if load_diff_files_async
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml
index 0638481d968..64bd1bf32f0 100644
--- a/app/views/projects/diffs/_file.html.haml
+++ b/app/views/projects/diffs/_file.html.haml
@@ -15,6 +15,7 @@
- unless diff_file.submodule?
.file-actions.gl-display-none.gl-sm-display-flex
+ #js-diff-stats{ data: diff_file_stats_data(diff_file) }
- if diff_file.blob&.readable_text?
%span.has-tooltip{ title: _("Toggle comments for this file") }
= link_to '#', class: 'js-toggle-diff-comments btn gl-button btn-default btn-icon selected', disabled: @diff_notes_disabled do
diff --git a/app/views/projects/diffs/_line.html.haml b/app/views/projects/diffs/_line.html.haml
index a5d3328b439..dd5114e3cec 100644
--- a/app/views/projects/diffs/_line.html.haml
+++ b/app/views/projects/diffs/_line.html.haml
@@ -10,6 +10,8 @@
- case line.type
- when 'match'
= diff_match_line line.old_pos, line.new_pos, text: line.text
+ - when 'old-nomappinginraw', 'new-nomappinginraw', 'unchanged-nomappinginraw'
+ = diff_nomappinginraw_line line, %w[old_line diff-line-num], %w[new_line diff-line-num], %w[line_content]
- when 'old-nonewline', 'new-nonewline'
%td.old_line.diff-line-num
%td.new_line.diff-line-num
diff --git a/app/views/projects/diffs/_parallel_view.html.haml b/app/views/projects/diffs/_parallel_view.html.haml
index ebe3aad064a..03fe3e6edf5 100644
--- a/app/views/projects/diffs/_parallel_view.html.haml
+++ b/app/views/projects/diffs/_parallel_view.html.haml
@@ -11,6 +11,8 @@
- case left.type
- when 'match'
= diff_match_line left.old_pos, nil, text: left.text, view: :parallel
+ - when 'old-nomappinginraw', 'new-nomappinginraw', 'unchanged-nomappinginraw'
+ = diff_nomappinginraw_line left, %w[old_line diff-line-num], nil, %w[line_content parallel left-side]
- when 'old-nonewline', 'new-nonewline'
%td.old_line.diff-line-num
%td.line_content.match.left-side= left.text
@@ -29,6 +31,8 @@
- case right.type
- when 'match'
= diff_match_line nil, right.new_pos, text: left.text, view: :parallel
+ - when 'old-nomappinginraw', 'new-nomappinginraw', 'unchanged-nomappinginraw'
+ = diff_nomappinginraw_line right, %w[new_line diff-line-num], nil, %w[line_content parallel right-side]
- when 'old-nonewline', 'new-nonewline'
%td.new_line.diff-line-num
%td.line_content.match.right-side= right.text
diff --git a/app/views/projects/diffs/_stats.html.haml b/app/views/projects/diffs/_stats.html.haml
deleted file mode 100644
index fe9658a440a..00000000000
--- a/app/views/projects/diffs/_stats.html.haml
+++ /dev/null
@@ -1 +0,0 @@
-.js-diff-stats-dropdown{ data: { changed: diff_files.size, added: diff_files.sum(&:added_lines), deleted: diff_files.sum(&:removed_lines), files: diff_files_data(diff_files) } }
diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml
index 6e7e0244721..2cd215c5518 100644
--- a/app/views/projects/diffs/_text_file.html.haml
+++ b/app/views/projects/diffs/_text_file.html.haml
@@ -12,6 +12,8 @@
- case line.type
- when 'match'
= diff_match_line line.old_pos, line.new_pos, text: line.text
+ - when 'old-nomappinginraw', 'new-nomappinginraw', 'unchanged-nomappinginraw'
+ = diff_nomappinginraw_line line, %w[old_line diff-line-num], %w[new_line diff-line-num], %w[line_content]
- when 'old-nonewline', 'new-nonewline'
%td.old_line.diff-line-num
%td.new_line.diff-line-num
diff --git a/app/views/projects/diffs/_warning.html.haml b/app/views/projects/diffs/_warning.html.haml
deleted file mode 100644
index 3d31773694f..00000000000
--- a/app/views/projects/diffs/_warning.html.haml
+++ /dev/null
@@ -1,13 +0,0 @@
-= render 'shared/global_alert',
- title: _('Too many changes to show.'),
- variant: :warning,
- alert_class: 'gl-mb-5' do
- .gl-alert-body
- = html_escape(_("To preserve performance only %{strong_open}%{display_size} of %{real_size}%{strong_close} files are displayed.")) % { display_size: diff_files.size, real_size: diff_files.real_size, strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
- .gl-alert-actions
- - if current_controller?(:commit)
- = link_to _("Plain diff"), project_commit_path(@project, @commit, format: :diff), class: "btn gl-alert-action btn-default gl-button btn-default-secondary"
- = link_to _("Email patch"), project_commit_path(@project, @commit, format: :patch), class: "btn gl-alert-action btn-default gl-button btn-default-secondary"
- - elsif current_controller?('projects/merge_requests/diffs') && @merge_request&.persisted?
- = link_to _("Plain diff"), merge_request_path(@merge_request, format: :diff), class: "btn gl-alert-action btn-default gl-button btn-default-secondary"
- = link_to _("Email patch"), merge_request_path(@merge_request, format: :patch), class: "btn gl-alert-action btn-default gl-button btn-default-secondary"
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index 1609d81c0fd..92dbde07709 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -5,6 +5,8 @@
- expanded = expanded_by_default?
- reduce_visibility_form_id = 'reduce-visibility-form'
+= render_if_exists 'shared/minute_limit_banner', namespace: @project
+
%section.settings.general-settings.no-animate.expanded#js-general-settings
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Naming, topics, avatar')
@@ -33,7 +35,7 @@
.settings-content
= render_if_exists 'shared/promotions/promote_mr_features'
- = form_for @project, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f|
+ = gitlab_ui_form_for @project, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f|
%input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-settings' }
= render 'projects/merge_request_settings', form: f
= f.submit _('Save changes'), class: "btn gl-button btn-confirm rspec-save-merge-request-changes", data: { qa_selector: 'save_merge_request_changes_button' }
@@ -98,7 +100,7 @@
.input-group-text
#{Gitlab::Utils.append_path(root_url, @project.namespace.full_path)}/
= f.text_field :path, class: 'form-control h-auto', data: { qa_selector: 'project_path_field' }
- = f.submit _('Change path'), class: "gl-button btn btn-warning", data: { qa_selector: 'change_path_button' }
+ = f.submit _('Change path'), class: "gl-button btn btn-danger", data: { qa_selector: 'change_path_button' }
= render 'transfer', project: @project
diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml
index 6a54eedf6c8..b2338fa6c55 100644
--- a/app/views/projects/empty.html.haml
+++ b/app/views/projects/empty.html.haml
@@ -3,6 +3,7 @@
- escaped_default_branch_name = default_branch_name.shellescape
- @skip_current_level_breadcrumb = true
+= render_if_exists 'shared/user_over_limit_free_plan_alert', source: @project
= render partial: 'flash_messages', locals: { project: @project }
= render "home_panel"
diff --git a/app/views/projects/forks/error.html.haml b/app/views/projects/forks/error.html.haml
index 7933e0e07b3..9b64f158a1b 100644
--- a/app/views/projects/forks/error.html.haml
+++ b/app/views/projects/forks/error.html.haml
@@ -1,10 +1,9 @@
- page_title _("Fork project")
- if @forked_project && !@forked_project.saved?
- = render 'shared/global_alert',
- title: _('Fork Error!'),
+ = render Pajamas::AlertComponent.new(title: _('Fork Error!'),
variant: :danger,
alert_class: 'gl-mt-5',
- dismissible: false do
+ dismissible: false) do
.gl-alert-body
%p
= _("You tried to fork %{link_to_the_project} but it failed for the following reason:").html_safe % { link_to_the_project: link_to_project(@project) }
diff --git a/app/views/projects/forks/index.html.haml b/app/views/projects/forks/index.html.haml
index 5330c3aa6d6..905c5779c7d 100644
--- a/app/views/projects/forks/index.html.haml
+++ b/app/views/projects/forks/index.html.haml
@@ -1,5 +1,7 @@
- sort_value = @sort || sort_value_recently_created
-- sort_title = forks_sort_options_hash[sort_value]
+- excluded_filters = [:state, :scope, :label_name, :milestone_id, :assignee_id, :author_id]
+- created_at = { value: sort_value_created_date, text: sort_title_created_date, href: page_filter_path(sort: sort_value_recently_created, without: excluded_filters) }
+- activity = { value: sort_value_latest_activity, text: sort_title_latest_activity, href: page_filter_path(sort: sort_value_latest_activity, without: excluded_filters) }
.top-area
.nav-text
@@ -14,14 +16,7 @@
.dropdown.gl-display-inline.gl-md-ml-3.issue-sort-dropdown.gl-mt-3.gl-md-mt-0
.btn-group{ role: 'group' }
.btn-group{ role: 'group' }
- %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown', display: 'static' }, class: 'gl-button btn btn-default' }
- = sort_title
- = sprite_icon('chevron-down', css_class: "dropdown-menu-toggle-icon gl-top-3")
- %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable.dropdown-menu-sort
- %li
- - excluded_filters = [:state, :scope, :label_name, :milestone_id, :assignee_id, :author_id]
- = sortable_item(sort_title_created_date, page_filter_path(sort: sort_value_recently_created, without: excluded_filters), sort_title)
- = sortable_item(sort_title_latest_activity, page_filter_path(sort: sort_value_latest_activity, without: excluded_filters), sort_title)
+ = gl_redirect_listbox_tag [created_at, activity], @sort
= forks_sort_direction_button(sort_value)
- if current_user && can?(current_user, :fork_project, @project)
diff --git a/app/views/projects/harbor/repositories/index.html.haml b/app/views/projects/harbor/repositories/index.html.haml
index b3f5b91596d..270cbf3facd 100644
--- a/app/views/projects/harbor/repositories/index.html.haml
+++ b/app/views/projects/harbor/repositories/index.html.haml
@@ -4,6 +4,8 @@
#js-harbor-registry-list-project{ data: { endpoint: project_harbor_registry_index_path(@project),
"no_containers_image" => image_path('illustrations/docker-empty-state.svg'),
"containers_error_image" => image_path('illustrations/docker-error-state.svg'),
- "help_page_path" => help_page_path('user/packages/container_registry/index'),
+ "repository_url" => 'demo.harbor.com/gitlab-cn/build/cng-images/gitlab-kas',
+ "registry_host_url_with_port" => 'demo.harbor.com',
connection_error: (!!@connection_error).to_s,
- invalid_path_error: (!!@invalid_path_error).to_s, } }
+ invalid_path_error: (!!@invalid_path_error).to_s,
+ is_group_page: false.to_s, } }
diff --git a/app/views/projects/hooks/edit.html.haml b/app/views/projects/hooks/edit.html.haml
index 4df109dbb61..74af65904cd 100644
--- a/app/views/projects/hooks/edit.html.haml
+++ b/app/views/projects/hooks/edit.html.haml
@@ -9,7 +9,7 @@
= render 'shared/web_hooks/title_and_docs', hook: @hook
.col-lg-9.gl-mb-3
- = form_for [@project, @hook], as: :hook, url: project_hook_path(@project, @hook) do |f|
+ = gitlab_ui_form_for [@project, @hook], as: :hook, url: project_hook_path(@project, @hook) do |f|
= render partial: 'shared/web_hooks/form', locals: { form: f, hook: @hook }
= f.submit _('Save changes'), class: 'btn gl-button btn-confirm gl-mr-3'
diff --git a/app/views/projects/hooks/index.html.haml b/app/views/projects/hooks/index.html.haml
index 5ca65d55eea..7d62a851aa1 100644
--- a/app/views/projects/hooks/index.html.haml
+++ b/app/views/projects/hooks/index.html.haml
@@ -7,7 +7,7 @@
= render 'shared/web_hooks/title_and_docs', hook: @hook
.col-lg-8.gl-mb-3
- = form_for @hook, as: :hook, url: polymorphic_path([@project, :hooks]) do |f|
+ = gitlab_ui_form_for @hook, as: :hook, url: polymorphic_path([@project, :hooks]) do |f|
= render partial: 'shared/web_hooks/form', locals: { form: f, hook: @hook }
= f.submit 'Add webhook', class: 'gl-button btn btn-confirm'
diff --git a/app/views/projects/imports/new.html.haml b/app/views/projects/imports/new.html.haml
index b021087c394..dc2bcfa33bb 100644
--- a/app/views/projects/imports/new.html.haml
+++ b/app/views/projects/imports/new.html.haml
@@ -12,7 +12,7 @@
:preserve
#{h(@project.import_state.last_error)}
-= form_for @project, url: project_import_path(@project), method: :post, html: { class: 'js-project-import' } do |f|
+= gitlab_ui_form_for @project, url: project_import_path(@project), method: :post, html: { class: 'js-project-import' } do |f|
= render "shared/import_form", f: f
.form-actions
diff --git a/app/views/projects/issues/_alert_moved_from_service_desk.html.haml b/app/views/projects/issues/_alert_moved_from_service_desk.html.haml
index 26bd65fbe26..f28b951ad62 100644
--- a/app/views/projects/issues/_alert_moved_from_service_desk.html.haml
+++ b/app/views/projects/issues/_alert_moved_from_service_desk.html.haml
@@ -2,9 +2,7 @@
- service_desk_link_url = help_page_path('user/project/service_desk')
- service_desk_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: service_desk_link_url }
-= render 'shared/global_alert',
- variant: :warning,
- close_button_class: 'js-close',
- alert_class: 'hide js-alert-moved-from-service-desk-warning gl-mt-5' do
+= render Pajamas::AlertComponent.new(variant: :warning,
+ alert_class: 'hide js-alert-moved-from-service-desk-warning gl-mt-5') do
.gl-alert-body.gl-mr-3
= s_('This project does not have %{service_desk_link_start}Service Desk%{service_desk_link_end} enabled, so the user who created the issue will no longer receive email notifications about new activity.').html_safe % { service_desk_link_start: service_desk_link_start, service_desk_link_end: '</a>'.html_safe }
diff --git a/app/views/projects/issues/_form.html.haml b/app/views/projects/issues/_form.html.haml
index 34e46807fb6..11741059ee5 100644
--- a/app/views/projects/issues/_form.html.haml
+++ b/app/views/projects/issues/_form.html.haml
@@ -1,3 +1,3 @@
-= form_for [@project, @issue],
- html: { class: 'issue-form common-note-form gl-mt-3 js-quick-submit gl-show-field-errors' } do |f|
+= gitlab_ui_form_for [@project, @issue],
+ html: { class: 'issue-form common-note-form gl-mt-3 js-quick-submit gl-show-field-errors', data: issues_form_data(@project) } do |f|
= render 'shared/issuable/form', f: f, issuable: @issue
diff --git a/app/views/projects/issues/_new_branch.html.haml b/app/views/projects/issues/_new_branch.html.haml
index f6ed6c26752..801841edc26 100644
--- a/app/views/projects/issues/_new_branch.html.haml
+++ b/app/views/projects/issues/_new_branch.html.haml
@@ -13,13 +13,13 @@
.create-mr-dropdown-wrap.d-inline-block.full-width-mobile.js-create-mr{ data: { project_path: @project.full_path, project_id: @project.id, can_create_path: can_create_path, create_mr_path: create_mr_path, create_branch_path: create_branch_path, refs_path: refs_path, is_confidential: can_create_confidential_merge_request?.to_s } }
.btn-group.unavailable
%button.gl-button.btn{ type: 'button', disabled: 'disabled' }
- .gl-spinner.align-text-bottom.gl-button-icon.hide
+ = gl_loading_icon(inline: true, css_class: 'js-create-mr-spinner gl-button-icon gl-display-none')
%span.text
Checking branch availability…
.btn-group.available.hidden
%button.gl-button.btn.js-create-merge-request.btn-confirm{ type: 'button', data: { action: data_action } }
- .gl-spinner.js-spinner.gl-mr-2.gl-display-none
+ = gl_loading_icon(css_class: 'js-create-mr-spinner js-spinner gl-mr-2 gl-display-none')
= value
%button.gl-button.btn.btn-confirm.btn-icon.dropdown-toggle.create-merge-request-dropdown-toggle.js-dropdown-toggle{ type: 'button', data: { dropdown: { trigger: '#create-merge-request-dropdown' }, display: 'static' } }
@@ -55,12 +55,12 @@
%label{ for: 'source-name' }
= _('Source (branch or tag)')
%input#source-name.js-ref.ref.form-control.gl-form-input{ type: 'text', placeholder: "#{@project.default_branch}", value: "#{@project.default_branch}", data: { value: "#{@project.default_branch}" } }
- %span.js-ref-message.form-text.text-muted
+ %span.js-ref-message.form-text
.form-group
%button.btn.gl-button.btn-confirm.js-create-target{ type: 'button', data: { action: 'create-mr' } }
= create_mr_text
- if can_create_confidential_merge_request?
- %p.text-warning.js-exposed-info-warning.hidden
+ %p.gl-text-orange-500.js-exposed-info-warning.gl-display-none
= _('This may expose confidential information as the selected fork is in another namespace that can have other members.')
diff --git a/app/views/projects/jobs/index.html.haml b/app/views/projects/jobs/index.html.haml
index c58c6ab8287..9a2a1e57165 100644
--- a/app/views/projects/jobs/index.html.haml
+++ b/app/views/projects/jobs/index.html.haml
@@ -1,9 +1,11 @@
+= render_if_exists 'shared/minute_limit_banner', namespace: @project
+
- page_title _("Jobs")
- add_page_specific_style 'page_bundles/ci_status'
- admin = local_assigns.fetch(:admin, false)
- if Feature.enabled?(:jobs_table_vue, @project, default_enabled: :yaml)
- #js-jobs-table{ data: { admin: admin, full_path: @project.full_path, job_counts: job_counts.to_json, job_statuses: job_statuses.to_json, pipeline_editor_path: project_ci_pipeline_editor_path(@project), empty_state_svg_path: image_path('jobs-empty-state.svg') } }
+ #js-jobs-table{ data: { admin: admin, full_path: @project.full_path, job_statuses: job_statuses.to_json, pipeline_editor_path: project_ci_pipeline_editor_path(@project), empty_state_svg_path: image_path('jobs-empty-state.svg') } }
- else
.top-area
- build_path_proc = ->(scope) { project_jobs_path(@project, scope: scope) }
diff --git a/app/views/projects/mattermosts/_no_teams.html.haml b/app/views/projects/mattermosts/_no_teams.html.haml
index 1efec0c017c..3d901c6f59b 100644
--- a/app/views/projects/mattermosts/_no_teams.html.haml
+++ b/app/views/projects/mattermosts/_no_teams.html.haml
@@ -1,8 +1,8 @@
- if @teams_error_message
= content_for :flash_message do
- .gl-alert.gl-alert-danger
- = sprite_icon('error', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
- .gl-alert-body= @teams_error_message
+ = render Pajamas::AlertComponent.new(variant: :danger) do
+ .gl-alert-body
+ = @teams_error_message
%p
You aren’t a member of any team on the Mattermost instance at
diff --git a/app/views/projects/merge_requests/_form.html.haml b/app/views/projects/merge_requests/_form.html.haml
index a68a4318538..5f1c72156eb 100644
--- a/app/views/projects/merge_requests/_form.html.haml
+++ b/app/views/projects/merge_requests/_form.html.haml
@@ -1,3 +1,3 @@
-= form_for [@project, @merge_request],
+= gitlab_ui_form_for [@project, @merge_request],
html: { class: 'merge-request-form common-note-form js-requires-input js-quick-submit' } do |f|
= render 'shared/issuable/form', f: f, issuable: @merge_request, presenter: @mr_presenter
diff --git a/app/views/projects/merge_requests/_mr_title.html.haml b/app/views/projects/merge_requests/_mr_title.html.haml
index d894aeaad65..49b7320d630 100644
--- a/app/views/projects/merge_requests/_mr_title.html.haml
+++ b/app/views/projects/merge_requests/_mr_title.html.haml
@@ -6,10 +6,9 @@
= cache(cache_key, expires_in: 1.day) do
- if @merge_request.closed_or_merged_without_fork?
- = render 'shared/global_alert',
- alert_class: 'gl-mb-5',
+ = render Pajamas::AlertComponent.new(alert_class: 'gl-mb-5',
variant: :danger,
- dismissible: false do
+ dismissible: false) do
.gl-alert-body
= _('The source project of this merge request has been removed.')
diff --git a/app/views/projects/merge_requests/creations/_new_submit.html.haml b/app/views/projects/merge_requests/creations/_new_submit.html.haml
index 253f50d5090..ef6e930bf23 100644
--- a/app/views/projects/merge_requests/creations/_new_submit.html.haml
+++ b/app/views/projects/merge_requests/creations/_new_submit.html.haml
@@ -1,6 +1,6 @@
%h3.page-title
= _('New merge request')
-= form_for [@project, @merge_request], html: { class: 'merge-request-form common-note-form js-requires-input js-quick-submit' } do |f|
+= gitlab_ui_form_for [@project, @merge_request], html: { class: 'merge-request-form common-note-form js-requires-input js-quick-submit' } do |f|
= render 'shared/issuable/form', f: f, issuable: @merge_request, commits: @commits, presenter: @mr_presenter
= f.hidden_field :source_project_id
= f.hidden_field :source_branch
diff --git a/app/views/projects/merge_requests/invalid.html.haml b/app/views/projects/merge_requests/invalid.html.haml
index aa68fe031bb..ce5a042fbf8 100644
--- a/app/views/projects/merge_requests/invalid.html.haml
+++ b/app/views/projects/merge_requests/invalid.html.haml
@@ -9,9 +9,8 @@
= render "projects/merge_requests/mr_title"
= render "projects/merge_requests/mr_box"
- = render 'shared/global_alert',
- variant: :danger,
- dismissible: false do
+ = render Pajamas::AlertComponent.new(variant: :danger,
+ dismissible: false) do
.gl-alert-body
- if @merge_request.for_fork? && !@merge_request.source_project
= err_fork_project_removed
diff --git a/app/views/projects/milestones/index.html.haml b/app/views/projects/milestones/index.html.haml
index 059ef53c42b..154a92e6ec8 100644
--- a/app/views/projects/milestones/index.html.haml
+++ b/app/views/projects/milestones/index.html.haml
@@ -1,24 +1,36 @@
- page_title _('Milestones')
- add_page_specific_style 'page_bundles/milestone'
-.top-area
- = render 'shared/milestones_filter', counts: milestone_counts(@project.milestones)
+- if @milestone_states.any? { |name, count| count > 0 }
+ .top-area
+ = render 'shared/milestones_filter', counts: @milestone_states
- .nav-controls
- = render 'shared/milestones/search_form'
- = render 'shared/milestones_sort_dropdown'
- - if can?(current_user, :admin_milestone, @project)
- = link_to new_project_milestone_path(@project), class: 'gl-button btn btn-confirm', data: { qa_selector: "new_project_milestone_link" }, title: _('New milestone') do
- = _('New milestone')
+ .nav-controls
+ = render 'shared/milestones/search_form'
+ = render 'shared/milestones_sort_dropdown'
+ - if can?(current_user, :admin_milestone, @project)
+ = link_to new_project_milestone_path(@project), class: 'gl-button btn btn-confirm', data: { qa_selector: "new_project_milestone_link" }, title: _('New milestone') do
+ = _('New milestone')
-- if @milestones.blank?
- = render 'shared/empty_states/milestones'
-- else
- .milestones
- #js-delete-milestone-modal
- #promote-milestone-modal
+ - if @milestones.blank?
+ = render 'shared/empty_states/milestones_tab' do
+ - if can?(current_user, :admin_milestone, @project)
+ .text-center
+ = link_to new_project_milestone_path(@project), class: 'gl-button btn btn-confirm', data: { qa_selector: "new_project_milestone_link" }, title: _('New milestone') do
+ = _('New milestone')
+
+ - else
+ .milestones
+ #js-delete-milestone-modal
+ #promote-milestone-modal
- %ul.content-list
- = render @milestones
+ %ul.content-list
+ = render @milestones
- = paginate @milestones, theme: 'gitlab'
+ = paginate @milestones, theme: 'gitlab'
+- else
+ = render 'shared/empty_states/milestones' do
+ - if can?(current_user, :admin_milestone, @project)
+ .text-center
+ = link_to new_project_milestone_path(@project), class: 'gl-button btn btn-confirm', data: { qa_selector: "new_project_milestone_link" }, title: _('New milestone') do
+ = _('New milestone')
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 225f8c7dd66..13aa8f56d20 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -12,11 +12,9 @@
= render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project
- if can?(current_user, :read_issue, @project) && @milestone.total_issues_count == 0
- = render 'shared/global_alert',
- variant: :info,
- dismissible: false,
+ = render Pajamas::AlertComponent.new(dismissible: false,
alert_data: { testid: 'no-issues-alert' },
- alert_class: 'gl-mt-3 gl-mb-5' do
+ alert_class: 'gl-mt-3 gl-mb-5') do
.gl-alert-body
= _('Assign some issues to this milestone.')
- else
diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml
index 3af95633214..bc8400a63f9 100644
--- a/app/views/projects/mirrors/_mirror_repos.html.haml
+++ b/app/views/projects/mirrors/_mirror_repos.html.haml
@@ -14,7 +14,7 @@
.settings-content
- if mirror_settings_enabled
- = form_for @project, url: project_mirror_path(@project), html: { class: 'gl-show-field-errors js-mirror-form', autocomplete: 'new-password', data: mirrors_form_data_attributes } do |f|
+ = gitlab_ui_form_for @project, url: project_mirror_path(@project), html: { class: 'gl-show-field-errors js-mirror-form', autocomplete: 'new-password', data: mirrors_form_data_attributes } do |f|
.panel.panel-default
.panel-body
%div= form_errors(@project)
@@ -37,9 +37,7 @@
.panel-footer
= f.submit _('Mirror repository'), class: 'gl-button btn btn-confirm js-mirror-submit qa-mirror-repository-button', name: :update_remote_mirror
- else
- = render 'shared/global_alert',
- dismissible: false,
- variant: :info do
+ = render Pajamas::AlertComponent.new(dismissible: false) do
.gl-alert-body
= _('Mirror settings are only available to GitLab administrators.')
diff --git a/app/views/projects/mirrors/_ssh_host_keys.html.haml b/app/views/projects/mirrors/_ssh_host_keys.html.haml
index 4411bc474b8..3abab0281a0 100644
--- a/app/views/projects/mirrors/_ssh_host_keys.html.haml
+++ b/app/views/projects/mirrors/_ssh_host_keys.html.haml
@@ -4,7 +4,7 @@
.form-group.js-ssh-host-keys-section{ class: ('collapse' unless mirror.ssh_mirror_url?) }
%button.btn.gl-button.btn-inverted.btn-secondary.inline.js-detect-host-keys.gl-mr-3{ type: 'button', data: { qa_selector: 'detect_host_keys' } }
- .js-spinner.d-none.gl-spinner.mr-1
+ = gl_loading_icon(inline: true, css_class: 'js-spinner gl-display-none gl-mr-2')
= _('Detect host keys')
.fingerprint-ssh-info.js-fingerprint-ssh-info.gl-mt-3.gl-mb-3{ class: ('collapse' unless mirror.ssh_mirror_url?) }
%label.label-bold
diff --git a/app/views/projects/no_repo.html.haml b/app/views/projects/no_repo.html.haml
index e3f46d601a3..1331ed24307 100644
--- a/app/views/projects/no_repo.html.haml
+++ b/app/views/projects/no_repo.html.haml
@@ -1,6 +1,8 @@
- page_title _('No repository')
- @skip_current_level_breadcrumb = true
+= render_if_exists 'shared/user_over_limit_free_plan_alert', source: @project
+
%h2.gl-display-flex
.gl-display-flex.gl-align-items-center.gl-justify-content-center
= sprite_icon('warning-solid', size: 24, css_class: 'gl-mr-2')
diff --git a/app/views/projects/pages/_pages_settings.html.haml b/app/views/projects/pages/_pages_settings.html.haml
index 15fb5755b61..0010564081e 100644
--- a/app/views/projects/pages/_pages_settings.html.haml
+++ b/app/views/projects/pages/_pages_settings.html.haml
@@ -2,21 +2,20 @@
- can_enforce_https_only=Gitlab.config.pages.external_http || Gitlab.config.pages.external_https
- return unless can_edit_max_page_size || can_enforce_https_only
-= form_for @project, url: project_pages_path(@project), html: { class: 'inline', title: pages_https_only_title } do |f|
+= gitlab_ui_form_for @project, url: project_pages_path(@project), html: { class: 'inline', title: pages_https_only_title } do |f|
- if can_edit_max_page_size
= render_if_exists 'shared/pages/max_pages_size_input', form: f
- if can_enforce_https_only
.form-group
- .form-check
- = f.check_box :pages_https_only, class: 'form-check-input', disabled: pages_https_only_disabled?
- = f.label :pages_https_only, class: pages_https_only_label_class do
- %strong
- = s_('GitLabPages|Force HTTPS (requires valid certificates)')
- - docs_link_start = "<a href='#{help_page_path('user/project/pages/custom_domains_ssl_tls_certification/index', anchor: 'force-https-for-gitlab-pages-websites')}' target='_blank' rel='noopener noreferrer'>".html_safe
- - link_end = '</a>'.html_safe
- %p
- = s_("GitLabPages|When enabled, all attempts to visit your website through HTTP are automatically redirected to HTTPS using a response with status code 301. Requires a valid certificate for all domains. %{docs_link_start}Learn more.%{link_end}").html_safe % { docs_link_start: docs_link_start, link_end: link_end }
+ = f.gitlab_ui_checkbox_component :pages_https_only,
+ s_('GitLabPages|Force HTTPS (requires valid certificates)'),
+ checkbox_options: { disabled: pages_https_only_disabled? },
+ label_options: { class: 'label-bold' }
+ - docs_link_start = "<a href='#{help_page_path('user/project/pages/custom_domains_ssl_tls_certification/index', anchor: 'force-https-for-gitlab-pages-websites')}' target='_blank' rel='noopener noreferrer'>".html_safe
+ - link_end = '</a>'.html_safe
+ %p.gl-pl-6
+ = s_("GitLabPages|When enabled, all attempts to visit your website through HTTP are automatically redirected to HTTPS using a response with status code 301. Requires a valid certificate for all domains. %{docs_link_start}Learn more.%{link_end}").html_safe % { docs_link_start: docs_link_start, link_end: link_end }
.gl-mt-3
= f.submit s_('GitLabPages|Save changes'), class: 'btn btn-confirm gl-button'
diff --git a/app/views/projects/pages_domains/_form.html.haml b/app/views/projects/pages_domains/_form.html.haml
index 453134ce5ab..d3e2854ff19 100644
--- a/app/views/projects/pages_domains/_form.html.haml
+++ b/app/views/projects/pages_domains/_form.html.haml
@@ -1,6 +1,5 @@
- if domain_presenter.errors.any?
- .gl-alert.gl-alert-danger
- = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
+ = render Pajamas::AlertComponent.new(variant: :danger, dismissible: false) do
- domain_presenter.errors.full_messages.each do |msg|
= msg
diff --git a/app/views/projects/pipeline_schedules/_form.html.haml b/app/views/projects/pipeline_schedules/_form.html.haml
index 0818c3d5cff..5ff0e2ccac3 100644
--- a/app/views/projects/pipeline_schedules/_form.html.haml
+++ b/app/views/projects/pipeline_schedules/_form.html.haml
@@ -1,4 +1,4 @@
-= form_for [@project, @schedule], as: :schedule, html: { id: "new-pipeline-schedule-form", class: "js-pipeline-schedule-form pipeline-schedule-form" } do |f|
+= gitlab_ui_form_for [@project, @schedule], as: :schedule, html: { id: "new-pipeline-schedule-form", class: "js-pipeline-schedule-form pipeline-schedule-form" } do |f|
= form_errors(@schedule)
.form-group.row
.col-md-9
@@ -15,7 +15,7 @@
= f.text_field :cron_timezone, value: @schedule.cron_timezone, id: 'schedule_cron_timezone', class: 'hidden', name: 'schedule[cron_timezone]', required: true
.form-group.row
.col-md-9
- = f.label :ref, Feature.enabled?(:pipeline_schedules_with_tags, default_enabled: :yaml) ? _('Target branch or tag') : _('Target branch'), class: 'label-bold'
+ = f.label :ref, _('Target branch or tag'), class: 'label-bold'
%div{ data: { testid: 'schedule-target-ref' } }
.js-target-ref-dropdown{ data: { project_id: @project.id, default_branch: @project.default_branch } }
= f.text_field :ref, value: @schedule.ref, id: 'schedule_ref', class: 'hidden', name: 'schedule[ref]', required: true
@@ -37,8 +37,7 @@
.col-md-9
= f.label :active, s_('PipelineSchedules|Activated'), class: 'label-bold'
%div
- = f.check_box :active, required: false, value: @schedule.active?
- = f.label :active, _('Active'), class: 'gl-font-weight-normal'
+ = f.gitlab_ui_checkbox_component :active, _('Active'), checkbox_options: { value: @schedule.active, required: false }
.footer-block.row-content-block
= f.submit _('Save pipeline schedule'), class: 'btn gl-button btn-confirm'
= link_to _('Cancel'), pipeline_schedules_path(@project), class: 'btn gl-button btn-default btn-cancel'
diff --git a/app/views/projects/pipeline_schedules/index.html.haml b/app/views/projects/pipeline_schedules/index.html.haml
index a56e8f7f5c7..10a49fbd779 100644
--- a/app/views/projects/pipeline_schedules/index.html.haml
+++ b/app/views/projects/pipeline_schedules/index.html.haml
@@ -1,3 +1,5 @@
+= render_if_exists 'shared/minute_limit_banner', namespace: @project
+
- breadcrumb_title _("Schedules")
- page_title _("Pipeline Schedules")
- add_page_specific_style 'page_bundles/pipeline_schedules'
diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml
index f4b242ffc40..817cc6d6e6c 100644
--- a/app/views/projects/pipelines/index.html.haml
+++ b/app/views/projects/pipelines/index.html.haml
@@ -1,3 +1,5 @@
+= render_if_exists 'shared/minute_limit_banner', namespace: @project
+
- page_title _('Pipelines')
- add_page_specific_style 'page_bundles/pipelines'
- add_page_specific_style 'page_bundles/ci_status'
diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml
index ba498352278..2b0a0fc1253 100644
--- a/app/views/projects/pipelines/show.html.haml
+++ b/app/views/projects/pipelines/show.html.haml
@@ -27,6 +27,8 @@
= s_('You can also test your %{gitlab_ci_yml} in %{lint_link_start}CI Lint%{lint_link_end}').html_safe % { gitlab_ci_yml: '.gitlab-ci.yml', lint_link_start: lint_link_start, lint_link_end: '</a>'.html_safe }
#js-pipeline-notification{ data: { deprecated_keywords_doc_path: help_page_path('ci/yaml/index.md', anchor: 'deprecated-keywords'), full_path: @project.full_path, pipeline_iid: @pipeline.iid } }
- = render "projects/pipelines/with_tabs", pipeline: @pipeline, stages: @stages, pipeline_has_errors: pipeline_has_errors
-
+ - if Feature.enabled?(:pipeline_tabs_vue, @project, default_enabled: :yaml)
+ #js-pipeline-tabs{ data: js_pipeline_tabs_data(@project, @pipeline) }
+ - else
+ = render "projects/pipelines/with_tabs", pipeline: @pipeline, stages: @stages, pipeline_has_errors: pipeline_has_errors
.js-pipeline-details-vue{ data: { metrics_path: namespace_project_ci_prometheus_metrics_histograms_path(namespace_id: @project.namespace, project_id: @project, format: :json), pipeline_project_path: @project.full_path, pipeline_iid: @pipeline.iid, graphql_resource_etag: graphql_etag_pipeline_path(@pipeline) } }
diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml
index f97b9a2b02f..298c2074062 100644
--- a/app/views/projects/project_members/index.html.haml
+++ b/app/views/projects/project_members/index.html.haml
@@ -1,6 +1,8 @@
- add_page_specific_style 'page_bundles/members'
- page_title _("Members")
+= render_if_exists 'shared/user_over_limit_free_plan_alert', source: @project
+
.row.gl-mt-3
.col-lg-12
- if can_invite_members_for_project?(@project)
diff --git a/app/views/projects/protected_branches/shared/_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_protected_branch.html.haml
index c9e964b2984..6dd3b2e8d5e 100644
--- a/app/views/projects/protected_branches/shared/_protected_branch.html.haml
+++ b/app/views/projects/protected_branches/shared/_protected_branch.html.haml
@@ -20,4 +20,4 @@
- if can_admin_project
%td
- = link_to s_('ProtectedBranch|Unprotect'), [@project, protected_branch, { update_section: 'js-protected-branches-settings' }], disabled: local_assigns[:disabled], aria: { label: s_('ProtectedBranch|Unprotect branch') }, data: { confirm: s_('ProtectedBranch|Branch will be writable for developers. Are you sure?'), confirm_btn_variant: 'danger' }, method: :delete, class: "btn gl-button btn-warning"
+ = link_to s_('ProtectedBranch|Unprotect'), [@project, protected_branch, { update_section: 'js-protected-branches-settings' }], disabled: local_assigns[:disabled], aria: { label: s_('ProtectedBranch|Unprotect branch') }, data: { confirm: s_('ProtectedBranch|Branch will be writable for developers. Are you sure?'), confirm_btn_variant: 'danger' }, method: :delete, class: "btn gl-button btn-danger btn-sm"
diff --git a/app/views/projects/registry/repositories/index.html.haml b/app/views/projects/registry/repositories/index.html.haml
index aab5e9fca98..51f0b6319a1 100644
--- a/app/views/projects/registry/repositories/index.html.haml
+++ b/app/views/projects/registry/repositories/index.html.haml
@@ -19,7 +19,7 @@
"project_path": @project.full_path,
"gid_prefix": container_repository_gid_prefix,
"is_admin": current_user&.admin.to_s,
- "show_cleanup_policy_on_alert": show_cleanup_policy_on_alert(@project).to_s,
+ "show_cleanup_policy_link": show_cleanup_policy_link(@project).to_s,
"cleanup_policies_settings_path": project_settings_packages_and_registries_path(@project),
connection_error: (!!@connection_error).to_s,
invalid_path_error: (!!@invalid_path_error).to_s,
diff --git a/app/views/projects/runners/_runner.html.haml b/app/views/projects/runners/_runner.html.haml
index 5eaf6c9d22b..18803bdd8f3 100644
--- a/app/views/projects/runners/_runner.html.haml
+++ b/app/views/projects/runners/_runner.html.haml
@@ -8,7 +8,7 @@
%span
= "##{runner.id} (#{runner.short_sha})"
- if runner.locked?
- %span.has-tooltip{ title: _('Locked to current projects') }
+ %span.has-tooltip{ title: s_('Runners|Runner is locked and available for currently assigned projects only. Only administrators can change the assigned projects.') }
= sprite_icon('lock')
.gl-ml-2
.btn-group.btn-group-sm
@@ -22,10 +22,10 @@
= link_to resume_project_runner_path(@project, runner), method: :post, class: 'btn gl-button btn-icon', title: s_('Runners|Resume accepting jobs'), aria: { label: _('Resume') }, data: { toggle: 'tooltip', container: 'body' } do
= sprite_icon('play')
- if runner.belongs_to_one_project?
- = link_to _('Remove runner'), project_runner_path(@project, runner), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn gl-button btn-danger'
+ = link_to _('Remove runner'), project_runner_path(@project, runner), aria: { label: _('Remove') }, data: { confirm: _("Are you sure?"), 'confirm-btn-variant': 'danger' }, method: :delete, class: 'btn gl-button btn-danger'
- else
- runner_project = @project.runner_projects.find_by(runner_id: runner) # rubocop: disable CodeReuse/ActiveRecord
- = link_to _('Disable for this project'), project_runner_project_path(@project, runner_project), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn gl-button btn-danger'
+ = link_to _('Disable for this project'), project_runner_project_path(@project, runner_project), aria: { label: _('Disable') }, data: { confirm: _("Are you sure?"), 'confirm-btn-variant': 'danger' }, method: :delete, class: 'btn gl-button btn-danger'
- elsif runner.project_type?
= form_for [@project, @project.runner_projects.new] do |f|
= f.hidden_field :runner_id, value: runner.id
diff --git a/app/views/projects/security/configuration/show.html.haml b/app/views/projects/security/configuration/show.html.haml
index df14bd09a4d..4b82f74d035 100644
--- a/app/views/projects/security/configuration/show.html.haml
+++ b/app/views/projects/security/configuration/show.html.haml
@@ -3,5 +3,6 @@
- @content_class = "limit-container-width" unless fluid_layout
#js-security-configuration{ data: { **@configuration.to_html_data_attribute,
+ vulnerability_training_docs_path: vulnerability_training_docs_path,
upgrade_path: security_upgrade_path,
project_full_path: @project.full_path } }
diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml
index 7a47b504b7c..d1d9a220068 100644
--- a/app/views/projects/services/_form.html.haml
+++ b/app/views/projects/services/_form.html.haml
@@ -5,14 +5,13 @@
-# When using integration.activate_disabled_reason[:trackers], it's potentially insecure to use the raw records
-# when passed directly to the frontend. Only use specific fields that are needed for render.
-# For example, we can get the link to each tracker with scoped_edit_integration_path(tracker, tracker.project)
- = render 'shared/global_alert',
- title: s_('ExternalIssueIntegration|Another issue tracker is already in use'),
+ = render Pajamas::AlertComponent.new(title: s_('ExternalIssueIntegration|Another issue tracker is already in use'),
variant: :warning,
- dismissible: false do
+ dismissible: false) do
.gl-alert-body
= s_('ExternalIssueIntegration|Only one issue tracker integration can be active at a time. Please disable the active tracker first and try again.')
-%h3.page-title
+%h2.gl-mb-4
= integration.title
- if integration.operating?
= sprite_icon('check', css_class: 'gl-text-green-500')
diff --git a/app/views/projects/services/prometheus/_help.html.haml b/app/views/projects/services/prometheus/_help.html.haml
index 9b3cb8893c4..f40d8638845 100644
--- a/app/views/projects/services/prometheus/_help.html.haml
+++ b/app/views/projects/services/prometheus/_help.html.haml
@@ -1,5 +1,6 @@
- if @project
- = render 'projects/services/prometheus/configuration_banner', project: @project, integration: integration
+ = render 'shared/prometheus_configuration_banner', project: @project, integration: integration, header_tag: :h4
+ %hr
%h4.gl-mb-3
= s_('PrometheusService|Manual configuration')
diff --git a/app/views/projects/services/prometheus/_top.html.haml b/app/views/projects/services/prometheus/_top.html.haml
index f7446273a80..52b29ea2e8f 100644
--- a/app/views/projects/services/prometheus/_top.html.haml
+++ b/app/views/projects/services/prometheus/_top.html.haml
@@ -2,8 +2,7 @@
.row
.col-lg-12
- .gl-alert.gl-alert-info{ role: 'alert' }
- = sprite_icon('information-o', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
+ = render Pajamas::AlertComponent.new(dismissible: false) do
.gl-alert-body
= s_('AlertSettings|You can now set up alert endpoints for manually configured Prometheus instances in the Alerts section on the Operations settings page. Alert endpoint fields on this page have been deprecated.')
.gl-alert-actions
diff --git a/app/views/projects/settings/_archive.html.haml b/app/views/projects/settings/_archive.html.haml
index 12cb1c3574a..1b0294bc967 100644
--- a/app/views/projects/settings/_archive.html.haml
+++ b/app/views/projects/settings/_archive.html.haml
@@ -18,5 +18,5 @@
%p= _("Archiving the project will make it entirely read-only. It is hidden from the dashboard and doesn't show up in searches. %{strong_start}The repository cannot be committed to, and no issues, comments, or other entities can be created.%{strong_end} %{link_start}Learn more.%{link_end}").html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe, link_start: link_start, link_end: '</a>'.html_safe }
= link_to _('Archive project'), archive_project_path(@project),
aria: { label: _('Archive project') },
- data: { confirm: _("Are you sure that you want to archive this project?"), qa_selector: 'archive_project_link', 'confirm-btn-variant': 'warning' },
- method: :post, class: "gl-button btn btn-warning"
+ data: { confirm: _("Are you sure that you want to archive this project?"), qa_selector: 'archive_project_link', 'confirm-btn-variant': 'confirm' },
+ method: :post, class: "gl-button btn btn-confirm"
diff --git a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml
index 43d34173af6..7783e83b88f 100644
--- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml
+++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml
@@ -11,22 +11,19 @@
.row
.col-lg-12
- = form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'autodevops-settings') do |f|
+ = gitlab_ui_form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'autodevops-settings') do |f|
= form_errors(@project)
%fieldset.builds-feature.js-auto-devops-settings
.form-group
= f.fields_for :auto_devops_attributes, @auto_devops do |form|
.card.auto-devops-card
.card-body
- .form-check
- = form.check_box :enabled, class: 'form-check-input js-toggle-extra-settings', checked: auto_devops_enabled, data: { qa_selector: 'enable_autodevops_checkbox' }
- = form.label :enabled, class: 'form-check-label' do
- %strong= s_('CICD|Default to Auto DevOps pipeline')
- - if auto_devops_enabled
- = gl_badge_tag badge_for_auto_devops_scope(@project), { variant: :info }, { class: 'js-instance-default-badge'}
- .form-text.text-muted
- = s_('CICD|The Auto DevOps pipeline runs if no alternative CI configuration file is found.')
- = link_to _('Learn more.'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer'
+ - autodevops_help_link = link_to _('Learn more.'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer'
+ - auto_devops_badge = auto_devops_enabled ? (gl_badge_tag badge_for_auto_devops_scope(@project), { variant: :info }, { class: 'js-instance-default-badge gl-ml-3 gl-mt-n1'}) : ''
+ = form.gitlab_ui_checkbox_component :enabled,
+ (s_('CICD|Default to Auto DevOps pipeline') + auto_devops_badge).html_safe,
+ checkbox_options: { class: 'js-toggle-extra-settings', checked: auto_devops_enabled, data: { qa_selector: 'enable_autodevops_checkbox' } },
+ help_text: (s_('CICD|The Auto DevOps pipeline runs if no alternative CI configuration file is found.') + ' ' + autodevops_help_link).html_safe
.card-footer.js-extra-settings{ class: auto_devops_enabled || 'hidden' }
- if @project.all_clusters.empty?
%p.settings-message.text-center
diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml
index 66a1cbb4649..5ef56cda6d2 100644
--- a/app/views/projects/settings/ci_cd/_form.html.haml
+++ b/app/views/projects/settings/ci_cd/_form.html.haml
@@ -1,35 +1,28 @@
+- help_link_public_pipelines = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'change-which-users-can-view-your-pipelines'), target: '_blank', rel: 'noopener noreferrer'
+- help_link_auto_canceling = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'auto-cancel-redundant-pipelines'), target: '_blank', rel: 'noopener noreferrer'
+- help_link_skip_outdated =link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'skip-outdated-deployment-jobs'), target: '_blank', rel: 'noopener noreferrer'
+
.row.gl-mt-3
.col-lg-12
- = form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings') do |f|
+ = gitlab_ui_form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings') do |f|
= form_errors(@project)
%fieldset.builds-feature
.form-group
- .form-check
- = f.check_box :public_builds, { class: 'form-check-input' }
- = f.label :public_builds, class: 'form-check-label' do
- %strong= _("Public pipelines")
- .form-text.text-muted
- = _("Allow public access to pipelines and job details, including output logs and artifacts.")
- = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'change-which-users-can-view-your-pipelines'), target: '_blank', rel: 'noopener noreferrer'
+ = f.gitlab_ui_checkbox_component :public_builds,
+ _("Public pipelines"),
+ help_text: (_('Allow public access to pipelines and job details, including output logs and artifacts.') + ' ' + help_link_public_pipelines).html_safe
.form-group
- .form-check
- = f.check_box :auto_cancel_pending_pipelines, { class: 'form-check-input' }, 'enabled', 'disabled'
- = f.label :auto_cancel_pending_pipelines, class: 'form-check-label' do
- %strong= _("Auto-cancel redundant pipelines")
- .form-text.text-muted
- = _("New pipelines cause older pending or running pipelines on the same branch to be cancelled.")
- = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'auto-cancel-redundant-pipelines'), target: '_blank', rel: 'noopener noreferrer'
+ = f.gitlab_ui_checkbox_component :auto_cancel_pending_pipelines,
+ _("Auto-cancel redundant pipelines"),
+ checked_value: 'enabled',
+ unchecked_value: 'disabled',
+ help_text: (_('New pipelines cause older pending or running pipelines on the same branch to be cancelled.') + ' ' + help_link_auto_canceling).html_safe
.form-group
- .form-check
- = f.fields_for :ci_cd_settings_attributes, @project.ci_cd_settings do |form|
- = form.check_box :forward_deployment_enabled, { class: 'form-check-input' }
- = form.label :forward_deployment_enabled, class: 'form-check-label' do
- %strong= _("Skip outdated deployment jobs")
- .form-text.text-muted
- = _("When a deployment job is successful, skip older deployment jobs that are still pending.")
- = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'skip-outdated-deployment-jobs'), target: '_blank', rel: 'noopener noreferrer'
+ = f.fields_for :ci_cd_settings_attributes, @project.ci_cd_settings do |form|
+ = form.gitlab_ui_checkbox_component :forward_deployment_enabled, _("Skip outdated deployment jobs"),
+ help_text: (_('When a deployment job is successful, skip older deployment jobs that are still pending.') + ' ' + help_link_skip_outdated).html_safe
.form-group
= f.label :ci_config_path, _('CI/CD configuration file'), class: 'label-bold'
diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml
index f342728feee..28cde994d00 100644
--- a/app/views/projects/settings/ci_cd/show.html.haml
+++ b/app/views/projects/settings/ci_cd/show.html.haml
@@ -1,3 +1,5 @@
+= render_if_exists 'shared/minute_limit_banner', namespace: @project
+
- @content_class = "limit-container-width" unless fluid_layout
- page_title _("CI/CD Settings")
- page_title _("CI/CD")
diff --git a/app/views/projects/settings/operations/_configuration_banner.html.haml b/app/views/projects/settings/operations/_configuration_banner.html.haml
deleted file mode 100644
index 9803ffc3c4e..00000000000
--- a/app/views/projects/settings/operations/_configuration_banner.html.haml
+++ /dev/null
@@ -1,24 +0,0 @@
-%b
- = s_('PrometheusService|Prometheus cluster integration')
-
-- if service.manual_configuration?
- .info-well.p-2.mt-2
- = s_('PrometheusService|To use a Prometheus installed on a cluster, deactivate the manual configuration.')
-- else
- .container-fluid
- .row
- - if service.prometheus_available?
- .col-sm-2
- .svg-container
- = image_tag 'illustrations/monitoring/getting_started.svg'
- .col-sm-10
- %p.text-success.gl-mt-3
- = s_('PrometheusService|You have a cluster with the Prometheus integration enabled.')
- = link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'gl-button btn btn-default'
- - else
- .col-sm-2
- = image_tag 'illustrations/monitoring/loading.svg'
- .col-sm-10
- %p.gl-mt-3
- = s_('PrometheusService|Configure GitLab to query a Prometheus installed in one of your clusters.')
- = link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn gl-button btn-confirm'
diff --git a/app/views/projects/settings/operations/_prometheus.html.haml b/app/views/projects/settings/operations/_prometheus.html.haml
index 1c7bcbbca0b..93281cc225b 100644
--- a/app/views/projects/settings/operations/_prometheus.html.haml
+++ b/app/views/projects/settings/operations/_prometheus.html.haml
@@ -9,7 +9,7 @@
= link_to _('More information'), help_page_path('user/project/integrations/prometheus'), target: '_blank', rel: 'noopener noreferrer'
.settings-content
- if @project
- = render 'projects/settings/operations/configuration_banner', project: @project, service: service
+ = render 'shared/prometheus_configuration_banner', project: @project, integration: service, header_tag: :b, info_well_classes: 'gl-p-3 gl-mt-3'
%b.gl-mb-3
= s_('PrometheusService|Manual configuration')
diff --git a/app/views/projects/settings/operations/show.html.haml b/app/views/projects/settings/operations/show.html.haml
index 4e94c96fdde..9a31666c316 100644
--- a/app/views/projects/settings/operations/show.html.haml
+++ b/app/views/projects/settings/operations/show.html.haml
@@ -15,7 +15,7 @@
= s_('Deprecations|Feature deprecation and removal')
.gl-alert-body
%p
- = html_escape(s_('Deprecations|The metrics, logs and tracing features were deprecated in GitLab 14.7, and are %{removal_link_start} scheduled for removal %{link_end} in GitLab 15.0. For information on a possible replacement, %{opstrace_link_start} learn more about Opstrace %{link_end}.')) % {removal_link_start: removal_epic_link_start, opstrace_link_start: opstrace_link_start, link_end: link_end }
+ = html_escape(s_('Deprecations|The metrics feature was deprecated in GitLab 14.7. The logs and tracing features were also deprecated in GitLab 14.7, and are %{removal_link_start} scheduled for removal %{link_end} in GitLab 15.0. For information on a possible replacement, %{opstrace_link_start} learn more about Opstrace %{link_end}.')) % {removal_link_start: removal_epic_link_start, opstrace_link_start: opstrace_link_start, link_end: link_end }
= render 'projects/settings/operations/metrics_dashboard'
= render 'projects/settings/operations/tracing'
diff --git a/app/views/projects/settings/packages_and_registries/show.html.haml b/app/views/projects/settings/packages_and_registries/show.html.haml
index 658b2f2e65c..378bb0f9306 100644
--- a/app/views/projects/settings/packages_and_registries/show.html.haml
+++ b/app/views/projects/settings/packages_and_registries/show.html.haml
@@ -11,5 +11,5 @@
admin_settings_path: ci_cd_admin_application_settings_path(anchor: 'js-registry-settings'),
enable_historic_entries: container_expiration_policies_historic_entry_enabled?.to_s,
help_page_path: help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'cleanup-policy'),
- show_cleanup_policy_on_alert: show_cleanup_policy_on_alert(@project).to_s,
+ show_cleanup_policy_link: show_cleanup_policy_link(@project).to_s,
tags_regex_help_page_path: help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'regex-pattern-examples') } }
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index d840ea01b89..1934f293b0f 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -6,6 +6,8 @@
= content_for :meta_tags do
= auto_discovery_link_tag(:atom, project_path(@project, rss_url_options), title: "#{@project.name} activity")
+= render_if_exists 'shared/user_over_limit_free_plan_alert', source: @project
+= render_if_exists 'shared/minute_limit_banner', namespace: @project
= render partial: 'flash_messages', locals: { project: @project }
= render "projects/last_push"
diff --git a/app/views/projects/tags/index.html.haml b/app/views/projects/tags/index.html.haml
index 4a44ad2337f..a654d0a8863 100644
--- a/app/views/projects/tags/index.html.haml
+++ b/app/views/projects/tags/index.html.haml
@@ -29,9 +29,12 @@
- else
.nothing-here-block
- = s_('TagsPage|Repository has no tags yet.')
- %br
- %small
- = s_('TagsPage|Use git tag command to add a new one:')
+ - if @search.present?
+ = s_('TagsPage|Sorry, your filter produced no results.')
+ - else
+ = s_('TagsPage|Repository has no tags yet.')
%br
- %span.monospace git tag -a v1.4 -m 'version 1.4'
+ %small
+ = s_('TagsPage|Use git tag command to add a new one:')
+ %br
+ %span.monospace git tag -a v1.4 -m 'version 1.4'
diff --git a/app/views/projects/tracings/show.html.haml b/app/views/projects/tracings/show.html.haml
index a7a02ab917e..c9aac68b19d 100644
--- a/app/views/projects/tracings/show.html.haml
+++ b/app/views/projects/tracings/show.html.haml
@@ -14,7 +14,7 @@
= s_('Deprecations|Feature deprecation and removal')
.gl-alert-body
%p
- = html_escape(s_('Deprecations|The metrics, logs and tracing features were deprecated in GitLab 14.7, and are %{removal_link_start} scheduled for removal %{link_end} in GitLab 15.0. For information on a possible replacement, %{opstrace_link_start} learn more about Opstrace %{link_end}.')) % {removal_link_start: removal_epic_link_start, opstrace_link_start: opstrace_link_start, link_end: link_end }
+ = html_escape(s_('Deprecations|The logs and tracing features were deprecated in GitLab 14.7, and are %{removal_link_start} scheduled for removal %{link_end} in GitLab 15.0. For information on a possible replacement, %{opstrace_link_start} learn more about Opstrace %{link_end}.')) % {removal_link_start: removal_epic_link_start, opstrace_link_start: opstrace_link_start, link_end: link_end }
- if @project.tracing_external_url.present?
%h3.page-title= _('Tracing')
diff --git a/app/views/registrations/welcome/show.html.haml b/app/views/registrations/welcome/show.html.haml
index 44dffdbf70a..6235cce5d80 100644
--- a/app/views/registrations/welcome/show.html.haml
+++ b/app/views/registrations/welcome/show.html.haml
@@ -17,7 +17,7 @@
%p.gl-text-center= html_escape(_('%{gitlab_experience_text}. We won\'t share this information with anyone.')) % { gitlab_experience_text: gitlab_experience_text }
- else
%p.gl-text-center= html_escape(_('%{gitlab_experience_text}. Don\'t worry, this information isn\'t shared outside of your self-managed GitLab instance.')) % { gitlab_experience_text: gitlab_experience_text }
- = form_for(current_user, url: users_sign_up_welcome_path, html: { class: 'card gl-w-full! gl-p-5', 'aria-live' => 'assertive' }) do |f|
+ = gitlab_ui_form_for(current_user, url: users_sign_up_welcome_path, html: { class: 'card gl-w-full! gl-p-5', 'aria-live' => 'assertive' }) do |f|
.devise-errors
= render 'devise/shared/error_messages', resource: current_user
.row
diff --git a/app/views/search/results/_blob_highlight.html.haml b/app/views/search/results/_blob_highlight.html.haml
index 729eda331b5..7ba114496af 100644
--- a/app/views/search/results/_blob_highlight.html.haml
+++ b/app/views/search/results/_blob_highlight.html.haml
@@ -6,7 +6,7 @@
.blob-content{ data: { blob_id: blob.id, path: blob.path, highlight_line: highlight, qa_selector: 'file_content' } }
- blob.present.highlight.lines.each_with_index do |line, index|
- i = index + offset
- .line_holder.code-search-line
+ .line_holder.code-search-line.gl-display-flex
.line-numbers
.gl-display-flex
%span.diff-line-num.gl-pl-3
@@ -22,7 +22,7 @@
%a{ href: "#{blob_link}#L#{i}", id: "blob-L#{i}", 'data-line-number' => i, class: 'gl-display-flex! gl-align-items-center gl-justify-content-end' }
= sprite_icon('link', css_class: 'gl-ml-3! gl-mr-1!')
= i
- %pre.code.highlight
+ %pre.code.highlight.flex-grow-1
%code
= line.html_safe
diff --git a/app/views/shared/_allow_request_access.html.haml b/app/views/shared/_allow_request_access.html.haml
index ca09fd39dc1..608a0ca37d9 100644
--- a/app/views/shared/_allow_request_access.html.haml
+++ b/app/views/shared/_allow_request_access.html.haml
@@ -1,6 +1,3 @@
-- label_class = local_assigns.fetch(:bold_label, false) ? 'font-weight-bold' : ''
-
= form.gitlab_ui_checkbox_component :request_access_enabled,
_('Allow users to request access (if visibility is public or internal)'),
- label_options: { class: label_class },
checkbox_options: { data: { qa_selector: 'request_access_checkbox' } }
diff --git a/app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml b/app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml
index 35a3835a522..fdd4dfba616 100644
--- a/app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml
+++ b/app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml
@@ -1,9 +1,7 @@
- if show_auto_devops_implicitly_enabled_banner?(project, current_user)
- = render 'shared/global_alert',
- variant: :info,
- alert_class: 'qa-auto-devops-banner auto-devops-implicitly-enabled-banner',
+ = render Pajamas::AlertComponent.new(alert_class: 'qa-auto-devops-banner auto-devops-implicitly-enabled-banner',
close_button_class: 'hide-auto-devops-implicitly-enabled-banner',
- close_button_data: { project_id: project.id } do
+ close_button_data: { project_id: project.id }) do
.gl-alert-body
= s_("AutoDevOps|The Auto DevOps pipeline has been enabled and will be used if no alternative CI configuration file is found.")
- unless Gitlab.config.registry.enabled
diff --git a/app/views/shared/_broadcast_message.html.haml b/app/views/shared/_broadcast_message.html.haml
index 7aaae3a88f3..ab6423e9ade 100644
--- a/app/views/shared/_broadcast_message.html.haml
+++ b/app/views/shared/_broadcast_message.html.haml
@@ -1,12 +1,29 @@
-- is_banner = message.broadcast_type == 'banner'
+- icon_name = 'bullhorn'
+- dismissable = message.dismissable?
+- preview = local_assigns.fetch(:preview, false)
-%div{ class: "broadcast-message #{'alert-warning' if is_banner} broadcast-#{message.broadcast_type}-message #{opts[:preview] && 'preview'} js-broadcast-notification-#{message.id} gl-display-flex",
- style: broadcast_message_style(message), dir: 'auto' }
- .gl-flex-grow-1.gl-text-right.gl-pr-3
- = sprite_icon('bullhorn', css_class: 'vertical-align-text-top')
- %div{ class: !fluid_layout && 'container-limited' }
- = render_broadcast_message(message)
- .gl-flex-grow-1.gl-flex-basis-0.gl-text-right
- - if (message.notification? || message.dismissable?) && opts[:preview].blank?
+- unless message.notification?
+ .gl-broadcast-message.broadcast-banner-message{ role: "alert", class: "js-broadcast-notification-#{message.id} #{message.theme}" }
+ .gl-broadcast-message-content
+ .gl-broadcast-message-icon
+ = sprite_icon(icon_name)
+ .gl-broadcast-message-text.js-broadcast-message-preview
+ - if message.message.present?
+ = render_broadcast_message(message)
+ - else
+ = yield
+ - if dismissable && !preview
+ %button.btn.gl-close-btn-color-inherit.gl-broadcast-message-dismiss.btn-default.btn-sm.gl-button.btn-default-tertiary.btn-icon.js-dismiss-current-broadcast-notification{ 'aria-label' => _('Close'), :type => 'button', data: { id: message.id, expire_date: message.ends_at.iso8601 } }
+ = sprite_icon('close', size: 16, css_class: "gl-icon gl-mx-3! gl-text-white")
+- else
+ - notification_class = "js-broadcast-notification-#{message.id}"
+ - notification_class << ' preview' if preview
+ .broadcast-message.broadcast-notification-message.mt-2{ role: "alert", class: notification_class }
+ = sprite_icon(icon_name, css_class: 'vertical-align-text-top')
+ - if message.message.present?
+ = render_broadcast_message(message)
+ - else
+ = yield
+ - if !preview
%button.js-dismiss-current-broadcast-notification.btn.btn-link.gl-button{ 'aria-label' => _('Close'), :type => 'button', data: { id: message.id, expire_date: message.ends_at.iso8601 } }
- = sprite_icon('close', size: 16, css_class: "gl-icon gl-mx-3! #{is_banner ? 'gl-text-white' : 'gl-text-gray-700'}")
+ = sprite_icon('close', size: 16, css_class: "gl-icon gl-mx-3! gl-text-gray-700")
diff --git a/app/views/shared/_global_alert.html.haml b/app/views/shared/_global_alert.html.haml
deleted file mode 100644
index cb7ad32e474..00000000000
--- a/app/views/shared/_global_alert.html.haml
+++ /dev/null
@@ -1,21 +0,0 @@
-- icons = { info: 'information-o', warning: 'warning', success: 'check-circle', danger: 'error', tip: 'bulb' }
-
-- title = local_assigns.fetch(:title, nil)
-- variant = local_assigns.fetch(:variant, :info)
-- dismissible = local_assigns.fetch(:dismissible, true)
-- alert_class = local_assigns.fetch(:alert_class, nil)
-- alert_data = local_assigns.fetch(:alert_data, nil)
-- close_button_class = local_assigns.fetch(:close_button_class, nil)
-- close_button_data = local_assigns.fetch(:close_button_data, nil)
-- icon = icons[variant]
-
-%div{ role: 'alert', class: ['gl-alert', "gl-alert-#{variant}", alert_class], data: alert_data }
- = sprite_icon(icon, css_class: "gl-alert-icon#{' gl-alert-icon-no-title' if title.nil?}")
- - if dismissible
- %button.btn.gl-dismiss-btn.btn-default.btn-sm.gl-button.btn-default-tertiary.btn-icon.js-close{ type: 'button', aria: { label: _('Dismiss') }, class: close_button_class, data: close_button_data }
- = sprite_icon('close')
- .gl-alert-content{ role: 'alert' }
- - if title
- %h4.gl-alert-title
- = title
- = yield
diff --git a/app/views/shared/_import_form.html.haml b/app/views/shared/_import_form.html.haml
index 3ab2b969b75..850d58920db 100644
--- a/app/views/shared/_import_form.html.haml
+++ b/app/views/shared/_import_form.html.haml
@@ -8,11 +8,10 @@
= _('Git repository URL')
= f.text_field :import_url, value: import_url.sanitized_url,
autocomplete: 'off', class: 'form-control gl-form-input', placeholder: 'https://gitlab.company.com/group/project.git', required: true
- = render 'shared/global_alert',
- variant: :danger,
+ = render Pajamas::AlertComponent.new(variant: :danger,
alert_class: 'gl-mt-3 js-import-url-error hide',
dismissible: false,
- close_button_class: 'js-close-2fa-enabled-success-alert' do
+ close_button_class: 'js-close-2fa-enabled-success-alert') do
.gl-alert-body
= s_('Import|There is not a valid Git repository at this URL. If your HTTP repository is not publicly accessible, verify your credentials.')
.row
diff --git a/app/views/shared/_milestones_sort_dropdown.html.haml b/app/views/shared/_milestones_sort_dropdown.html.haml
index 29c01343358..1c6eb7aa96b 100644
--- a/app/views/shared/_milestones_sort_dropdown.html.haml
+++ b/app/views/shared/_milestones_sort_dropdown.html.haml
@@ -1,22 +1,4 @@
-.dropdown.inline.gl-ml-3
- %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
- %span.light
- - if @sort.present?
- = milestone_sort_options_hash[@sort]
- - else
- = sort_title_due_date_soon
- = sprite_icon('chevron-down', css_class: 'dropdown-menu-toggle-icon gl-top-3')
- %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-sort
- %li
- = link_to page_filter_path(sort: sort_value_due_date_soon) do
- = sort_title_due_date_soon
- = link_to page_filter_path(sort: sort_value_due_date_later) do
- = sort_title_due_date_later
- = link_to page_filter_path(sort: sort_value_start_date_soon) do
- = sort_title_start_date_soon
- = link_to page_filter_path(sort: sort_value_start_date_later) do
- = sort_title_start_date_later
- = link_to page_filter_path(sort: sort_value_name) do
- = sort_title_name_asc
- = link_to page_filter_path(sort: sort_value_name_desc) do
- = sort_title_name_desc
+- milestones_sort_options = milestones_sort_options_hash.map { |value, text| { value: value, text: text, href: page_filter_path(sort: value) } }
+
+%div{ data: {testid: 'milestone_sort_by_dropdown'} }
+ = gl_redirect_listbox_tag milestones_sort_options, @sort, class: 'gl-ml-3'
diff --git a/app/views/shared/_no_password.html.haml b/app/views/shared/_no_password.html.haml
index d1e1a8a819d..195bd15f840 100644
--- a/app/views/shared/_no_password.html.haml
+++ b/app/views/shared/_no_password.html.haml
@@ -1,8 +1,7 @@
- if show_no_password_message?
- = render 'shared/global_alert',
- variant: :warning,
+ = render Pajamas::AlertComponent.new(variant: :warning,
alert_class: 'js-no-password-message',
- close_button_class: 'js-hide-no-password-message' do
+ close_button_class: 'js-hide-no-password-message') do
.gl-alert-body
= no_password_message
.gl-alert-actions
diff --git a/app/views/shared/_no_ssh.html.haml b/app/views/shared/_no_ssh.html.haml
index 20dc1b41970..d30679b4305 100644
--- a/app/views/shared/_no_ssh.html.haml
+++ b/app/views/shared/_no_ssh.html.haml
@@ -1,8 +1,7 @@
- if show_no_ssh_key_message?
- = render 'shared/global_alert',
- variant: :warning,
+ = render Pajamas::AlertComponent.new(variant: :warning,
alert_class: 'js-no-ssh-message',
- close_button_class: 'js-hide-no-ssh-message' do
+ close_button_class: 'js-hide-no-ssh-message') do
.gl-alert-body
= s_("MissingSSHKeyWarningLink|You can't push or pull repositories using SSH until you add an SSH key to your profile.")
.gl-alert-actions
diff --git a/app/views/shared/_outdated_browser.html.haml b/app/views/shared/_outdated_browser.html.haml
index f5a32050a79..76fb34985c0 100644
--- a/app/views/shared/_outdated_browser.html.haml
+++ b/app/views/shared/_outdated_browser.html.haml
@@ -1,6 +1,5 @@
- if outdated_browser?
- .gl-alert.gl-alert-danger.outdated-browser{ :role => "alert" }
- = sprite_icon('error', css_class: "gl-alert-icon gl-alert-icon-no-title gl-icon")
+ = render Pajamas::AlertComponent.new(variant: :danger, dismissible: false) do
.gl-alert-body
= s_('OutdatedBrowser|GitLab may not work properly, because you are using an outdated web browser.')
%br
diff --git a/app/views/shared/_project_limit.html.haml b/app/views/shared/_project_limit.html.haml
index 90612ba623f..7e1874f3416 100644
--- a/app/views/shared/_project_limit.html.haml
+++ b/app/views/shared/_project_limit.html.haml
@@ -1,8 +1,7 @@
- if cookies[:hide_project_limit_message].blank? && !current_user.hide_project_limit && !current_user.can_create_project? && current_user.projects_limit > 0
- = render 'shared/global_alert',
- variant: :warning,
+ = render Pajamas::AlertComponent.new(variant: :warning,
dismissible: false,
- alert_class: 'project-limit-message' do
+ alert_class: 'project-limit-message') do
.gl-alert-body
= _("You won't be able to create new projects because you have reached your project limit.")
.gl-alert-actions
diff --git a/app/views/projects/services/prometheus/_configuration_banner.html.haml b/app/views/shared/_prometheus_configuration_banner.html.haml
index a34aa22acbb..2d948cf28a6 100644
--- a/app/views/projects/services/prometheus/_configuration_banner.html.haml
+++ b/app/views/shared/_prometheus_configuration_banner.html.haml
@@ -1,8 +1,11 @@
-%h4
- = s_('PrometheusService|Prometheus cluster integration')
+- header_tag = local_assigns.fetch(:header_tag)
+- info_well_classes = local_assigns.fetch(:info_well_classes, '')
+- integration = local_assigns.fetch(:integration)
+
+= content_tag(header_tag, s_('PrometheusService|Prometheus cluster integration'))
- if integration.manual_configuration?
- .info-well
+ .info-well{ class: info_well_classes }
= s_('PrometheusService|To use a Prometheus installed on a cluster, deactivate the manual configuration.')
- else
.container-fluid
@@ -14,7 +17,7 @@
.col-sm-10
%p.text-success.gl-mt-3
= s_('PrometheusService|You have a cluster with the Prometheus integration enabled.')
- = link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn gl-button'
+ = link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn gl-button btn-default'
- else
.col-sm-2
= image_tag 'illustrations/monitoring/loading.svg'
@@ -22,5 +25,3 @@
%p.gl-mt-3
= s_('PrometheusService|Configure GitLab to query a Prometheus installed in one of your clusters.')
= link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn gl-button btn-confirm'
-
-%hr
diff --git a/app/views/shared/_service_ping_consent.html.haml b/app/views/shared/_service_ping_consent.html.haml
index 9cdff35ead2..96f015c7a4b 100644
--- a/app/views/shared/_service_ping_consent.html.haml
+++ b/app/views/shared/_service_ping_consent.html.haml
@@ -1,7 +1,5 @@
- if session[:ask_for_usage_stats_consent]
- = render 'shared/global_alert',
- variant: :info,
- alert_class: 'service-ping-consent-message' do
+ = render Pajamas::AlertComponent.new(alert_class: 'service-ping-consent-message') do
.gl-alert-body
- docs_link = link_to _('collect usage information'), help_page_path('user/admin_area/settings/usage_statistics.md'), class: 'gl-link'
- settings_link = link_to _('your settings'), metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), class: 'gl-link'
diff --git a/app/views/shared/_two_factor_auth_recovery_settings_check.html.haml b/app/views/shared/_two_factor_auth_recovery_settings_check.html.haml
index f21acd26ada..2294c44d49f 100644
--- a/app/views/shared/_two_factor_auth_recovery_settings_check.html.haml
+++ b/app/views/shared/_two_factor_auth_recovery_settings_check.html.haml
@@ -1,8 +1,9 @@
-= render 'shared/global_alert',
- variant: :warning,
+= render Pajamas::AlertComponent.new(variant: :warning,
alert_class: 'js-recovery-settings-callout gl-mt-5',
- alert_data: { feature_id: Users::CalloutsHelper::TWO_FACTOR_AUTH_RECOVERY_SETTINGS_CHECK, dismiss_endpoint: callouts_path, defer_links: 'true' },
- close_button_data: { testid: 'close-account-recovery-regular-check-callout' } do
+ alert_data: { feature_id: Users::CalloutsHelper::TWO_FACTOR_AUTH_RECOVERY_SETTINGS_CHECK,
+ dismiss_endpoint: callouts_path,
+ defer_links: 'true' },
+ close_button_data: { testid: 'close-account-recovery-regular-check-callout' }) do
.gl-alert-body
= s_('Profiles|Ensure you have two-factor authentication recovery codes stored in a safe place.')
= link_to _('Learn more.'), help_page_path('user/profile/account/two_factor_authentication', anchor: 'recovery-codes'), target: '_blank', rel: 'noopener noreferrer'
diff --git a/app/views/shared/access_tokens/_form.html.haml b/app/views/shared/access_tokens/_form.html.haml
index 0b68cfe65e5..d4106ba4e5d 100644
--- a/app/views/shared/access_tokens/_form.html.haml
+++ b/app/views/shared/access_tokens/_form.html.haml
@@ -10,7 +10,7 @@
%p.profile-settings-content
= _("Enter the name of your application, and we'll return a unique %{type}.") % { type: type }
-= form_for token, as: prefix, url: path, method: :post, html: { class: 'js-requires-input' } do |f|
+= gitlab_ui_form_for token, as: prefix, url: path, method: :post, html: { class: 'js-requires-input' } do |f|
= form_errors(token)
@@ -42,7 +42,7 @@
%p.text-secondary#select_scope_help_text
= s_('Tokens|Scopes set the permission levels granted to the token.')
= link_to _("Learn more."), help_path, target: '_blank', rel: 'noopener noreferrer'
- = render 'shared/tokens/scopes_form', prefix: prefix, token: token, scopes: scopes
+ = render 'shared/tokens/scopes_form', prefix: prefix, token: token, scopes: scopes, f: f
- if prefix == :personal_access_token && Feature.enabled?(:personal_access_tokens_scoped_to_projects, current_user)
.js-access-tokens-projects
diff --git a/app/views/shared/boards/_show.html.haml b/app/views/shared/boards/_show.html.haml
index 98752345074..c070baf02b1 100644
--- a/app/views/shared/boards/_show.html.haml
+++ b/app/views/shared/boards/_show.html.haml
@@ -16,6 +16,4 @@
- page_title("#{board.name}", _("Boards"))
- add_page_specific_style 'page_bundles/boards'
-= render 'shared/issuable/search_bar', type: :boards, board: board
-
#js-issuable-board-app{ data: board_data }
diff --git a/app/views/shared/boards/_switcher.html.haml b/app/views/shared/boards/_switcher.html.haml
deleted file mode 100644
index c667b3a4626..00000000000
--- a/app/views/shared/boards/_switcher.html.haml
+++ /dev/null
@@ -1,12 +0,0 @@
-- parent = board.resource_parent
-- milestone_filter_opts = { format: :json }
-- milestone_filter_opts = milestone_filter_opts.merge(only_group_milestones: true) if board.group_board?
-- weights = Gitlab.ee? ? ([Issue::WEIGHT_ANY] + Issue.weight_options) : []
-
-#js-multiple-boards-switcher.inline.boards-switcher{ data: { milestone_path: milestones_filter_path(milestone_filter_opts),
- board_base_url: board_base_url,
- has_missing_boards: (!multiple_boards_available? && current_board_parent.boards.size > 1).to_s,
- can_admin_board: can?(current_user, :admin_issue_board, parent).to_s,
- multiple_issue_boards_available: parent.multiple_issue_boards_available?.to_s,
- scoped_issue_board_feature_enabled: Gitlab.ee? && parent.feature_available?(:scoped_issue_board) ? 'true' : 'false',
- weights: weights.to_json } }
diff --git a/app/views/shared/deploy_keys/_form.html.haml b/app/views/shared/deploy_keys/_form.html.haml
index bf2514f8b0d..b60d433bafa 100644
--- a/app/views/shared/deploy_keys/_form.html.haml
+++ b/app/views/shared/deploy_keys/_form.html.haml
@@ -27,8 +27,5 @@
.form-group
.col-form-label.col-sm-2
.col-sm-10
- = deploy_keys_project_form.label :can_push do
- = deploy_keys_project_form.check_box :can_push
- %strong= _('Grant write permissions to this key')
- %p.light.gl-mb-0
- = _('Allow this key to push to this repository')
+ = deploy_keys_project_form.gitlab_ui_checkbox_component :can_push, _('Grant write permissions to this key'),
+ help_text: _('Allow this key to push to this repository')
diff --git a/app/views/shared/deploy_keys/_project_group_form.html.haml b/app/views/shared/deploy_keys/_project_group_form.html.haml
index 8da48a7936a..c9edf09b350 100644
--- a/app/views/shared/deploy_keys/_project_group_form.html.haml
+++ b/app/views/shared/deploy_keys/_project_group_form.html.haml
@@ -1,4 +1,4 @@
-= form_for [@project.namespace, @project, @deploy_keys.new_key], url: namespace_project_deploy_keys_path, html: { class: "js-requires-input container" } do |f|
+= gitlab_ui_form_for [@project.namespace, @project, @deploy_keys.new_key], url: namespace_project_deploy_keys_path, html: { class: "js-requires-input container" } do |f|
= form_errors(@deploy_keys.new_key)
.form-group.row
= f.label :title, class: "label-bold"
@@ -13,12 +13,8 @@
= f.fields_for :deploy_keys_projects do |deploy_keys_project_form|
.form-group.row
- = deploy_keys_project_form.label :can_push do
- = deploy_keys_project_form.check_box :can_push
- %strong= _('Grant write permissions to this key')
- .form-group.row
- %p.light.gl-mb-0
- = _('Allow this key to push to this repository')
+ = deploy_keys_project_form.gitlab_ui_checkbox_component :can_push, _('Grant write permissions to this key'),
+ help_text: _('Allow this key to push to this repository')
.form-group.row
= f.submit _("Add key"), class: "btn gl-button btn-confirm", data: { qa_selector: "add_deploy_key_button"}
diff --git a/app/views/shared/doorkeeper/applications/_form.html.haml b/app/views/shared/doorkeeper/applications/_form.html.haml
index adfd7ea98b7..c1650405776 100644
--- a/app/views/shared/doorkeeper/applications/_form.html.haml
+++ b/app/views/shared/doorkeeper/applications/_form.html.haml
@@ -1,4 +1,4 @@
-= form_for @application, url: url, html: { role: 'form', class: 'doorkeeper-app-form' } do |f|
+= gitlab_ui_form_for @application, url: url, html: { role: 'form', class: 'doorkeeper-app-form' } do |f|
= form_errors(@application)
.form-group
@@ -12,22 +12,19 @@
%span.form-text.text-muted
= _('Use one line per URI')
- .form-group.form-check
- = f.check_box :confidential, class: 'form-check-input'
- = f.label :confidential, class: 'label-bold form-check-label'
- %span.form-text.text-muted
- = _('Enable only for confidential applications exclusively used by a trusted backend server that can securely store the client secret. Do not enable for native-mobile, single-page, or other JavaScript applications because they cannot keep the client secret confidential.')
+ .form-group
+ = f.gitlab_ui_checkbox_component :confidential, _('Confidential'),
+ help_text: _('Enable only for confidential applications exclusively used by a trusted backend server that can securely store the client secret. Do not enable for native-mobile, single-page, or other JavaScript applications because they cannot keep the client secret confidential.')
- .form-group.form-check
- = f.check_box :expire_access_tokens, class: 'form-check-input'
- = f.label :expire_access_tokens, class: 'label-bold form-check-label'
- %span.form-text.text-muted
- = _('Enable access tokens to expire after 2 hours. If disabled, tokens do not expire.')
- = link_to _('Learn more.'), help_page_path('integration/oauth_provider.md', anchor: 'expiring-access-tokens'), target: '_blank', rel: 'noopener noreferrer'
+ .form-group
+ - help_text = _('Enable access tokens to expire after 2 hours. If disabled, tokens do not expire.')
+ - help_link = link_to _('Learn more.'), help_page_path('integration/oauth_provider.md', anchor: 'expiring-access-tokens'), target: '_blank', rel: 'noopener noreferrer'
+ = f.gitlab_ui_checkbox_component :expire_access_tokens, _('Expire access tokens'),
+ help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text, help_link: help_link }
.form-group
= f.label :scopes, class: 'label-bold'
- = render 'shared/tokens/scopes_form', prefix: 'doorkeeper_application', token: @application, scopes: @scopes
+ = render 'shared/tokens/scopes_form', prefix: 'doorkeeper_application', token: @application, scopes: @scopes, f: f
.gl-mt-3
= f.submit _('Save application'), class: "gl-button btn btn-confirm"
diff --git a/app/views/shared/empty_states/_issues.html.haml b/app/views/shared/empty_states/_issues.html.haml
index 6b571794625..fb410274859 100644
--- a/app/views/shared/empty_states/_issues.html.haml
+++ b/app/views/shared/empty_states/_issues.html.haml
@@ -47,7 +47,7 @@
= link_to _('New issue'), button_path, class: 'gl-button btn btn-confirm', id: 'new_issue_link'
- if show_import_button
- .js-csv-import-export-buttons{ data: { show_import_button: 'true', issuable_type: issuable_type, import_csv_issues_path: import_csv_namespace_project_issues_path, can_edit: can_edit.to_s, project_import_jira_path: project_import_jira_path(@project), max_attachment_size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes), container_class: 'gl-display-inline-flex gl-vertical-align-middle', show_label: 'true' } }
+ .js-csv-import-export-buttons{ data: { show_import_button: 'true', issuable_type: issuable_type, import_csv_issues_path: import_csv_namespace_project_issues_path, can_edit: can_edit.to_s, project_import_jira_path: project_import_jira_path(@project), max_attachment_size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes), container_class: 'gl-w-full gl-sm-w-auto gl-sm-mr-3 gl-display-inline-flex gl-vertical-align-middle', show_label: 'true' } }
%hr
%p.gl-text-center.gl-mb-0
%strong
diff --git a/app/views/shared/empty_states/_milestones.html.haml b/app/views/shared/empty_states/_milestones.html.haml
index c22869fb7e6..fb69e75370e 100644
--- a/app/views/shared/empty_states/_milestones.html.haml
+++ b/app/views/shared/empty_states/_milestones.html.haml
@@ -1,7 +1,13 @@
+- learn_more_path = local_assigns.fetch(:learn_more_path, help_page_path('user/project/milestones/index'))
+- learn_more_link = link_to _('Learn more.'), learn_more_path
+
.row.empty-state
.col-12
.svg-content
= image_tag 'illustrations/milestone_burndown_chart.svg'
.col-12
.text-content
- %h4.text-center= _('No milestones to show')
+ %h4= s_('Milestones|Use milestones to track issues and merge requests over a fixed period of time')
+ %p.state-description
+ = s_('Milestones|Organize issues and merge requests into a cohesive group, and set optional start and due dates. %{learn_more_link}').html_safe % { learn_more_link: learn_more_link }
+ = yield
diff --git a/app/views/shared/empty_states/_milestones_tab.html.haml b/app/views/shared/empty_states/_milestones_tab.html.haml
new file mode 100644
index 00000000000..f6760b0a3f4
--- /dev/null
+++ b/app/views/shared/empty_states/_milestones_tab.html.haml
@@ -0,0 +1,17 @@
+- learn_more_path = local_assigns.fetch(:learn_more_path, help_page_path('user/project/milestones/index'))
+- learn_more_link = link_to _('Learn more.'), learn_more_path
+- closed_tab_selected = params[:state] == 'closed'
+
+.row.empty-state
+ .col-12
+ .svg-content
+ = image_tag 'illustrations/milestone_burndown_chart.svg'
+ .col-12
+ .text-content
+ - if closed_tab_selected
+ %h4.text-center= s_('Milestones|There are no closed milestones')
+ - else
+ %h4.text-center= s_('Milestones|There are no open milestones')
+ %p.state-description
+ = s_('Milestones|Create a milestone to better track your issues and merge requests. %{learn_more_link}').html_safe % { learn_more_link: learn_more_link }
+ = yield
diff --git a/app/views/shared/errors/_gitaly_unavailable.html.haml b/app/views/shared/errors/_gitaly_unavailable.html.haml
index 366d4585435..e99c41f2496 100644
--- a/app/views/shared/errors/_gitaly_unavailable.html.haml
+++ b/app/views/shared/errors/_gitaly_unavailable.html.haml
@@ -1,7 +1,6 @@
-= render 'shared/global_alert',
- alert_class: 'gl-my-5',
+= render Pajamas::AlertComponent.new(alert_class: 'gl-my-5',
variant: :danger,
dismissible: false,
- title: reason do
+ title: reason) do
.gl-alert-body
= s_('The git server, Gitaly, is not available at this time. Please contact your administrator.')
diff --git a/app/views/shared/groups/_dropdown.html.haml b/app/views/shared/groups/_dropdown.html.haml
index 75c34102935..80edce8e7c4 100644
--- a/app/views/shared/groups/_dropdown.html.haml
+++ b/app/views/shared/groups/_dropdown.html.haml
@@ -1,26 +1,5 @@
- options_hash = local_assigns.fetch(:options_hash, groups_sort_options_hash)
-- show_archive_options = local_assigns.fetch(:show_archive_options, false)
+- groups_sort_options = options_hash.map { |value, title| { value: value, text: title, href: filter_groups_path(sort: value) } }
-.dropdown.inline.js-group-filter-dropdown-wrap.gl-mr-3
- %button.dropdown-menu-toggle{ type: 'button', 'data-toggle' => 'dropdown' }
- %span.dropdown-label
- = options_hash[project_list_sort_by]
- = sprite_icon('chevron-down', css_class: 'dropdown-menu-toggle-icon gl-top-3')
- %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable
- %li.dropdown-header
- = _("Sort by")
- - options_hash.each do |value, title|
- %li.js-filter-sort-order
- = link_to filter_groups_path(sort: value), class: ("is-active" if project_list_sort_by == value) do
- = title
- - if show_archive_options
- %li.divider
- %li.js-filter-archived-projects
- = link_to filter_groups_path(archived: nil), class: ("is-active" unless params[:archived].present?) do
- = _("Hide archived projects")
- %li.js-filter-archived-projects
- = link_to filter_groups_path(archived: true), class: ("is-active" if Gitlab::Utils.to_boolean(params[:archived])) do
- = _("Show archived projects")
- %li.js-filter-archived-projects
- = link_to filter_groups_path(archived: 'only'), class: ("is-active" if params[:archived] == 'only') do
- = _("Show archived projects only")
+%div{ data: { testid: 'group_sort_by_dropdown' } }
+ = gl_redirect_listbox_tag groups_sort_options, project_list_sort_by, data: { right: true }
diff --git a/app/views/shared/hook_logs/_content.html.haml b/app/views/shared/hook_logs/_content.html.haml
index 95590d6e515..ce04e24b09f 100644
--- a/app/views/shared/hook_logs/_content.html.haml
+++ b/app/views/shared/hook_logs/_content.html.haml
@@ -10,14 +10,11 @@
%hr
- if hook_log.internal_error_message.present?
- .gl-alert-container
- .gl-alert.gl-alert-danger
- .gl-alert-container
- = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
- .gl-alert-content
- %h4.gl-alert-title= _('Internal error occurred while delivering this webhook.')
- .gl-alert-body
- = _('Error: %{error}') % { error: hook_log.internal_error_message }
+ = render Pajamas::AlertComponent.new(title: _('Internal error occurred while delivering this webhook.'),
+ variant: :danger,
+ dismissible: false) do
+ .gl-alert-body
+ = _('Error: %{error}') % { error: hook_log.internal_error_message }
%h4= _('Response')
= render partial: 'shared/hook_logs/status_label', locals: { hook_log: hook_log }
diff --git a/app/views/shared/integrations/edit.html.haml b/app/views/shared/integrations/edit.html.haml
index f2a31400698..0ae0eea59d8 100644
--- a/app/views/shared/integrations/edit.html.haml
+++ b/app/views/shared/integrations/edit.html.haml
@@ -3,7 +3,7 @@
- page_title @integration.title, _('Integrations')
- @content_class = 'limit-container-width' unless fluid_layout
-%h3.page-title
+%h2.gl-mb-4
= @integration.title
= render 'shared/integrations/tabs', integration: @integration, active_tab: 'edit' do
diff --git a/app/views/shared/issuable/_assignees.html.haml b/app/views/shared/issuable/_assignees.html.haml
index e6d722cb08d..73f1e35f03f 100644
--- a/app/views/shared/issuable/_assignees.html.haml
+++ b/app/views/shared/issuable/_assignees.html.haml
@@ -7,7 +7,7 @@
= render 'shared/issuable/merge_request_assignees', issuable: issuable, count: render_count
- else
- issuable.assignees.take(render_count).each do |assignee| # rubocop: disable CodeReuse/ActiveRecord
- = link_to_member(@project, assignee, name: false, title: s_("MrList|Assigned to %{name}, go to their profile.") % { name: assignee.name})
+ = link_to_member(@project, assignee, name: false, title: s_("MrList|Assigned to %{name}") % { name: assignee.name})
- if more_assignees_count > 0
%span{ class: 'avatar-counter has-tooltip', data: { container: 'body', placement: 'bottom', 'line-type' => 'old', qa_selector: 'avatar_counter_content' }, title: _("+%{more_assignees_count} more assignees") % { more_assignees_count: more_assignees_count} }
diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml
index 3f6e7a6fb32..e0d5f738273 100644
--- a/app/views/shared/issuable/_form.html.haml
+++ b/app/views/shared/issuable/_form.html.haml
@@ -6,10 +6,9 @@
= form_errors(issuable)
- if @conflict
- = render 'shared/global_alert',
- variant: :danger,
+ = render Pajamas::AlertComponent.new(variant: :danger,
dismissible: false,
- alert_class: 'gl-mb-5' do
+ alert_class: 'gl-mb-5') do
.gl-alert-body
Someone edited the #{issuable.class.model_name.human.downcase} the same time you did.
Please check out
diff --git a/app/views/shared/issuable/_label_page_create.html.haml b/app/views/shared/issuable/_label_page_create.html.haml
index 6a58acf8c05..7ab82362e85 100644
--- a/app/views/shared/issuable/_label_page_create.html.haml
+++ b/app/views/shared/issuable/_label_page_create.html.haml
@@ -6,7 +6,7 @@
.dropdown-page-two.dropdown-new-label
= dropdown_title(create_label_title(subject), options: { back: true, close: show_close })
= dropdown_content do
- = render 'shared/global_alert', variant: :danger, alert_class: 'js-label-error gl-mb-3', dismissible: false
+ = render Pajamas::AlertComponent.new(variant: :danger, alert_class: 'js-label-error gl-mb-3', dismissible: false)
%input#new_label_name.default-dropdown-input{ type: "text", placeholder: _('Name new label') }
.suggest-colors.suggest-colors-dropdown
= render_suggested_colors
diff --git a/app/views/shared/issuable/_merge_request_assignees.html.haml b/app/views/shared/issuable/_merge_request_assignees.html.haml
index 13dc6ae4abb..6c7a2496ec6 100644
--- a/app/views/shared/issuable/_merge_request_assignees.html.haml
+++ b/app/views/shared/issuable/_merge_request_assignees.html.haml
@@ -1,6 +1,6 @@
- issuable.merge_request_assignees.take(count).each do |merge_request_assignee| # rubocop: disable CodeReuse/ActiveRecord
- assignee = merge_request_assignee.assignee
- - assignee_tooltip = ( merge_request_assignee.attention_requested? ? s_("MrList|Attention requested from assignee %{name}, go to their profile.") : s_("MrList|Assigned to %{name}, go to their profile.") ) % { name: assignee.name}
+ - assignee_tooltip = ( merge_request_assignee.attention_requested? ? s_("MrList|Attention requested from assignee %{name}") : s_("MrList|Assigned to %{name}") ) % { name: assignee.name}
= link_to_member(@project, assignee, name: false, title: assignee_tooltip, extra_class: "gl-flex-direction-row-reverse") do
- if merge_request_assignee.attention_requested?
diff --git a/app/views/shared/issuable/_merge_request_reviewers.html.haml b/app/views/shared/issuable/_merge_request_reviewers.html.haml
index df5c69e309f..8dd74e12aff 100644
--- a/app/views/shared/issuable/_merge_request_reviewers.html.haml
+++ b/app/views/shared/issuable/_merge_request_reviewers.html.haml
@@ -1,6 +1,6 @@
- issuable.merge_request_reviewers.take(count).each do |merge_request_reviewer| # rubocop: disable CodeReuse/ActiveRecord
- reviewer = merge_request_reviewer.reviewer
- - reviewer_tooltip = ( merge_request_reviewer.attention_requested? ? s_("MrList|Attention requested from reviewer %{name}, go to their profile.") : s_("MrList|Review requested from %{name}, go to their profile.") ) % { name: reviewer.name}
+ - reviewer_tooltip = ( merge_request_reviewer.attention_requested? ? s_("MrList|Attention requested from reviewer %{name}") : s_("MrList|Review requested from %{name}") ) % { name: reviewer.name}
= link_to_member(@project, reviewer, name: false, title: reviewer_tooltip, extra_class: "gl-flex-direction-row-reverse") do
- if merge_request_reviewer.attention_requested?
diff --git a/app/views/shared/issuable/_reviewers.html.haml b/app/views/shared/issuable/_reviewers.html.haml
index 0bb0faa0bb8..4af2cb00859 100644
--- a/app/views/shared/issuable/_reviewers.html.haml
+++ b/app/views/shared/issuable/_reviewers.html.haml
@@ -7,7 +7,7 @@
= render 'shared/issuable/merge_request_reviewers', issuable: issuable, count: render_count
- else
- issuable.reviewers.take(render_count).each do |reviewer| # rubocop: disable CodeReuse/ActiveRecord
- = link_to_member(@project, reviewer, name: false, title: s_("MrList|Review requested from %{name}, go to their profile.") % { name: reviewer.name})
+ = link_to_member(@project, reviewer, name: false, title: s_("MrList|Review requested from %{name}") % { name: reviewer.name})
- if more_reviewers_count > 0
%span{ class: 'avatar-counter has-tooltip', data: { container: 'body', placement: 'bottom', 'line-type' => 'old' }, title: _("+%{more_reviewers_count} more reviewers") % { more_reviewers_count: more_reviewers_count} }
diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml
index 37a79a50fb1..7fdf8ea7796 100644
--- a/app/views/shared/issuable/_search_bar.html.haml
+++ b/app/views/shared/issuable/_search_bar.html.haml
@@ -1,22 +1,12 @@
- type = local_assigns.fetch(:type)
-- board = local_assigns.fetch(:board, nil)
- show_sorting_dropdown = local_assigns.fetch(:show_sorting_dropdown, true)
- disable_target_branch = local_assigns.fetch(:disable_target_branch, false)
- placeholder = local_assigns[:placeholder] || _('Search or filter results...')
- block_css_class = type != :productivity_analytics ? 'row-content-block second-block' : ''
-- is_epic_board = board&.to_type == "EpicBoard"
-
-- if is_epic_board
- - user_can_admin_list = can?(current_user, :admin_epic_board_list, board.resource_parent)
-- elsif board
- - user_can_admin_list = can?(current_user, :admin_issue_board_list, board.resource_parent)
.issues-filters
.issues-details-filters.filtered-search-block.d-flex.flex-column.flex-lg-row{ class: block_css_class }
.d-flex.flex-column.flex-md-row.flex-grow-1.mb-lg-0.mb-md-2.mb-sm-0.w-100
- - if type == :boards
- = render "shared/boards/switcher", board: board
- .js-new-board{ data: { multiple_issue_boards_available: parent.multiple_issue_boards_available?.to_s, can_admin_board: can?(current_user, :admin_issue_board, parent).to_s, } }
= form_tag page_filter_path, method: :get, class: 'filter-form js-filter-form w-100' do
- if params[:search].present?
= hidden_field_tag :search, params[:search]
@@ -25,201 +15,188 @@
- checkbox_id = 'check-all-issues'
%label.gl-sr-only{ for: checkbox_id }= _('Select all')
= check_box_tag checkbox_id, nil, false, class: "check-all-issues left"
- - if is_epic_board
- #js-board-filtered-search{ data: { full_path: @group&.full_path } }
- - elsif board
- #js-issue-board-filtered-search
- - else
- .issues-other-filters.filtered-search-wrapper.d-flex.flex-column.flex-md-row
- .filtered-search-box
- - if type != :boards
- - text = tag.span(sprite_icon('history'), class: "d-md-none") + tag.span(_('Recent searches'), class: "d-none d-md-inline")
- = dropdown_tag(text,
- options: { wrapper_class: "filtered-search-history-dropdown-wrapper",
- toggle_class: "gl-button btn btn-default 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: search_history_storage_prefix } }
- .filtered-search-box-input-container.droplab-dropdown
- .scroll-container
- %ul.tokens-container.list-unstyled
- %li.input-token
- %input.form-control.filtered-search{ search_filter_input_options(type, placeholder) }
- #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.gl-button.btn.btn-link{ type: 'button' }
- -# Encapsulate static class name `{{icon}}` inside #{} to bypass
- -# haml lint's ClassAttributeWithStaticValue
- %svg
- %use{ 'xlink:href': "#{'{{icon}}'}" }
- %span.js-filter-hint
- {{formattedKey}}
- #js-dropdown-operator.filtered-search-input-dropdown-menu.dropdown-menu
- %ul.filter-dropdown{ data: { dropdown: true, dynamic: true } }
- %li.filter-dropdown-item{ data: { value: "{{ title }}" } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- {{ title }}
- %span.btn-helptext
- {{ help }}
- #js-dropdown-author.filtered-search-input-dropdown-menu.dropdown-menu
+ .issues-other-filters.filtered-search-wrapper.d-flex.flex-column.flex-md-row
+ .filtered-search-box
+ - if type != :boards
+ - text = tag.span(sprite_icon('history'), class: "d-md-none") + tag.span(_('Recent searches'), class: "d-none d-md-inline")
+ = dropdown_tag(text,
+ options: { wrapper_class: "filtered-search-history-dropdown-wrapper",
+ toggle_class: "gl-button btn btn-default 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: search_history_storage_prefix } }
+ .filtered-search-box-input-container.droplab-dropdown
+ .scroll-container
+ %ul.tokens-container.list-unstyled
+ %li.input-token
+ %input.form-control.filtered-search{ search_filter_input_options(type, placeholder) }
+ #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.gl-button.btn.btn-link{ type: 'button' }
+ -# Encapsulate static class name `{{icon}}` inside #{} to bypass
+ -# haml lint's ClassAttributeWithStaticValue
+ %svg
+ %use{ 'xlink:href': "#{'{{icon}}'}" }
+ %span.js-filter-hint
+ {{formattedKey}}
+ #js-dropdown-operator.filtered-search-input-dropdown-menu.dropdown-menu
+ %ul.filter-dropdown{ data: { dropdown: true, dynamic: true } }
+ %li.filter-dropdown-item{ data: { value: "{{ title }}" } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ {{ title }}
+ %span.btn-helptext
+ {{ help }}
+ #js-dropdown-author.filtered-search-input-dropdown-menu.dropdown-menu
+ - if current_user
+ %ul{ data: { dropdown: true } }
+ = render 'shared/issuable/user_dropdown_item',
+ user: current_user
+ %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
+ = render 'shared/issuable/user_dropdown_item',
+ user: User.new(username: '{{username}}', name: '{{name}}'),
+ avatar: { lazy: true, url: '{{avatar_url}}' }
+ #js-dropdown-assignee.filtered-search-input-dropdown-menu.dropdown-menu
+ %ul{ data: { dropdown: true } }
+ %li.filter-dropdown-item{ data: { value: 'None' } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('None')
+ %li.filter-dropdown-item{ data: { value: 'Any' } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('Any')
+ %li.divider.droplab-item-ignore
- if current_user
- %ul{ data: { dropdown: true } }
- = render 'shared/issuable/user_dropdown_item',
- user: current_user
- %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
= render 'shared/issuable/user_dropdown_item',
- user: User.new(username: '{{username}}', name: '{{name}}'),
- avatar: { lazy: true, url: '{{avatar_url}}' }
- #js-dropdown-assignee.filtered-search-input-dropdown-menu.dropdown-menu
- %ul{ data: { dropdown: true } }
- %li.filter-dropdown-item{ data: { value: 'None' } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('None')
- %li.filter-dropdown-item{ data: { value: 'Any' } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('Any')
- %li.divider.droplab-item-ignore
- - if current_user
- = render 'shared/issuable/user_dropdown_item',
- user: current_user
- %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
+ user: current_user
+ %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
+ = render 'shared/issuable/user_dropdown_item',
+ user: User.new(username: '{{username}}', name: '{{name}}'),
+ avatar: { lazy: true, url: '{{avatar_url}}' }
+ #js-dropdown-reviewer.filtered-search-input-dropdown-menu.dropdown-menu
+ %ul{ data: { dropdown: true } }
+ %li.filter-dropdown-item{ data: { value: 'None' } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('None')
+ %li.filter-dropdown-item{ data: { value: 'Any' } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('Any')
+ %li.divider.droplab-item-ignore
+ - if current_user
= render 'shared/issuable/user_dropdown_item',
- user: User.new(username: '{{username}}', name: '{{name}}'),
- avatar: { lazy: true, url: '{{avatar_url}}' }
- #js-dropdown-reviewer.filtered-search-input-dropdown-menu.dropdown-menu
- %ul{ data: { dropdown: true } }
- %li.filter-dropdown-item{ data: { value: 'None' } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('None')
- %li.filter-dropdown-item{ data: { value: 'Any' } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('Any')
- %li.divider.droplab-item-ignore
- - if current_user
+ user: current_user
+ %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
+ = render 'shared/issuable/user_dropdown_item',
+ user: User.new(username: '{{username}}', name: '{{name}}'),
+ avatar: { lazy: true, url: '{{avatar_url}}' }
+ - if Feature.enabled?(:mr_attention_requests, default_enabled: :yaml)
+ #js-dropdown-attention-requested.filtered-search-input-dropdown-menu.dropdown-menu
+ - if current_user
+ %ul{ data: { dropdown: true } }
= render 'shared/issuable/user_dropdown_item',
user: current_user
%ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
= render 'shared/issuable/user_dropdown_item',
user: User.new(username: '{{username}}', name: '{{name}}'),
avatar: { lazy: true, url: '{{avatar_url}}' }
- - if Feature.enabled?(:mr_attention_requests, default_enabled: :yaml)
- #js-dropdown-attention-requested.filtered-search-input-dropdown-menu.dropdown-menu
- - if current_user
- %ul{ data: { dropdown: true } }
- = render 'shared/issuable/user_dropdown_item',
- user: current_user
- %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
- = render 'shared/issuable/user_dropdown_item',
- user: User.new(username: '{{username}}', name: '{{name}}'),
- avatar: { lazy: true, url: '{{avatar_url}}' }
- = render_if_exists 'shared/issuable/approver_dropdown'
- = render_if_exists 'shared/issuable/approved_by_dropdown'
- #js-dropdown-milestone.filtered-search-input-dropdown-menu.dropdown-menu
- %ul{ data: { dropdown: true } }
- %li.filter-dropdown-item{ data: { value: 'None' } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('None')
- %li.filter-dropdown-item{ data: { value: 'Any' } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('Any')
- %li.filter-dropdown-item{ data: { value: 'Upcoming' } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('Upcoming')
- %li.filter-dropdown-item{ data: { value: 'Started' } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('Started')
- %li.divider.droplab-item-ignore
- %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
- %li.filter-dropdown-item
- %button.gl-button.btn.btn-link.js-data-value{ type: 'button' }
+ = render_if_exists 'shared/issuable/approver_dropdown'
+ = render_if_exists 'shared/issuable/approved_by_dropdown'
+ #js-dropdown-milestone.filtered-search-input-dropdown-menu.dropdown-menu
+ %ul{ data: { dropdown: true } }
+ %li.filter-dropdown-item{ data: { value: 'None' } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('None')
+ %li.filter-dropdown-item{ data: { value: 'Any' } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('Any')
+ %li.filter-dropdown-item{ data: { value: 'Upcoming' } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('Upcoming')
+ %li.filter-dropdown-item{ data: { value: 'Started' } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('Started')
+ %li.divider.droplab-item-ignore
+ %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
+ %li.filter-dropdown-item
+ %button.gl-button.btn.btn-link.js-data-value{ type: 'button' }
+ {{title}}
+ = render_if_exists 'shared/issuable/filter_iteration', type: type
+ #js-dropdown-release.filtered-search-input-dropdown-menu.dropdown-menu
+ %ul{ data: { dropdown: true } }
+ %li.filter-dropdown-item{ data: { value: 'None' } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('None')
+ %li.filter-dropdown-item{ data: { value: 'Any' } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('Any')
+ %li.divider.droplab-item-ignore
+ %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
+ %li.filter-dropdown-item
+ %button.gl-button.btn.btn-link.js-data-value{ type: 'button' }
+ {{title}}
+ #js-dropdown-label.filtered-search-input-dropdown-menu.dropdown-menu
+ %ul{ data: { dropdown: true } }
+ %li.filter-dropdown-item{ data: { value: 'None' } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('None')
+ %li.filter-dropdown-item{ data: { value: 'Any' } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('Any')
+ %li.divider.droplab-item-ignore
+ %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
+ %li.filter-dropdown-item
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ %span.dropdown-label-box{ style: 'background: {{color}}' }
+ %span.label-title.js-data-value
{{title}}
- = render_if_exists 'shared/issuable/filter_iteration', type: type
- #js-dropdown-release.filtered-search-input-dropdown-menu.dropdown-menu
- %ul{ data: { dropdown: true } }
- %li.filter-dropdown-item{ data: { value: 'None' } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('None')
- %li.filter-dropdown-item{ data: { value: 'Any' } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('Any')
- %li.divider.droplab-item-ignore
- %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
- %li.filter-dropdown-item
- %button.gl-button.btn.btn-link.js-data-value{ type: 'button' }
- {{title}}
- #js-dropdown-label.filtered-search-input-dropdown-menu.dropdown-menu
- %ul{ data: { dropdown: true } }
- %li.filter-dropdown-item{ data: { value: 'None' } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('None')
- %li.filter-dropdown-item{ data: { value: 'Any' } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('Any')
- %li.divider.droplab-item-ignore
- %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
- %li.filter-dropdown-item
- %button.gl-button.btn.btn-link{ type: 'button' }
- %span.dropdown-label-box{ style: 'background: {{color}}' }
- %span.label-title.js-data-value
- {{title}}
- #js-dropdown-my-reaction.filtered-search-input-dropdown-menu.dropdown-menu
- %ul{ data: { dropdown: true } }
- %li.filter-dropdown-item{ data: { value: 'None' } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('None')
- %li.filter-dropdown-item{ data: { value: 'Any' } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('Any')
- %li.divider.droplab-item-ignore
- %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
- %li.filter-dropdown-item
- %button.gl-button.btn.btn-link{ type: 'button' }
- %gl-emoji
- %span.js-data-value.gl-ml-3
- {{name}}
- #js-dropdown-wip.filtered-search-input-dropdown-menu.dropdown-menu
- %ul.filter-dropdown{ data: { dropdown: true } }
- %li.filter-dropdown-item{ data: { value: 'yes', capitalize: true } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('Yes')
- %li.filter-dropdown-item{ data: { value: 'no', capitalize: true } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('No')
- #js-dropdown-confidential.filtered-search-input-dropdown-menu.dropdown-menu
- %ul.filter-dropdown{ data: { dropdown: true } }
- %li.filter-dropdown-item{ data: { value: 'yes', capitalize: true } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('Yes')
- %li.filter-dropdown-item{ data: { value: 'no', capitalize: true } }
- %button.gl-button.btn.btn-link{ type: 'button' }
- = _('No')
- - unless disable_target_branch
- #js-dropdown-target-branch.filtered-search-input-dropdown-menu.dropdown-menu
- %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
- %li.filter-dropdown-item
- %button.gl-button.btn.btn-link.js-data-value.monospace
- {{title}}
- #js-dropdown-environment.filtered-search-input-dropdown-menu.dropdown-menu
+ #js-dropdown-my-reaction.filtered-search-input-dropdown-menu.dropdown-menu
+ %ul{ data: { dropdown: true } }
+ %li.filter-dropdown-item{ data: { value: 'None' } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('None')
+ %li.filter-dropdown-item{ data: { value: 'Any' } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('Any')
+ %li.divider.droplab-item-ignore
+ %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
+ %li.filter-dropdown-item
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ %gl-emoji
+ %span.js-data-value.gl-ml-3
+ {{name}}
+ #js-dropdown-wip.filtered-search-input-dropdown-menu.dropdown-menu
+ %ul.filter-dropdown{ data: { dropdown: true } }
+ %li.filter-dropdown-item{ data: { value: 'yes', capitalize: true } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('Yes')
+ %li.filter-dropdown-item{ data: { value: 'no', capitalize: true } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('No')
+ #js-dropdown-confidential.filtered-search-input-dropdown-menu.dropdown-menu
+ %ul.filter-dropdown{ data: { dropdown: true } }
+ %li.filter-dropdown-item{ data: { value: 'yes', capitalize: true } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('Yes')
+ %li.filter-dropdown-item{ data: { value: 'no', capitalize: true } }
+ %button.gl-button.btn.btn-link{ type: 'button' }
+ = _('No')
+ - unless disable_target_branch
+ #js-dropdown-target-branch.filtered-search-input-dropdown-menu.dropdown-menu
%ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
%li.filter-dropdown-item
- %button.gl-button.btn.btn-link.js-data-value{ type: 'button' }
+ %button.gl-button.btn.btn-link.js-data-value.monospace
{{title}}
+ #js-dropdown-environment.filtered-search-input-dropdown-menu.dropdown-menu
+ %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
+ %li.filter-dropdown-item
+ %button.gl-button.btn.btn-link.js-data-value{ type: 'button' }
+ {{title}}
- = render_if_exists 'shared/issuable/filter_weight', type: type
+ = render_if_exists 'shared/issuable/filter_weight', type: type
- = render_if_exists 'shared/issuable/filter_epic', type: type
+ = render_if_exists 'shared/issuable/filter_epic', type: type
- %button.clear-search.hidden{ type: 'button' }
- = sprite_icon('close', size: 16, css_class: 'clear-search-icon')
+ %button.clear-search.hidden{ type: 'button' }
+ = sprite_icon('close', size: 16, css_class: 'clear-search-icon')
.filter-dropdown-container.gl-display-flex.gl-flex-direction-column.gl-md-flex-direction-row.gl-align-items-flex-start
- - if type == :boards
- #js-board-labels-toggle
- - if current_user
- #js-board-epics-swimlanes-toggle
- .js-board-config{ data: { can_admin_list: user_can_admin_list.to_s, has_scope: board.scoped?.to_s } }
- - if user_can_admin_list
- .js-create-column-trigger{ data: board_list_data }
- #js-toggle-focus-btn
- - elsif type != :productivity_analytics && show_sorting_dropdown
+ - if type != :productivity_analytics && show_sorting_dropdown
= render 'shared/issuable/sort_dropdown'
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml
index 37d31515307..b99294f504c 100644
--- a/app/views/shared/issuable/_sidebar.html.haml
+++ b/app/views/shared/issuable/_sidebar.html.haml
@@ -97,7 +97,7 @@
- if issuable_sidebar.dig(:current_user, :can_move)
.block.js-sidebar-move-issue-block
.sidebar-collapsed-icon{ data: { toggle: 'tooltip', placement: 'left', container: 'body', boundary: 'viewport' }, title: _('Move issue') }
- = custom_icon('icon_arrow_right')
+ = sprite_icon('long-arrow')
.dropdown.sidebar-move-issue-dropdown.hide-collapsed
%button.gl-button.btn.btn-default.btn-block.js-sidebar-dropdown-toggle.js-move-issue{ type: 'button',
data: { toggle: 'dropdown', display: 'static', track_label: "right_sidebar", track_property: "move_issue", track_action: "click_button", track_value: "" } }
diff --git a/app/views/shared/issuable/form/_contribution.html.haml b/app/views/shared/issuable/form/_contribution.html.haml
index dc6abfd2c9e..c9dda22de46 100644
--- a/app/views/shared/issuable/form/_contribution.html.haml
+++ b/app/views/shared/issuable/form/_contribution.html.haml
@@ -1,5 +1,7 @@
- issuable = local_assigns.fetch(:issuable)
- form = local_assigns.fetch(:form)
+- contribution_help_link = help_page_path('user/project/merge_requests/allow_collaboration')
+- contribution_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: contribution_help_link }
- return unless issuable.is_a?(MergeRequest)
- return unless issuable.for_fork?
@@ -8,13 +10,10 @@
%hr
.form-group.row
- %label.col-form-label.col-sm-2
+ %label.col-form-label.col-sm-2.pt-sm-0
= _('Contribution')
.col-sm-10
- .form-check.gl-mt-2
- = form.check_box :allow_collaboration, disabled: !issuable.can_allow_collaboration?(current_user), class: 'form-check-input'
- = form.label :allow_collaboration, class: 'form-check-label' do
- = _('Allow commits from members who can merge to the target branch.')
- = link_to 'About this feature', help_page_path('user/project/merge_requests/allow_collaboration'), target: '_blank', rel: 'noopener noreferrer nofollow'
- .form-text.text-muted
- = allow_collaboration_unavailable_reason(issuable)
+ = form.gitlab_ui_checkbox_component :allow_collaboration,
+ _('Allow commits from members who can merge to the target branch. %{link_start}About this feature.%{link_end}').html_safe % { link_start: contribution_help_link_start, link_end: '</a>'.html_safe },
+ checkbox_options: { disabled: !issuable.can_allow_collaboration?(current_user) },
+ help_text: allow_collaboration_unavailable_reason(issuable)
diff --git a/app/views/shared/issuable/form/_metadata.html.haml b/app/views/shared/issuable/form/_metadata.html.haml
index 34720576526..e941eaadbc9 100644
--- a/app/views/shared/issuable/form/_metadata.html.haml
+++ b/app/views/shared/issuable/form/_metadata.html.haml
@@ -17,10 +17,8 @@
- if issuable.respond_to?(:confidential) && can?(current_user, :set_confidentiality, issuable)
.form-group.row
.offset-sm-2.col-sm-10
- .form-check
- = form.check_box :confidential, class: 'form-check-input'
- = form.label :confidential, class: 'form-check-label' do
- #{_('This issue is confidential and should only be visible to team members with at least Reporter access.')}
+ = form.gitlab_ui_checkbox_component :confidential,
+ _('This issue is confidential and should only be visible to team members with at least Reporter access.')
- if can?(current_user, :"set_#{issuable.to_ability_name}_metadata", issuable)
%hr
diff --git a/app/views/shared/issue_type/_details_content.html.haml b/app/views/shared/issue_type/_details_content.html.haml
index 1babc6885c2..7276175db59 100644
--- a/app/views/shared/issue_type/_details_content.html.haml
+++ b/app/views/shared/issue_type/_details_content.html.haml
@@ -1,8 +1,8 @@
- related_branches_path = related_branches_project_issue_path(@project, issuable)
- api_awards_path = local_assigns.fetch(:api_awards_path, nil)
-.issue-details.issuable-details
- .detail-page-description.content-block
+.issue-details.issuable-details.js-issue-details
+ .detail-page-description.content-block.js-detail-page-description
#js-issuable-app{ data: { initial: issuable_initial_data(issuable).to_json, full_path: @project.full_path } }
.title-container
%h1.title= markdown_field(issuable, :title)
@@ -12,6 +12,7 @@
= edited_time_ago_with_tooltip(issuable, placement: 'bottom', html_class: 'issue-edited-ago js-issue-edited-ago')
+ .js-issue-widgets
= render 'shared/issue_type/sentry_stack_trace', issuable: issuable
= render 'projects/issues/design_management'
@@ -28,8 +29,9 @@
#related-branches{ data: { url: related_branches_path } }
-# This element is filled in using JavaScript.
- = render 'shared/issue_type/emoji_block', issuable: issuable, api_awards_path: api_awards_path
+ .js-issue-widgets
+ = render 'shared/issue_type/emoji_block', issuable: issuable, api_awards_path: api_awards_path
- = render 'projects/issues/discussion'
+ = render 'projects/issues/discussion'
= render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @issue.assignees
diff --git a/app/views/shared/milestones/_milestone_complete_alert.html.haml b/app/views/shared/milestones/_milestone_complete_alert.html.haml
index 5b05fdb6019..4685a93a343 100644
--- a/app/views/shared/milestones/_milestone_complete_alert.html.haml
+++ b/app/views/shared/milestones/_milestone_complete_alert.html.haml
@@ -1,9 +1,8 @@
- milestone = local_assigns[:milestone]
- if milestone.complete? && milestone.active?
- = render 'shared/global_alert',
- variant: :success,
+ = render Pajamas::AlertComponent.new(variant: :success,
alert_data: { testid: 'all-issues-closed-alert' },
- dismissible: false do
+ dismissible: false) do
.gl-alert-body
= yield
diff --git a/app/views/shared/projects/_list.html.haml b/app/views/shared/projects/_list.html.haml
index 6fae6a15567..c39dc561801 100644
--- a/app/views/shared/projects/_list.html.haml
+++ b/app/views/shared/projects/_list.html.haml
@@ -37,8 +37,8 @@
- css_class = (i >= projects_limit) || project.pending_delete? ? 'hide' : nil
= render "shared/projects/project", project: project, skip_namespace: skip_namespace,
avatar: avatar, stars: stars, css_class: css_class, use_creator_avatar: use_creator_avatar,
- forks: project.forking_enabled?, show_last_commit_as_description: show_last_commit_as_description, user: user,
- merge_requests: project.merge_requests_enabled?, issues: project.issues_enabled?,
+ forks: project.forking_enabled?, show_last_commit_as_description: show_last_commit_as_description,
+ user: user, merge_requests: able_to_see_merge_requests?(project, user), issues: able_to_see_issues?(project, user),
pipeline_status: pipeline_status, compact_mode: compact_mode
= paginate_collection(projects, remote: remote) unless skip_pagination
- else
diff --git a/app/views/shared/runners/_runner_type_alert.html.haml b/app/views/shared/runners/_runner_type_alert.html.haml
index e0cc1e924d8..365cee5fadc 100644
--- a/app/views/shared/runners/_runner_type_alert.html.haml
+++ b/app/views/shared/runners/_runner_type_alert.html.haml
@@ -1,20 +1,16 @@
-.gl-alert.gl-alert-info.gl-my-5
- = sprite_icon('information-o', css_class: 'gl-alert-icon')
- - if runner.instance_type?
- %h4.gl-alert-title
- = s_('Runners|This runner is available to all groups and projects in your GitLab instance.')
- .gl-alert-body
- = s_('Runners|Shared runners are available to every project in a GitLab instance. If you want a runner to build only specific projects, restrict the project in the table below. After you restrict a runner to a project, you cannot change it back to a shared runner.')
- = link_to _('Learn more.'), help_page_path('ci/runners/runners_scope', anchor: 'shared-runners'), target: '_blank', rel: 'noopener noreferrer'
- - elsif runner.group_type?
- %h4.gl-alert-title
- = s_('Runners|This runner is available to all projects and subgroups in a group.')
+- alert_class = 'gl-mb-5'
+
+- if runner.group_type?
+ = render Pajamas::AlertComponent.new(alert_class: alert_class,
+ title: s_('Runners|This runner is available to all projects and subgroups in a group.'),
+ dismissible: false) do
.gl-alert-body
= s_('Runners|Use Group runners when you want all projects in a group to have access to a set of runners.')
= link_to _('Learn more.'), help_page_path('ci/runners/runners_scope', anchor: 'group-runners'), target: '_blank', rel: 'noopener noreferrer'
- - else
- %h4.gl-alert-title
- = s_('Runners|This runner is associated with specific projects.')
+- else
+ = render Pajamas::AlertComponent.new(alert_class: alert_class,
+ title: s_('Runners|This runner is associated with specific projects.'),
+ dismissible: false) do
.gl-alert-body
= s_('Runners|You can set up a specific runner to be used by multiple projects but you cannot make this a shared runner.')
= link_to _('Learn more.'), help_page_path('ci/runners/runners_scope', anchor: 'specific-runners'), target: '_blank', rel: 'noopener noreferrer'
diff --git a/app/views/shared/tokens/_scopes_form.html.haml b/app/views/shared/tokens/_scopes_form.html.haml
index 33e95446bd7..010376464f1 100644
--- a/app/views/shared/tokens/_scopes_form.html.haml
+++ b/app/views/shared/tokens/_scopes_form.html.haml
@@ -1,9 +1,14 @@
- scopes = local_assigns.fetch(:scopes)
- prefix = local_assigns.fetch(:prefix)
- token = local_assigns.fetch(:token)
+- f = local_assigns.fetch(:f)
-- scopes.each do |scope|
- %fieldset.form-group.form-check
- = check_box_tag "#{prefix}[scopes][]", scope, token.scopes.include?(scope), id: "#{prefix}_scopes_#{scope}", class: "form-check-input", data: { qa_selector: "#{scope}_checkbox" }
- = label_tag "#{prefix}_scopes_#{scope}", scope, class: 'label-bold form-check-label'
- .text-secondary= t scope, scope: scope_description(prefix)
+%fieldset
+ - scopes.each do |scope|
+ - help_text = t scope, scope: scope_description(prefix)
+ = f.gitlab_ui_checkbox_component :scopes, scope,
+ help_text: help_text,
+ checkbox_options: { checked: token.scopes.include?(scope), id: "#{prefix}_scopes_#{scope}", multiple: true, data: { qa_selector: "#{scope}_checkbox" } },
+ checked_value: scope,
+ unchecked_value: nil,
+ label_options: { data: { qa_selector: "#{scope}_label" } }
diff --git a/app/views/shared/web_hooks/_form.html.haml b/app/views/shared/web_hooks/_form.html.haml
index 5650f08b2a9..afe72767b9a 100644
--- a/app/views/shared/web_hooks/_form.html.haml
+++ b/app/views/shared/web_hooks/_form.html.haml
@@ -14,92 +14,67 @@
= s_('Webhooks|Used to validate received payloads. Sent with the request in the %{code_start}X-Gitlab-Token HTTP%{code_end} header.').html_safe % { code_start: code_start, code_end: code_end }
.form-group
= form.label :url, s_('Webhooks|Trigger'), class: 'label-bold'
- %ul.list-unstyled.gl-ml-6
- %li
- = form.check_box :push_events, class: 'form-check-input'
- = form.label :push_events, class: 'list-label form-check-label gl-ml-1 gl-mb-3' do
- %strong= s_('Webhooks|Push events')
- = form.text_field :push_events_branch_filter, class: 'form-control gl-form-input', placeholder: 'Branch name or wildcard pattern to trigger on (leave blank for all)'
- %p.text-muted.gl-ml-1
+ %ul.list-unstyled
+ %li.gl-pb-5
+ = form.gitlab_ui_checkbox_component :push_events, s_('Webhooks|Push events')
+ .gl-pl-6
+ = form.text_field :push_events_branch_filter, class: 'form-control gl-form-input',
+ placeholder: 'Branch name or wildcard pattern to trigger on (leave blank for all)'
+ %p.form-text.text-muted.custom-control
= s_('Webhooks|Push to the repository.')
- %li
- = form.check_box :tag_push_events, class: 'form-check-input'
- = form.label :tag_push_events, class: 'list-label form-check-label gl-ml-1' do
- %strong= s_('Webhooks|Tag push events')
- %p.text-muted.gl-ml-1
- = s_('Webhooks|A new tag is pushed to the repository.')
- %li
- = form.check_box :note_events, class: 'form-check-input'
- = form.label :note_events, class: 'list-label form-check-label gl-ml-1' do
- %strong= s_('Webhooks|Comments')
- %p.text-muted.gl-ml-1
- = s_('Webhooks|A comment is added to an issue.')
- %li
- = form.check_box :confidential_note_events, class: 'form-check-input'
- = form.label :confidential_note_events, class: 'list-label form-check-label gl-ml-1' do
- %strong= s_('Webhooks|Confidential comments')
- %p.text-muted.gl-ml-1
- = s_('Webhooks|A comment is added to a confidential issue.')
- %li
- = form.check_box :issues_events, class: 'form-check-input'
- = form.label :issues_events, class: 'list-label form-check-label gl-ml-1' do
- %strong= s_('Webhooks|Issues events')
- %p.text-muted.gl-ml-1
- = s_('Webhooks|An issue is created, updated, closed, or reopened.')
- %li
- = form.check_box :confidential_issues_events, class: 'form-check-input'
- = form.label :confidential_issues_events, class: 'list-label form-check-label gl-ml-1' do
- %strong= s_('Webhooks|Confidential issues events')
- %p.text-muted.gl-ml-1
- = s_('Webhooks|A confidential issue is created, updated, closed, or reopened.')
+ %li.gl-pb-5
+ = form.gitlab_ui_checkbox_component :tag_push_events,
+ s_('Webhooks|Tag push events'),
+ help_text: s_('Webhooks|A new tag is pushed to the repository.')
+ %li.gl-pb-5
+ = form.gitlab_ui_checkbox_component :note_events,
+ s_('Webhooks|Comments'),
+ help_text: s_('Webhooks|A comment is added to an issue or merge request.')
+ %li.gl-pb-5
+ = form.gitlab_ui_checkbox_component :confidential_note_events,
+ s_('Webhooks|Confidential comments'),
+ help_text: s_('Webhooks|A comment is added to a confidential issue.')
+ %li.gl-pb-5
+ = form.gitlab_ui_checkbox_component :issues_events,
+ s_('Webhooks|Issues events'),
+ help_text: s_('Webhooks|An issue is created, updated, closed, or reopened.')
+ %li.gl-pb-5
+ = form.gitlab_ui_checkbox_component :confidential_issues_events,
+ s_('Webhooks|Confidential issues events'),
+ help_text: s_('Webhooks|A confidential issue is created, updated, closed, or reopened.')
- if @group
= render_if_exists 'groups/hooks/member_events', form: form
= render_if_exists 'groups/hooks/subgroup_events', form: form
- %li
- = form.check_box :merge_requests_events, class: 'form-check-input'
- = form.label :merge_requests_events, class: 'list-label form-check-label gl-ml-1' do
- %strong= s_('Webhooks|Merge request events')
- %p.text-muted.gl-ml-1
- = s_('Webhooks|A merge request is created, updated, or merged.')
- %li
- = form.check_box :job_events, class: 'form-check-input'
- = form.label :job_events, class: 'list-label form-check-label gl-ml-1' do
- %strong= s_('Webhooks|Job events')
- %p.text-muted.gl-ml-1
- = s_("Webhooks|A job's status changes.")
- %li
- = form.check_box :pipeline_events, class: 'form-check-input'
- = form.label :pipeline_events, class: 'list-label form-check-label gl-ml-1' do
- %strong= s_('Webhooks|Pipeline events')
- %p.text-muted.gl-ml-1
- = s_("Webhooks|A pipeline's status changes.")
- %li
- = form.check_box :wiki_page_events, class: 'form-check-input'
- = form.label :wiki_page_events, class: 'list-label form-check-label gl-ml-1' do
- %strong= s_('Webhooks|Wiki page events')
- %p.text-muted.gl-ml-1
- = s_('Webhooks|A wiki page is created or updated.')
- %li
- = form.check_box :deployment_events, class: 'form-check-input'
- = form.label :deployment_events, class: 'list-label form-check-label gl-ml-1' do
- %strong= s_('Webhooks|Deployment events')
- %p.text-muted.gl-ml-1
- = s_('Webhooks|A deployment starts, finishes, fails, or is canceled.')
- %li
- = form.check_box :feature_flag_events, class: 'form-check-input'
- = form.label :feature_flag_events, class: 'list-label form-check-label gl-ml-1' do
- %strong= s_('Webhooks|Feature flag events')
- %p.text-muted.gl-ml-1
- = s_('Webhooks|A feature flag is turned on or off.')
- %li
- = form.check_box :releases_events, class: 'form-check-input'
- = form.label :releases_events, class: 'list-label form-check-label gl-ml-1' do
- %strong= s_('Webhooks|Releases events')
- %p.text-muted.gl-ml-1
- = s_('Webhooks|A release is created or updated.')
+ %li.gl-pb-5
+ = form.gitlab_ui_checkbox_component :merge_requests_events,
+ s_('Webhooks|Merge request events'),
+ help_text: s_('Webhooks|A merge request is created, updated, or merged.')
+ %li.gl-pb-5
+ = form.gitlab_ui_checkbox_component :job_events,
+ s_('Webhooks|Job events'),
+ help_text: s_("Webhooks|A job's status changes.")
+ %li.gl-pb-5
+ = form.gitlab_ui_checkbox_component :pipeline_events,
+ s_('Webhooks|Pipeline events'),
+ help_text: s_("Webhooks|A pipeline's status changes.")
+ %li.gl-pb-5
+ = form.gitlab_ui_checkbox_component :wiki_page_events,
+ s_('Webhooks|Wiki page events'),
+ help_text: s_('Webhooks|A wiki page is created or updated.')
+ %li.gl-pb-5
+ = form.gitlab_ui_checkbox_component :deployment_events,
+ s_('Webhooks|Deployment events'),
+ help_text: s_('Webhooks|A deployment starts, finishes, fails, or is canceled.')
+ %li.gl-pb-5
+ = form.gitlab_ui_checkbox_component :feature_flag_events,
+ s_('Webhooks|Feature flag events'),
+ help_text: s_('Webhooks|A feature flag is turned on or off.')
+ %li.gl-pb-5
+ = form.gitlab_ui_checkbox_component :releases_events,
+ s_('Webhooks|Releases events'),
+ help_text: s_('Webhooks|A release is created or updated.')
.form-group
= form.label :enable_ssl_verification, s_('Webhooks|SSL verification'), class: 'label-bold checkbox'
- .form-check
- = form.check_box :enable_ssl_verification, class: 'form-check-input'
- = form.label :enable_ssl_verification, class: 'form-check-label gl-ml-1' do
- %strong= s_('Webhooks|Enable SSL verification')
+ %ul.list-unstyled
+ %li
+ = form.gitlab_ui_checkbox_component :enable_ssl_verification, s_('Webhooks|Enable SSL verification')
diff --git a/app/views/shared/web_hooks/_hook_errors.html.haml b/app/views/shared/web_hooks/_hook_errors.html.haml
index 03f373783f8..a100a620cea 100644
--- a/app/views/shared/web_hooks/_hook_errors.html.haml
+++ b/app/views/shared/web_hooks/_hook_errors.html.haml
@@ -10,17 +10,13 @@
limit: hook.rate_limit,
support_link_start: link_start % { url: support_path },
support_link_end: link_end }
- = render 'shared/global_alert',
- title: s_('Webhooks|Webhook was automatically disabled'),
- variant: :danger,
- close_button_class: 'js-close' do
+ = render Pajamas::AlertComponent.new(title: s_('Webhooks|Webhook was automatically disabled'),
+ variant: :danger) do
.gl-alert-body
= s_('Webhooks|The webhook was triggered more than %{limit} times per minute and is now disabled. To re-enable this webhook, fix the problems shown in %{strong_start}Recent events%{strong_end}, then re-test your settings. %{support_link_start}Contact Support%{support_link_end} if you need help re-enabling your webhook.').html_safe % placeholders
- elsif hook.permanently_disabled?
- = render 'shared/global_alert',
- title: s_('Webhooks|Webhook failed to connect'),
- variant: :danger,
- close_button_class: 'js-close' do
+ = render Pajamas::AlertComponent.new(title: s_('Webhooks|Webhook failed to connect'),
+ variant: :danger) do
.gl-alert-body
= s_('Webhooks|The webhook failed to connect, and is disabled. To re-enable it, check %{strong_start}Recent events%{strong_end} for error details, then test your settings below.').html_safe % { strong_start: strong_start, strong_end: strong_end }
- elsif hook.temporarily_disabled?
@@ -30,9 +26,7 @@
retry_time: time_interval_in_words(hook.disabled_until - Time.now),
help_link_start: link_start % { url: help_path },
help_link_end: link_end }
- = render 'shared/global_alert',
- title: s_('Webhooks|Webhook fails to connect'),
- variant: :warning,
- close_button_class: 'js-close' do
+ = render Pajamas::AlertComponent.new(title: s_('Webhooks|Webhook fails to connect'),
+ variant: :warning) do
.gl-alert-body
= s_('Webhooks|The webhook %{help_link_start}failed to connect%{help_link_end}, and will retry in %{retry_time}. To re-enable it, check %{strong_start}Recent events%{strong_end} for error details, then test your settings below.').html_safe % placeholders
diff --git a/app/views/shared/wikis/_form.html.haml b/app/views/shared/wikis/_form.html.haml
index e121725b9af..34bedbd928a 100644
--- a/app/views/shared/wikis/_form.html.haml
+++ b/app/views/shared/wikis/_form.html.haml
@@ -3,4 +3,4 @@
.gl-mt-3
= form_errors(@page, truncate: :title)
-#js-wiki-form{ data: { page_info: page_info.to_json, format_options: Wiki::MARKUPS.to_json } }
+#js-wiki-form{ data: { page_info: page_info.to_json, format_options: wiki_markup_hash_by_name_id.to_json } }
diff --git a/app/views/shared/wikis/_main_links.html.haml b/app/views/shared/wikis/_main_links.html.haml
index 02794950895..c1fd8c48c60 100644
--- a/app/views/shared/wikis/_main_links.html.haml
+++ b/app/views/shared/wikis/_main_links.html.haml
@@ -1,5 +1,5 @@
- if @page&.persisted?
- = link_to wiki_page_path(@wiki, @page, action: :history), class: "btn gl-button", role: "button", data: { qa_selector: 'page_history_button' } do
+ = link_to wiki_page_path(@wiki, @page, action: :history), class: "btn gl-button btn-default", role: "button", data: { qa_selector: 'page_history_button' } do
= s_("Wiki|Page history")
- if can?(current_user, :create_wiki, @wiki.container)
= link_to wiki_path(@wiki, action: :new), class: "btn gl-button btn-confirm-secondary", role: "button", data: { qa_selector: 'new_page_button' } do
diff --git a/app/views/shared/wikis/show.html.haml b/app/views/shared/wikis/show.html.haml
index e6980aae3e1..6591e8fae7b 100644
--- a/app/views/shared/wikis/show.html.haml
+++ b/app/views/shared/wikis/show.html.haml
@@ -26,6 +26,7 @@
%div
- if can?(current_user, :create_wiki, @wiki.container) && @page.latest? && @valid_encoding
= link_to sprite_icon('pencil', css_class: 'gl-icon'), wiki_page_path(@wiki, @page, action: :edit), title: 'Edit', role: "button", class: 'btn gl-button btn-icon btn-default js-wiki-edit', data: { qa_selector: 'edit_page_button', testid: 'wiki_edit_button' }
- = render 'shared/wikis/wiki_content'
+
+ .js-async-wiki-page-content.md.gl-pt-2{ data: { qa_selector: 'wiki_page_content', testid: 'wiki_page_content', tracking_context: wiki_page_tracking_context(@page).to_json, get_wiki_content_url: wiki_page_render_api_endpoint(@page) } }
= render 'shared/wikis/sidebar'
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 88eacaefcb0..361beda4d02 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -188,7 +188,7 @@
= s_('UserProfile|Most Recent Activity')
.content_list{ data: { href: user_activity_path } }
.loading
- .gl-spinner.gl-spinner-md
+ = gl_loading_icon(size: 'md')
- unless @user.bot?
- if profile_tab?(:groups)
#groups.tab-pane