Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/abuse_reports/new.html.haml44
-rw-r--r--app/views/admin/application_settings/_kroki.html.haml2
-rw-r--r--app/views/admin/application_settings/_repository_check.html.haml30
-rw-r--r--app/views/admin/application_settings/_user_restrictions.html.haml1
-rw-r--r--app/views/admin/application_settings/_visibility_and_access.html.haml2
-rw-r--r--app/views/admin/application_settings/ci/_header.html.haml4
-rw-r--r--app/views/admin/application_settings/ci_cd.html.haml2
-rw-r--r--app/views/admin/application_settings/general.html.haml2
-rw-r--r--app/views/admin/broadcast_messages/_form.html.haml67
-rw-r--r--app/views/admin/broadcast_messages/_table.html.haml38
-rw-r--r--app/views/admin/broadcast_messages/edit.html.haml28
-rw-r--r--app/views/admin/broadcast_messages/index.html.haml40
-rw-r--r--app/views/admin/dashboard/_stats_users_table.html.haml49
-rw-r--r--app/views/admin/dashboard/index.html.haml9
-rw-r--r--app/views/admin/dashboard/stats.html.haml66
-rw-r--r--app/views/admin/projects/show.html.haml8
-rw-r--r--app/views/admin/runners/edit.html.haml8
-rw-r--r--app/views/admin/spam_logs/_spam_log.html.haml33
-rw-r--r--app/views/admin/topics/index.html.haml1
-rw-r--r--app/views/admin/users/_access_levels.html.haml1
-rw-r--r--app/views/admin/users/_users.html.haml3
-rw-r--r--app/views/admin/users/show.html.haml4
-rw-r--r--app/views/ci/group_variables/_index.html.haml2
-rw-r--r--app/views/ci/status/_badge.html.haml2
-rw-r--r--app/views/ci/variables/_content.html.haml2
-rw-r--r--app/views/ci/variables/_index.html.haml8
-rw-r--r--app/views/clusters/clusters/_advanced_settings.html.haml7
-rw-r--r--app/views/dashboard/todos/_todo.html.haml23
-rw-r--r--app/views/devise/sessions/two_factor.html.haml4
-rw-r--r--app/views/devise/shared/_signup_box.html.haml4
-rw-r--r--app/views/devise/shared/_signup_omniauth_provider_list.haml2
-rw-r--r--app/views/errors/omniauth_error.html.haml26
-rw-r--r--app/views/groups/_delete_project_button.html.haml3
-rw-r--r--app/views/groups/_group_admin_settings.html.haml2
-rw-r--r--app/views/groups/_home_panel.html.haml17
-rw-r--r--app/views/groups/_import_group_from_another_instance_panel.html.haml8
-rw-r--r--app/views/groups/new.html.haml5
-rw-r--r--app/views/groups/settings/repository/show.html.haml2
-rw-r--r--app/views/ide/_show.html.haml2
-rw-r--r--app/views/layouts/_loading_hints.html.haml3
-rw-r--r--app/views/layouts/_page.html.haml7
-rw-r--r--app/views/layouts/_snowplow.html.haml2
-rw-r--r--app/views/layouts/application.html.haml9
-rw-r--r--app/views/layouts/dashboard.html.haml7
-rw-r--r--app/views/layouts/explore.html.haml6
-rw-r--r--app/views/layouts/header/_registration_enabled_callout.html.haml10
-rw-r--r--app/views/layouts/nav/sidebar/_admin.html.haml31
-rw-r--r--app/views/layouts/nav/sidebar/_your_work.html.haml1
-rw-r--r--app/views/layouts/oauth_error.html.haml72
-rw-r--r--app/views/layouts/snippets.html.haml4
-rw-r--r--app/views/notify/access_token_expired_email.html.haml12
-rw-r--r--app/views/notify/access_token_expired_email.text.erb10
-rw-r--r--app/views/notify/access_token_revoked_email.html.haml2
-rw-r--r--app/views/notify/access_token_revoked_email.text.erb2
-rw-r--r--app/views/notify/github_gists_import_errors_email.html.haml19
-rw-r--r--app/views/notify/github_gists_import_errors_email.text.erb12
-rw-r--r--app/views/notify/service_desk_new_note_email.html.haml2
-rw-r--r--app/views/profiles/chat_names/_chat_name.html.haml10
-rw-r--r--app/views/profiles/notifications/_email_settings.html.haml3
-rw-r--r--app/views/profiles/notifications/_group_settings.html.haml2
-rw-r--r--app/views/profiles/preferences/show.html.haml24
-rw-r--r--app/views/projects/_files.html.haml4
-rw-r--r--app/views/projects/_fork_info.html.haml14
-rw-r--r--app/views/projects/_home_panel.html.haml4
-rw-r--r--app/views/projects/_import_project_pane.html.haml8
-rw-r--r--app/views/projects/artifacts/index.html.haml4
-rw-r--r--app/views/projects/blob/_template_selectors.html.haml3
-rw-r--r--app/views/projects/branch_defaults/_branch_names_fields.html.haml2
-rw-r--r--app/views/projects/buttons/_fork.html.haml2
-rw-r--r--app/views/projects/ci/builds/_build.html.haml2
-rw-r--r--app/views/projects/commit/_multiple_signatures_signature_badge.html.haml7
-rw-r--r--app/views/projects/commit/_other_user_signature_badge.html.haml7
-rw-r--r--app/views/projects/commit/_same_user_different_email_signature_badge.html.haml7
-rw-r--r--app/views/projects/commit/_signature_badge.html.haml24
-rw-r--r--app/views/projects/commit/_unverified_signature_badge.html.haml7
-rw-r--r--app/views/projects/commit/_verified_signature_badge.html.haml7
-rw-r--r--app/views/projects/commits/show.html.haml2
-rw-r--r--app/views/projects/feature_flags/new.html.haml2
-rw-r--r--app/views/projects/forks/new.html.haml1
-rw-r--r--app/views/projects/imports/new.html.haml2
-rw-r--r--app/views/projects/issues/_work_item_links.html.haml6
-rw-r--r--app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml7
-rw-r--r--app/views/projects/merge_requests/_merge_request.html.haml1
-rw-r--r--app/views/projects/merge_requests/_mr_title.html.haml2
-rw-r--r--app/views/projects/merge_requests/_page.html.haml2
-rw-r--r--app/views/projects/milestones/show.html.haml1
-rw-r--r--app/views/projects/ml/experiments/show.html.haml4
-rw-r--r--app/views/projects/pages/new.html.haml18
-rw-r--r--app/views/projects/pipeline_schedules/index.html.haml2
-rw-r--r--app/views/projects/pipelines/_info.html.haml4
-rw-r--r--app/views/projects/settings/ci_cd/show.html.haml5
-rw-r--r--app/views/projects/settings/repository/_protected_branches.html.haml2
-rw-r--r--app/views/projects/settings/repository/show.html.haml2
-rw-r--r--app/views/projects/triggers/_index.html.haml27
-rw-r--r--app/views/projects/triggers/_trigger.html.haml37
-rw-r--r--app/views/protected_branches/_branches_list.html.haml6
-rw-r--r--app/views/protected_branches/_create_protected_branch.html.haml2
-rw-r--r--app/views/protected_branches/_index.html.haml6
-rw-r--r--app/views/protected_branches/_protected_branch.html.haml2
-rw-r--r--app/views/protected_branches/shared/_branches_list.html.haml6
-rw-r--r--app/views/protected_branches/shared/_create_protected_branch.html.haml15
-rw-r--r--app/views/protected_branches/shared/_index.html.haml3
-rw-r--r--app/views/protected_branches/shared/_protected_branch.html.haml26
-rw-r--r--app/views/pwa/manifest.json.erb2
-rw-r--r--app/views/search/_category.html.haml2
-rw-r--r--app/views/search/_results.html.haml8
-rw-r--r--app/views/search/_results_list.html.haml2
-rw-r--r--app/views/search/_results_status.html.haml8
-rw-r--r--app/views/search/_results_status_horiz_nav.html.haml20
-rw-r--r--app/views/search/_results_status_vert_nav.html.haml20
-rw-r--r--app/views/search/show.html.haml4
-rw-r--r--app/views/shared/_broadcast_message.html.haml2
-rw-r--r--app/views/shared/_milestone_expired.html.haml7
-rw-r--r--app/views/shared/_milestones_sort_dropdown.html.haml2
-rw-r--r--app/views/shared/_ref_dropdown.html.haml7
-rw-r--r--app/views/shared/admin/_admin_note.html.haml2
-rw-r--r--app/views/shared/doorkeeper/applications/_delete_form.html.haml6
-rw-r--r--app/views/shared/issue_type/_details_content.html.haml6
-rw-r--r--app/views/shared/milestones/_description.html.haml5
-rw-r--r--app/views/shared/milestones/_header.html.haml3
-rw-r--r--app/views/shared/nav/_your_work_scope_header.html.haml6
-rw-r--r--app/views/shared/projects/_list.html.haml2
-rw-r--r--app/views/shared/runners/_runner_type_alert.html.haml2
-rw-r--r--app/views/snippets/edit.html.haml2
-rw-r--r--app/views/snippets/new.html.haml3
-rw-r--r--app/views/snippets/show.html.haml1
-rw-r--r--app/views/users/calendar_activities.html.haml2
-rw-r--r--app/views/users/show.html.haml9
128 files changed, 550 insertions, 689 deletions
diff --git a/app/views/abuse_reports/new.html.haml b/app/views/abuse_reports/new.html.haml
index d5dfddef837..393021ed93c 100644
--- a/app/views/abuse_reports/new.html.haml
+++ b/app/views/abuse_reports/new.html.haml
@@ -1,28 +1,36 @@
- page_title _("Report abuse to administrator")
-%h1.page-title.gl-font-size-h-display
- = _("Report abuse to administrator")
-%p
- = _("Use this form to report to the administrator users who create spam issues, comments or behave inappropriately.")
-%p
- = _("A member of the abuse team will review your report as soon as possible.")
-%hr
-= gitlab_ui_form_for @abuse_report, html: { class: 'js-quick-submit js-requires-input'} do |f|
+.row
+ .col-lg-8
+ %h1.page-title.gl-font-size-h-display
+ = _("Report abuse to administrator")
+ %p
+ = _("Please use this form to report to the administrator users who create spam issues, comments or behave inappropriately.")
+ = _("A member of the abuse team will review your report as soon as possible.")
+
+= gitlab_ui_form_for @abuse_report, html: { class: 'js-quick-submit'} do |f|
= form_errors(@abuse_report)
= f.hidden_field :user_id
+ = f.hidden_field :category
+
.form-group.row
- .col-sm-2.col-form-label
- = f.label :user_id
- .col-sm-10
+ .col-lg-8
+ = f.label :reported_user
+
- name = "#{@abuse_report.user.name} (@#{@abuse_report.user.username})"
= text_field_tag :user_name, name, class: "form-control", readonly: true
.form-group.row
- .col-sm-2.col-form-label
- = f.label :message
- .col-sm-10
- = f.text_area :message, class: "form-control", rows: 2, required: true, value: sanitize(@ref_url)
+ .col-lg-8
+ = f.label :reported_from
+ = f.text_field :reported_from_url, class: "form-control", readonly: true
+ .form-group.row
+ .col-lg-8
+ = f.label :reason
+ = f.text_area :message, class: "form-control", rows: 4, required: true
.form-text.text-muted
- = _("Explain the problem. If appropriate, provide a link to the relevant issue or comment.")
+ = _("Explain why you're reporting the user.")
- .form-actions
- = f.submit _("Send report"), pajamas_button: true
+ = render Pajamas::ButtonComponent.new(type: :submit, variant: :confirm) do
+ = _('Send report')
+ = render Pajamas::ButtonComponent.new(href: @abuse_report.reported_from_url, button_options: { class: 'gl-ml-3' }) do
+ = _('Cancel')
diff --git a/app/views/admin/application_settings/_kroki.html.haml b/app/views/admin/application_settings/_kroki.html.haml
index f1f6dd34401..e1f5802a407 100644
--- a/app/views/admin/application_settings/_kroki.html.haml
+++ b/app/views/admin/application_settings/_kroki.html.haml
@@ -32,4 +32,4 @@
- kroki_available_formats.each do |format|
= f.gitlab_ui_checkbox_component format[:name], format[:label]
- = f.submit _('Save changes'), class: "btn gl-button btn-confirm"
+ = f.submit _('Save changes'), pajamas_button: true
diff --git a/app/views/admin/application_settings/_repository_check.html.haml b/app/views/admin/application_settings/_repository_check.html.haml
index 332d3a94b92..b67cc29f296 100644
--- a/app/views/admin/application_settings/_repository_check.html.haml
+++ b/app/views/admin/application_settings/_repository_check.html.haml
@@ -19,33 +19,15 @@
%h4= _("Housekeeping")
.form-group
- help_text = _("Run housekeeping tasks to automatically optimize Git repositories. Disabling this option will cause performance to degenerate over time.")
- - help_link = link_to _('Learn more.'), help_page_path('administration/housekeeping.md', anchor: 'configure-push-based-maintenance'), target: '_blank', rel: 'noopener noreferrer'
+ - help_link = link_to _('Learn more.'), help_page_path('administration/housekeeping.md', anchor: 'heuristical-housekeeping'), target: '_blank', rel: 'noopener noreferrer'
= f.gitlab_ui_checkbox_component :housekeeping_enabled,
_("Enable automatic repository housekeeping"),
help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text, help_link: help_link }
- - if Feature.enabled?(:optimized_housekeeping)
- .form-group
- = f.label :housekeeping_incremental_repack_period, _('Optimize repository period'), class: 'label-bold'
- = f.number_field :housekeeping_incremental_repack_period, class: 'form-control gl-form-input'
- .form-text.text-muted
- = _('Number of Git pushes after which Gitaly is asked to optimize a repository.')
- - else
- .form-group
- = f.label :housekeeping_incremental_repack_period, 'Incremental repack period', class: 'label-bold'
- = f.number_field :housekeeping_incremental_repack_period, class: 'form-control gl-form-input'
- .form-text.text-muted
- = html_escape(s_('Number of Git pushes after which an incremental %{code_start}git repack%{code_end} is run.')) % { code_start: '<code>'.html_safe, code_end: '</code>'.html_safe }
- .form-group
- = f.label :housekeeping_full_repack_period, 'Full repack period', class: 'label-bold'
- = f.number_field :housekeeping_full_repack_period, class: 'form-control gl-form-input'
- .form-text.text-muted
- = html_escape(s_('Number of Git pushes after which a full %{code_start}git repack%{code_end} is run.')) % { code_start: '<code>'.html_safe, code_end: '</code>'.html_safe }
- .form-group
- = f.label :housekeeping_gc_period, _('Git GC period'), class: 'label-bold'
- = f.number_field :housekeeping_gc_period, class: 'form-control gl-form-input'
- .form-text.text-muted
- = html_escape(s_('Number of Git pushes after which %{code_start}git gc%{code_end} is run.')) % { code_start: '<code>'.html_safe, code_end: '</code>'.html_safe }
-
+ .form-group
+ = f.label :housekeeping_optimize_repository_period, _('Optimize repository period'), class: 'label-bold'
+ = f.number_field :housekeeping_optimize_repository_period, class: 'form-control gl-form-input'
+ .form-text.text-muted
+ = _('Number of Git pushes after which Gitaly is asked to optimize a repository.')
.sub-section
%h4= s_("AdminSettings|Inactive project deletion")
.js-inactive-project-deletion-form{ data: inactive_projects_deletion_data(@application_setting) }
diff --git a/app/views/admin/application_settings/_user_restrictions.html.haml b/app/views/admin/application_settings/_user_restrictions.html.haml
index 82f5e6def9f..c35056383fa 100644
--- a/app/views/admin/application_settings/_user_restrictions.html.haml
+++ b/app/views/admin/application_settings/_user_restrictions.html.haml
@@ -4,3 +4,4 @@
= label_tag _('User restrictions')
= render_if_exists 'admin/application_settings/updating_name_disabled_for_users', form: form
= form.gitlab_ui_checkbox_component :can_create_group, _("Allow new users to create top-level groups")
+ = form.gitlab_ui_checkbox_component :user_defaults_to_private_profile, _("Make new users' profiles private by default")
diff --git a/app/views/admin/application_settings/_visibility_and_access.html.haml b/app/views/admin/application_settings/_visibility_and_access.html.haml
index 9c8770b8998..e01126e32e1 100644
--- a/app/views/admin/application_settings/_visibility_and_access.html.haml
+++ b/app/views/admin/application_settings/_visibility_and_access.html.haml
@@ -41,7 +41,7 @@
= f.gitlab_ui_checkbox_component :project_export_enabled, s_('AdminSettings|Enabled')
.form-group{ data: { testid: 'bulk-import' } }
- = f.label :bulk_import, s_('AdminSettings|Enable migrating GitLab groups and projects by direct transfer'), class: 'gl-font-weight-bold'
+ = f.label :bulk_import, s_('AdminSettings|Allow migrating GitLab groups and projects by direct transfer'), class: 'gl-font-weight-bold'
= f.gitlab_ui_checkbox_component :bulk_import_enabled, s_('AdminSettings|Enabled')
.form-group
diff --git a/app/views/admin/application_settings/ci/_header.html.haml b/app/views/admin/application_settings/ci/_header.html.haml
index 79c07f491fc..9e8caf0e0b7 100644
--- a/app/views/admin/application_settings/ci/_header.html.haml
+++ b/app/views/admin/application_settings/ci/_header.html.haml
@@ -8,13 +8,13 @@
%p
= _('Variables store information, like passwords and secret keys, that you can use in job scripts. All projects on the instance can use these variables.')
- = link_to _('Learn more.'), help_page_path('ci/variables/index', anchor: 'add-a-cicd-variable-to-an-instance'), target: '_blank', rel: 'noopener noreferrer'
+ = link_to _('Learn more.'), help_page_path('ci/variables/index', anchor: 'for-an-instance'), target: '_blank', rel: 'noopener noreferrer'
%p
= _('Variables can be:')
%ul
%li
= html_escape(_('%{code_open}Protected:%{code_close} Only exposed to protected branches or protected tags.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
- = link_to _('Learn more.'), help_page_path('ci/variables/index', anchor: 'protected-cicd-variables'), target: '_blank', rel: 'noopener noreferrer'
+ = link_to _('Learn more.'), help_page_path('ci/variables/index', anchor: 'protect-a-cicd-variable'), target: '_blank', rel: 'noopener noreferrer'
%li
= html_escape(_('%{code_open}Masked:%{code_close} Hidden in job logs. Must match masking requirements.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
= link_to _('Learn more.'), help_page_path('ci/variables/index', anchor: 'mask-a-cicd-variable'), target: '_blank', rel: 'noopener noreferrer'
diff --git a/app/views/admin/application_settings/ci_cd.html.haml b/app/views/admin/application_settings/ci_cd.html.haml
index 0414382a108..bd0ce766f81 100644
--- a/app/views/admin/application_settings/ci_cd.html.haml
+++ b/app/views/admin/application_settings/ci_cd.html.haml
@@ -9,7 +9,7 @@
.settings-content
- if ci_variable_protected_by_default?
%p.settings-message.text-center
- - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('ci/variables/index', anchor: 'protected-cicd-variables') }
+ - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('ci/variables/index', anchor: 'protect-a-cicd-variable') }
= s_('Environment variables on this GitLab instance are configured to be %{link_start}protected%{link_end} by default.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
#js-instance-variables{ data: { endpoint: admin_ci_variables_path, maskable_regex: ci_variable_maskable_regex, protected_by_default: ci_variable_protected_by_default?.to_s} }
diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml
index 8c9d54cd5d8..dceee07019c 100644
--- a/app/views/admin/application_settings/general.html.haml
+++ b/app/views/admin/application_settings/general.html.haml
@@ -75,6 +75,8 @@
= render 'admin/application_settings/external_authorization_service_form', expanded: expanded_by_default?
+= render_if_exists 'admin/application_settings/scim'
+
%section.settings.as-terminal.no-animate#js-terminal-settings{ class: ('expanded' if expanded_by_default?) }
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
diff --git a/app/views/admin/broadcast_messages/_form.html.haml b/app/views/admin/broadcast_messages/_form.html.haml
deleted file mode 100644
index 4e05eb31010..00000000000
--- a/app/views/admin/broadcast_messages/_form.html.haml
+++ /dev/null
@@ -1,67 +0,0 @@
-#broadcast-message-preview
- = render 'preview'
-
-= gitlab_ui_form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form js-quick-submit js-requires-input'} do |f|
- = form_errors(@broadcast_message)
-
- .form-group.row.mt-4
- .col-sm-2.col-form-label
- = f.label :message
- .col-sm-10
- = f.text_area :message, class: "form-control gl-form-input js-autosize js-broadcast-message-message",
- required: true,
- dir: 'auto',
- data: { preview_path: preview_admin_broadcast_messages_path }
- .form-group.row
- .col-sm-2.col-form-label
- = f.label :broadcast_type, _('Type')
- .col-sm-10
- = f.select :broadcast_type, broadcast_type_options, {}, class: 'form-control js-broadcast-message-type'
- .form-group.row.js-broadcast-message-background-color-form-group{ class: ('hidden' unless @broadcast_message.banner?) }
- .col-sm-2.col-form-label
- = f.label :theme, _("Theme")
- .col-sm-10
- .input-group
- = f.select :theme, broadcast_theme_options, {}, class: 'form-control js-broadcast-message-theme'
-
- .form-group.row.js-broadcast-message-dismissable-form-group{ class: ('hidden' unless @broadcast_message.banner?) }
- .col-sm-2.col-form-label.pt-0
- = f.label :starts_at, _("Dismissable")
- .col-sm-10
- = f.gitlab_ui_checkbox_component :dismissable, _('Allow users to dismiss the broadcast message')
- - if Feature.enabled?(:role_targeted_broadcast_messages)
- .form-group.row
- .col-sm-2.col-form-label
- = f.label :target_access_levels, _('Target roles')
- .col-sm-10
- - target_access_level_options.each do |human_access_level, access_level|
- = f.gitlab_ui_checkbox_component :target_access_levels, human_access_level, checked_value: access_level, unchecked_value: false, checkbox_options: { multiple: true }
- .form-text.text-muted
- = _('The broadcast message displays only to users in projects and groups who have these roles.')
- .form-group.row.js-toggle-colors-container.toggle-colors.hide
- .col-sm-2.col-form-label
- = f.label :font, _("Font Color")
- .col-sm-10
- = f.color_field :font, class: "form-control gl-form-input text-font-color"
- .form-group.row
- .col-sm-2.col-form-label
- = f.label :target_path, _('Target Path')
- .col-sm-10
- = f.text_field :target_path, class: "form-control gl-form-input"
- .form-text.text-muted
- = _('Paths can contain wildcards, like */welcome')
- .form-group.row
- .col-sm-2.col-form-label
- = f.label :starts_at, _("Starts at (UTC)")
- .col-sm-10.datetime-controls
- = f.datetime_select :starts_at, {}, class: 'form-control form-control-inline'
- .form-group.row
- .col-sm-2.col-form-label
- = f.label :ends_at, _("Ends at (UTC)")
- .col-sm-10.datetime-controls
- = f.datetime_select :ends_at, {}, class: 'form-control form-control-inline'
- .form-actions
- - if @broadcast_message.persisted?
- = f.submit _("Update broadcast message"), pajamas_button: true
- - else
- = f.submit _("Add broadcast message"), pajamas_button: true
diff --git a/app/views/admin/broadcast_messages/_table.html.haml b/app/views/admin/broadcast_messages/_table.html.haml
deleted file mode 100644
index c5cd333f9dd..00000000000
--- a/app/views/admin/broadcast_messages/_table.html.haml
+++ /dev/null
@@ -1,38 +0,0 @@
-- targeted_broadcast_messages_enabled = Feature.enabled?(:role_targeted_broadcast_messages)
-
-- if @broadcast_messages.any?
- .table-responsive
- %table.table.b-table.gl-table
- %thead
- %tr
- %th= _('Status')
- %th= _('Preview')
- %th= _('Starts')
- %th= _('Ends')
- - if targeted_broadcast_messages_enabled
- %th= _('Target roles')
- %th= _('Target Path')
- %th= _('Type')
- %th &nbsp;
- %tbody
- - @broadcast_messages.each do |message|
- %tr
- %td
- = broadcast_message_status(message)
- %td
- = broadcast_message(message, preview: true)
- %td
- = message.starts_at
- %td
- = message.ends_at
- - if targeted_broadcast_messages_enabled
- %td
- = target_access_levels_display(message.target_access_levels)
- %td
- = message.target_path
- %td
- = message.broadcast_type.capitalize
- %td.gl-white-space-nowrap<
- = link_to sprite_icon('pencil', css_class: 'gl-icon'), edit_admin_broadcast_message_path(message), title: _('Edit'), class: 'btn btn-icon gl-button'
- = link_to sprite_icon('remove', css_class: 'gl-icon'), admin_broadcast_message_path(message), method: :delete, remote: true, title: _('Remove'), class: 'js-remove-tr btn btn-icon gl-button btn-danger gl-ml-3'
- = paginate @broadcast_messages, theme: 'gitlab'
diff --git a/app/views/admin/broadcast_messages/edit.html.haml b/app/views/admin/broadcast_messages/edit.html.haml
index 28301833f7d..bef435c07f7 100644
--- a/app/views/admin/broadcast_messages/edit.html.haml
+++ b/app/views/admin/broadcast_messages/edit.html.haml
@@ -1,19 +1,15 @@
- breadcrumb_title _("Messages")
- page_title _("Broadcast Messages")
-- vue_app_enabled = Feature.enabled?(:vue_broadcast_messages, current_user)
-- if vue_app_enabled
- #js-broadcast-message{ data: {
- id: @broadcast_message.id,
- message: @broadcast_message.message,
- broadcast_type: @broadcast_message.broadcast_type,
- theme: @broadcast_message.theme,
- dismissable: @broadcast_message.dismissable.to_s,
- target_access_levels: @broadcast_message.target_access_levels,
- target_path: @broadcast_message.target_path,
- starts_at: @broadcast_message.starts_at,
- ends_at: @broadcast_message.ends_at,
- target_access_level_options: target_access_level_options.to_json,
- } }
-- else
- = render 'form'
+#js-broadcast-message{ data: {
+ id: @broadcast_message.id,
+ message: @broadcast_message.message,
+ broadcast_type: @broadcast_message.broadcast_type,
+ theme: @broadcast_message.theme,
+ dismissable: @broadcast_message.dismissable.to_s,
+ target_access_levels: @broadcast_message.target_access_levels,
+ target_path: @broadcast_message.target_path,
+ starts_at: @broadcast_message.starts_at,
+ ends_at: @broadcast_message.ends_at,
+ target_access_level_options: target_access_level_options.to_json,
+} }
diff --git a/app/views/admin/broadcast_messages/index.html.haml b/app/views/admin/broadcast_messages/index.html.haml
index 7a005f9c982..2fb59570231 100644
--- a/app/views/admin/broadcast_messages/index.html.haml
+++ b/app/views/admin/broadcast_messages/index.html.haml
@@ -1,31 +1,25 @@
- breadcrumb_title _("Messages")
- page_title _("Broadcast Messages")
-- vue_app_enabled = Feature.enabled?(:vue_broadcast_messages, current_user)
%h1.page-title.gl-font-size-h-display
= _('Broadcast Messages')
%p.light
= _('Use banners and notifications to notify your users about scheduled maintenance, recent upgrades, and more.')
-- if vue_app_enabled
- #js-broadcast-messages{ data: {
- page: params[:page] || 1,
- target_access_level_options: target_access_level_options.to_json,
- messages_count: @broadcast_messages.total_count,
- messages: @broadcast_messages.map { |message| {
- id: message.id,
- status: broadcast_message_status(message),
- preview: broadcast_message(message, preview: true),
- starts_at: message.starts_at.to_s,
- ends_at: message.ends_at.to_s,
- target_roles: target_access_levels_display(message.target_access_levels),
- target_path: message.target_path,
- type: message.broadcast_type.capitalize,
- edit_path: edit_admin_broadcast_message_path(message),
- delete_path: admin_broadcast_message_path(message) + '.js'
- } }.to_json
- } }
-- else
- = render 'form'
- %br.clearfix
- = render 'table'
+#js-broadcast-messages{ data: {
+ page: params[:page] || 1,
+ target_access_level_options: target_access_level_options.to_json,
+ messages_count: @broadcast_messages.total_count,
+ messages: @broadcast_messages.map { |message| {
+ id: message.id,
+ status: broadcast_message_status(message),
+ preview: broadcast_message(message, preview: true),
+ starts_at: message.starts_at.to_s,
+ ends_at: message.ends_at.to_s,
+ target_roles: target_access_levels_display(message.target_access_levels),
+ target_path: message.target_path,
+ type: message.broadcast_type.capitalize,
+ edit_path: edit_admin_broadcast_message_path(message),
+ delete_path: admin_broadcast_message_path(message) + '.js'
+ } }.to_json
+} }
diff --git a/app/views/admin/dashboard/_stats_users_table.html.haml b/app/views/admin/dashboard/_stats_users_table.html.haml
new file mode 100644
index 00000000000..473384b8961
--- /dev/null
+++ b/app/views/admin/dashboard/_stats_users_table.html.haml
@@ -0,0 +1,49 @@
+%table.table.gl-text-gray-500
+ %tr
+ %td.gl-p-5!
+ = s_('AdminArea|Users without a Group and Project')
+ = render_if_exists 'admin/dashboard/included_free_in_license_tooltip'
+ %td.gl-text-right{ class: 'gl-p-5!' }
+ = @users_statistics&.without_groups_and_projects
+ = render_if_exists 'admin/dashboard/minimal_access_stats_row', users_statistics: @users_statistics
+ %tr
+ %td.gl-p-5!
+ = s_('AdminArea|Users with highest role')
+ %strong
+ = s_('AdminArea|Reporter')
+ %td.gl-text-right{ class: 'gl-p-5!' }
+ = @users_statistics&.with_highest_role_reporter
+ %tr
+ %td.gl-p-5!
+ = s_('AdminArea|Users with highest role')
+ %strong
+ = s_('AdminArea|Developer')
+ %td.gl-text-right{ class: 'gl-p-5!' }
+ = @users_statistics&.with_highest_role_developer
+ %tr
+ %td.gl-p-5!
+ = s_('AdminArea|Users with highest role')
+ %strong
+ = s_('AdminArea|Maintainer')
+ %td.gl-text-right{ class: 'gl-p-5!' }
+ = @users_statistics&.with_highest_role_maintainer
+ %tr
+ %td.gl-p-5!
+ = s_('AdminArea|Users with highest role')
+ %strong
+ = s_('AdminArea|Owner')
+ %td.gl-text-right{ class: 'gl-p-5!' }
+ = @users_statistics&.with_highest_role_owner
+ %tr
+ %td.gl-p-5!
+ = s_('AdminArea|Users with highest role')
+ %strong
+ = s_('AdminArea|Guest')
+ = render_if_exists 'admin/dashboard/included_free_in_license_tooltip'
+ %td.gl-text-right{ class: 'gl-p-5!' }
+ = @users_statistics&.with_highest_role_guest
+ %tr
+ %td.gl-p-5!
+ = s_('AdminArea|Bots')
+ %td.gl-text-right{ class: 'gl-p-5!' }
+ = @users_statistics&.bots
diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml
index 27ae7d523b9..8afddd99451 100644
--- a/app/views/admin/dashboard/index.html.haml
+++ b/app/views/admin/dashboard/index.html.haml
@@ -164,10 +164,11 @@
= _('Rails')
%span.float-right
#{Rails::VERSION::STRING}
- %p
- = ApplicationRecord.database.human_adapter_name
- %span.float-right
- = ApplicationRecord.database.version
+ - database_versions.each do |database_name, database|
+ %p
+ #{database[:adapter_name]} (#{database_name})
+ %span.float-right
+ = database[:version]
%p
= _('Redis')
%span.float-right
diff --git a/app/views/admin/dashboard/stats.html.haml b/app/views/admin/dashboard/stats.html.haml
index e0701812ba3..0a5a425397f 100644
--- a/app/views/admin/dashboard/stats.html.haml
+++ b/app/views/admin/dashboard/stats.html.haml
@@ -2,63 +2,15 @@
%h3.gl-my-6
= s_('AdminArea|Users statistics')
+
+= render 'admin/dashboard/stats_users_table', user_statistics: @users_statistics
+
+%p.gl-font-weight-bold.gl-mt-8
+ = s_('AdminArea|Totals')
+
%table.table.gl-text-gray-500
- %tr
- %td.gl-p-5!
- = s_('AdminArea|Users without a Group and Project')
- = render_if_exists 'admin/dashboard/included_free_in_license_tooltip'
- %td.gl-text-right{ class: 'gl-p-5!' }
- = @users_statistics&.without_groups_and_projects
- = render_if_exists 'admin/dashboard/minimal_access_stats_row', users_statistics: @users_statistics
- %tr
- %td.gl-p-5!
- = s_('AdminArea|Users with highest role')
- %strong
- = s_('AdminArea|Guest')
- = render_if_exists 'admin/dashboard/included_free_in_license_tooltip'
- %td.gl-text-right{ class: 'gl-p-5!' }
- = @users_statistics&.with_highest_role_guest
- %tr
- %td.gl-p-5!
- = s_('AdminArea|Users with highest role')
- %strong
- = s_('AdminArea|Reporter')
- %td.gl-text-right{ class: 'gl-p-5!' }
- = @users_statistics&.with_highest_role_reporter
- %tr
- %td.gl-p-5!
- = s_('AdminArea|Users with highest role')
- %strong
- = s_('AdminArea|Developer')
- %td.gl-text-right{ class: 'gl-p-5!' }
- = @users_statistics&.with_highest_role_developer
- %tr
- %td.gl-p-5!
- = s_('AdminArea|Users with highest role')
- %strong
- = s_('AdminArea|Maintainer')
- %td.gl-text-right{ class: 'gl-p-5!' }
- = @users_statistics&.with_highest_role_maintainer
- %tr
- %td.gl-p-5!
- = s_('AdminArea|Users with highest role')
- %strong
- = s_('AdminArea|Owner')
- %td.gl-text-right{ class: 'gl-p-5!' }
- = @users_statistics&.with_highest_role_owner
- %tr
- %td.gl-p-5!
- = s_('AdminArea|Bots')
- %td.gl-text-right{ class: 'gl-p-5!' }
- = @users_statistics&.bots
- = render_if_exists 'admin/dashboard/billable_users_row'
- %tr.bg-gray-light.gl-text-gray-900
- %td.gl-p-5!
- %strong
- = s_('AdminArea|Active users')
- %td.gl-text-right{ class: 'gl-p-5!' }
- %strong
- = @users_statistics&.active
+ = render_if_exists 'admin/dashboard/stats_active_users_row', users_statistics: @users_statistics
+
%tr.bg-gray-light.gl-text-gray-900
%td.gl-p-5!
%strong
@@ -70,6 +22,8 @@
%td.gl-p-5!
%strong
= s_('AdminArea|Total users')
+ %span
+ (#{s_('AdminArea|active users + blocked users')})
%td.gl-text-right{ class: 'gl-p-5!' }
%strong
= @users_statistics&.total
diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml
index 829e9f508e0..bfa17daf1c2 100644
--- a/app/views/admin/projects/show.html.haml
+++ b/app/views/admin/projects/show.html.haml
@@ -135,7 +135,7 @@
- c.header do
= s_('ProjectSettings|Transfer project')
- c.body do
- = form_for @project, url: transfer_admin_project_path(@project), method: :put do |f|
+ = gitlab_ui_form_for @project, url: transfer_admin_project_path(@project), method: :put do |f|
.form-group.row
.col-sm-3.col-form-label
= f.label :new_namespace_id, _("Namespace")
@@ -147,13 +147,13 @@
.form-group.row
.offset-sm-3.col-sm-9
- = f.submit _('Transfer'), class: 'gl-button btn btn-confirm'
+ = f.submit _('Transfer'), pajamas_button: true
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5 repository-check' }) do |c|
- c.header do
= _("Repository check")
- c.body do
- = form_for @project, url: repository_check_admin_project_path(@project), method: :post do |f|
+ = gitlab_ui_form_for @project, url: repository_check_admin_project_path(@project), method: :post do |f|
.form-group
- if @project.last_repository_check_at.nil?
= _("This repository has never been checked.")
@@ -167,7 +167,7 @@
= link_to sprite_icon('question-o'), help_page_path('administration/repository_checks')
.form-group
- = f.submit _('Trigger repository check'), class: 'gl-button btn btn-confirm'
+ = f.submit _('Trigger repository check'), pajamas_button: true
.col-md-6
- if @group
diff --git a/app/views/admin/runners/edit.html.haml b/app/views/admin/runners/edit.html.haml
index ccdfe67ea77..e586a7a965e 100644
--- a/app/views/admin/runners/edit.html.haml
+++ b/app/views/admin/runners/edit.html.haml
@@ -24,7 +24,8 @@
dismissible: false,
title: project.full_name) do |c|
= c.actions do
- = link_to _('Disable'), admin_namespace_project_runner_project_path(project.namespace, project, runner_project), method: :delete, class: 'btn gl-alert-action btn-confirm btn-md gl-button'
+ = render Pajamas::ButtonComponent.new(variant: :confirm, href: admin_namespace_project_runner_project_path(project.namespace, project, runner_project), method: :delete) do
+ = _('Disable')
%table.table{ data: { testid: 'unassigned-projects' } }
%thead
@@ -47,7 +48,8 @@
= project.full_name
%td
.float-right
- = form_for project.runner_projects.new, url: admin_namespace_project_runner_projects_path(project.namespace, project), method: :post do |f|
+ = gitlab_ui_form_for project.runner_projects.new, url: admin_namespace_project_runner_projects_path(project.namespace, project), method: :post do |f|
= f.hidden_field :runner_id, value: @runner.id
- = f.submit _('Enable'), class: 'gl-button btn btn-sm'
+ = render Pajamas::ButtonComponent.new(size: :small, type: :submit) do
+ = _('Enable')
= paginate_without_count @projects
diff --git a/app/views/admin/spam_logs/_spam_log.html.haml b/app/views/admin/spam_logs/_spam_log.html.haml
index 2d0ea585735..183667679b9 100644
--- a/app/views/admin/spam_logs/_spam_log.html.haml
+++ b/app/views/admin/spam_logs/_spam_log.html.haml
@@ -23,19 +23,36 @@
= truncate(spam_log.description, length: 100)
%td
- if user
- = link_to _('Remove user'), admin_spam_log_path(spam_log, remove_user: true),
- data: { confirm: _("USER %{user_name} WILL BE REMOVED! Are you sure?") % { user_name: user.name }, confirm_btn_variant: 'danger' }, aria: { label: _('Remove user') }, method: :delete, class: "gl-button btn btn-sm btn-danger"
+ = render Pajamas::ButtonComponent.new(size: :small,
+ variant: :danger,
+ method: :delete,
+ href: admin_spam_log_path(spam_log, remove_user: true),
+ button_options: { data: { confirm: _("USER %{user_name} WILL BE REMOVED! Are you sure?") % { user_name: user.name }, confirm_btn_variant: 'danger' }, aria: { label: _('Remove user') } }) do
+ = _('Remove user')
%td
-# TODO: Remove conditonal once spamcheck supports this https://gitlab.com/gitlab-com/gl-security/engineering-and-research/automation-team/spam/spamcheck/-/issues/190
- if akismet_enabled?
- if spam_log.submitted_as_ham?
- .gl-button.btn.btn-default.btn-sm.disabled.gl-mb-3
+ = render Pajamas::ButtonComponent.new(size: :small,
+ button_options: { class: 'disabled gl-mb-3'}) do
= _("Submitted as ham")
- else
- = link_to _('Submit as ham'), mark_as_ham_admin_spam_log_path(spam_log), method: :post, class: 'gl-button btn btn-default btn-sm gl-mb-3'
+ = render Pajamas::ButtonComponent.new(size: :small,
+ method: :post,
+ href: mark_as_ham_admin_spam_log_path(spam_log),
+ button_options: { class: ' gl-mb-3' }) do
+ = _('Submit as ham')
- if user && !user.blocked?
- = link_to _('Block user'), block_admin_user_path(user), data: {confirm: _('USER WILL BE BLOCKED! Are you sure?')}, method: :put, class: "gl-button btn btn-default btn-sm gl-mb-3"
+ = render Pajamas::ButtonComponent.new(size: :small,
+ method: :put,
+ href: block_admin_user_path(user),
+ button_options: { class: 'gl-mb-3', data: {confirm: _('USER WILL BE BLOCKED! Are you sure?')} }) do
+ = _('Block user')
- else
- .gl-button.btn.btn-default.btn-sm.disabled.gl-mb-3
- Already blocked
- = link_to _('Remove log'), [:admin, spam_log], remote: true, method: :delete, class: "gl-button btn btn-default btn-sm btn-close js-remove-tr"
+ = render Pajamas::ButtonComponent.new(size: :small, button_options: { class: 'disabled gl-mb-3'}) do
+ = _("Already blocked")
+ = render Pajamas::ButtonComponent.new(size: :small,
+ method: :delete,
+ href: [:admin, spam_log],
+ button_options: { class: 'js-remove-tr', remote: true, }) do
+ = _('Remove log')
diff --git a/app/views/admin/topics/index.html.haml b/app/views/admin/topics/index.html.haml
index 2f39f27208e..6d64fa1983f 100644
--- a/app/views/admin/topics/index.html.haml
+++ b/app/views/admin/topics/index.html.haml
@@ -1,4 +1,5 @@
- page_title _("Topics")
+- add_page_specific_style 'page_bundles/search'
.top-area
.nav-controls.gl-w-full.gl-mt-3.gl-mb-3
diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml
index b255354f2c1..472ba2f84a0 100644
--- a/app/views/admin/users/_access_levels.html.haml
+++ b/app/views/admin/users/_access_levels.html.haml
@@ -10,6 +10,7 @@
.form-group.gl-form-group{ role: 'group' }
= f.gitlab_ui_checkbox_component :can_create_group, s_('AdminUsers|Can create group')
+ = f.gitlab_ui_checkbox_component :private_profile, s_('AdminUsers|Private profile')
%fieldset.form-group.gl-form-group
%legend.col-form-label.col-form-label
diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml
index 96e6a264d8e..73027441fe6 100644
--- a/app/views/admin/users/_users.html.haml
+++ b/app/views/admin/users/_users.html.haml
@@ -48,7 +48,8 @@
.nav-controls
= render_if_exists 'admin/users/admin_email_users'
= render_if_exists 'admin/users/admin_export_user_permissions'
- = link_to s_('AdminUsers|New user'), new_admin_user_path, class: 'btn gl-button btn-confirm btn-search float-right'
+ = render Pajamas::ButtonComponent.new(variant: :confirm, href: new_admin_user_path) do
+ = s_('AdminUsers|New user')
.filtered-search-block.row-content-block.border-top-0
= form_tag admin_users_path, method: :get do
diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml
index 7edea81a123..f7d4121e6e0 100644
--- a/app/views/admin/users/show.html.haml
+++ b/app/views/admin/users/show.html.haml
@@ -76,6 +76,10 @@
%strong
= @user.can_create_group ? _('Yes') : _('No')
%li
+ %span.light= _('Private profile:')
+ %strong
+ = @user.private_profile ? _('Yes') : _('No')
+ %li
%span.light= _('Personal projects limit:')
%strong
= @user.projects_limit
diff --git a/app/views/ci/group_variables/_index.html.haml b/app/views/ci/group_variables/_index.html.haml
index eb49a9a0261..c8c970f3c2f 100644
--- a/app/views/ci/group_variables/_index.html.haml
+++ b/app/views/ci/group_variables/_index.html.haml
@@ -1,4 +1,4 @@
-- variables = @project.group.self_and_ancestors.map(&:variables).flatten
+- variables = @project.group.self_and_ancestors.flat_map(&:variables)
.ci-variable-table
%table.gl-table.gl-w-full.gl-table-layout-fixed
diff --git a/app/views/ci/status/_badge.html.haml b/app/views/ci/status/_badge.html.haml
index 5114387984b..e3b409dea76 100644
--- a/app/views/ci/status/_badge.html.haml
+++ b/app/views/ci/status/_badge.html.haml
@@ -1,7 +1,7 @@
- status = local_assigns.fetch(:status)
- link = local_assigns.fetch(:link, true)
- title = local_assigns.fetch(:title, nil)
-- css_classes = "ci-status ci-#{status.group} #{'has-tooltip' if title.present?}"
+- css_classes = "gl-display-inline-flex gl-align-items-center gl-gap-2 gl-line-height-0 gl-px-3 gl-py-2 gl-rounded-base ci-status ci-#{status.group} #{'has-tooltip' if title.present?}"
- if link && status.has_details?
= link_to status.details_path, class: css_classes, title: title, data: { html: title.present? } do
diff --git a/app/views/ci/variables/_content.html.haml b/app/views/ci/variables/_content.html.haml
index 37043a207ff..65e57d68288 100644
--- a/app/views/ci/variables/_content.html.haml
+++ b/app/views/ci/variables/_content.html.haml
@@ -2,7 +2,7 @@
= link_to _('Learn more.'), help_page_path('ci/variables/index'), target: '_blank', rel: 'noopener noreferrer'
%p
= _('Variables can have several attributes.')
- = link_to _('Learn more.'), help_page_path('ci/variables/index', anchor: 'add-a-cicd-variable-to-an-instance'), target: '_blank', rel: 'noopener noreferrer'
+ = link_to _('Learn more.'), help_page_path('ci/variables/index', anchor: 'define-a-cicd-variable-in-the-ui'), target: '_blank', rel: 'noopener noreferrer'
%ul
%li
= html_escape(_('%{code_open}Protected:%{code_close} Only exposed to protected branches or protected tags.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
diff --git a/app/views/ci/variables/_index.html.haml b/app/views/ci/variables/_index.html.haml
index fdbf5132d40..af98025d257 100644
--- a/app/views/ci/variables/_index.html.haml
+++ b/app/views/ci/variables/_index.html.haml
@@ -4,7 +4,7 @@
= render Pajamas::AlertComponent.new(variant: :warning, show_icon: false, dismissible: false,
alert_options: { class: 'gl-mb-3'}) do |c|
= c.body do
- - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('ci/variables/index', anchor: 'protected-cicd-variables') }
+ - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('ci/variables/index', anchor: 'protect-a-cicd-variable') }
= _('Environment variables are configured by your administrator to be %{link_start}protected%{link_end} by default.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
- is_group = !@group.nil?
@@ -23,10 +23,10 @@
aws_tip_deploy_link: help_page_path('ci/cloud_deployment/index.md', anchor: 'deploy-your-application-to-ecs'),
aws_tip_commands_link: help_page_path('ci/cloud_deployment/index.md', anchor: 'use-an-image-to-run-aws-commands'),
aws_tip_learn_link: help_page_path('ci/cloud_deployment/index.md'),
- contains_variable_reference_link: help_page_path('ci/variables/index', anchor: 'expand-cicd-variables'),
- protected_environment_variables_link: help_page_path('ci/variables/index', anchor: 'protected-cicd-variables'),
+ contains_variable_reference_link: help_page_path('ci/variables/index', anchor: 'prevent-cicd-variable-expansion'),
+ protected_environment_variables_link: help_page_path('ci/variables/index', anchor: 'protect-a-cicd-variable'),
masked_environment_variables_link: help_page_path('ci/variables/index', anchor: 'mask-a-cicd-variable'),
- environment_scope_link: help_page_path('ci/environments/index', anchor: 'scope-environments-with-specs') } }
+ environment_scope_link: help_page_path('ci/environments/index', anchor: 'limit-the-environment-scope-of-a-cicd-variable') } }
- if !@group && @project.group
.settings-header.border-top.gl-mt-6
diff --git a/app/views/clusters/clusters/_advanced_settings.html.haml b/app/views/clusters/clusters/_advanced_settings.html.haml
index 8eba398fd13..ddc3b7d05e1 100644
--- a/app/views/clusters/clusters/_advanced_settings.html.haml
+++ b/app/views/clusters/clusters/_advanced_settings.html.haml
@@ -14,7 +14,7 @@
= html_escape(s_('ClusterIntegration|Manage your Kubernetes cluster by visiting %{provider_link}')) % { provider_link: provider_link }
.sub-section.form-group
- = form_for @cluster, url: clusterable.cluster_path(@cluster), as: :cluster, html: { class: 'cluster_management_form' } do |field|
+ = gitlab_ui_form_for @cluster, url: clusterable.cluster_path(@cluster), as: :cluster, html: { class: 'cluster_management_form' } do |field|
%h4
= s_('ClusterIntegration|Cluster management project')
@@ -24,7 +24,7 @@
.text-muted
= html_escape(s_('ClusterIntegration|A cluster management project can be used to run deployment jobs with Kubernetes %{code_open}cluster-admin%{code_close} privileges.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
= link_to _('More information'), help_page_path('user/clusters/management_project.md'), target: '_blank', rel: 'noopener noreferrer'
- = field.submit _('Save changes'), class: 'btn gl-button btn-confirm'
+ = field.submit _('Save changes'), pajamas_button: true
.sub-section.form-group
%h4
@@ -35,7 +35,8 @@
= s_("ClusterIntegration|This is necessary if your integration has become out of sync. The cache is repopulated during the next CI job that requires namespace and service accounts.")
- else
= s_("ClusterIntegration|This is necessary to clear existing environment-namespace associations from clusters previously managed by GitLab.")
- = link_to(s_('ClusterIntegration|Clear cluster cache'), clusterable.clear_cluster_cache_path(@cluster), method: :delete, class: 'btn gl-button btn-confirm')
+ = render Pajamas::ButtonComponent.new(method: :delete, href: clusterable.clear_cluster_cache_path(@cluster)) do
+ = s_('ClusterIntegration|Clear cluster cache')
.sub-section.form-group
%h4.text-danger
diff --git a/app/views/dashboard/todos/_todo.html.haml b/app/views/dashboard/todos/_todo.html.haml
index 9dfeaa3d07d..f97c0e2b9b6 100644
--- a/app/views/dashboard/todos/_todo.html.haml
+++ b/app/views/dashboard/todos/_todo.html.haml
@@ -1,7 +1,7 @@
%li.todo.gl-hover-border-blue-200.gl-hover-bg-blue-50.gl-hover-cursor-pointer.gl-relative{ class: "todo-#{todo.done? ? 'done' : 'pending'}", id: dom_id(todo) }
.gl-display-flex.gl-flex-direction-column.gl-sm-flex-direction-row.gl-sm-align-items-center
.todo-item.gl-overflow-hidden.gl-overflow-x-auto.gl-align-self-center.gl-w-full{ data: { qa_selector: "todo_item_container" } }
- .todo-title.gl-pt-2.gl-pb-3.gl-px-2.gl-md-mb-1.gl-font-sm.gl-text-gray-500
+ .todo-title.gl-pt-2.gl-pb-3.gl-px-2.gl-md-mb-1.gl-font-sm.gl-text-secondary
= todo_target_state_pill(todo)
@@ -16,7 +16,7 @@
%span.todo-label
- if todo.target
- = link_to todo_target_name(todo), todo_target_path(todo), class: 'todo-target-link gl-text-gray-500! gl-text-decoration-none!', :'aria-describedby' => dom_id(todo) + "_describer", :'aria-label' => todo_target_aria_label(todo)
+ = link_to todo_target_name(todo), todo_target_path(todo), class: 'todo-target-link gl-text-secondary! gl-text-decoration-none!', :'aria-describedby' => dom_id(todo) + "_describer", :'aria-label' => todo_target_aria_label(todo)
- else
= _("(removed)")
@@ -25,29 +25,30 @@
= author_avatar(todo, size: 24)
.todo-note
- if todo_author_display?(todo)
- .author-name.bold.gl-display-inline
+ .author-name.bold.gl-display-inline<
- if todo.author
= link_to_author(todo, self_added: todo.self_added?)
- else
= _('(removed)')
+ - if todo.note.present?
+ \:
%span.action-name{ data: { qa_selector: "todo_action_name_content" } }<
- = todo_action_name(todo)
- - if todo.note.present?
- \:
- - unless todo.note.present? || todo.self_assigned?
- \.
+ - if !todo.note.present?
+ = todo_action_name(todo)
+ - unless todo.self_assigned?
+ \.
- if todo.self_assigned?
%span.action-name<
= todo_self_addressing(todo)
\.
- if todo.note.present?
- %span.action-description.gl-font-style-italic<
- = first_line_in_markdown(todo, :body, 100, is_todo: true, project: todo.project, group: todo.group)
+ %span.action-description<
+ = first_line_in_markdown(todo, :body, 125, is_todo: true, project: todo.project, group: todo.group)
.todo-timestamp.gl-white-space-nowrap.gl-sm-ml-3.gl-mt-2.gl-mb-2.gl-sm-my-0.gl-px-2.gl-sm-px-0
- %span.todo-timestamp.gl-font-sm.gl-text-gray-500
+ %span.todo-timestamp.gl-font-sm.gl-text-secondary
= todo_due_date(todo)
#{time_ago_with_tooltip(todo.created_at)}
diff --git a/app/views/devise/sessions/two_factor.html.haml b/app/views/devise/sessions/two_factor.html.haml
index fd20ff9a418..f63f1aa9197 100644
--- a/app/views/devise/sessions/two_factor.html.haml
+++ b/app/views/devise/sessions/two_factor.html.haml
@@ -3,7 +3,7 @@
.login-box.gl-p-5
.login-body
- if @user.two_factor_otp_enabled?
- = form_for(resource, as: resource_name, url: session_path(resource_name), method: :post, html: { class: "edit_user gl-show-field-errors js-2fa-form #{'hidden' if @user.two_factor_webauthn_u2f_enabled?}" }) do |f|
+ = gitlab_ui_form_for(resource, as: resource_name, url: session_path(resource_name), method: :post, html: { class: "edit_user gl-show-field-errors js-2fa-form #{'hidden' if @user.two_factor_webauthn_u2f_enabled?}" }) do |f|
- resource_params = params[resource_name].presence || params
= f.hidden_field :remember_me, value: resource_params.fetch(:remember_me, 0)
%div
@@ -11,6 +11,6 @@
= f.text_field :otp_attempt, class: 'form-control gl-form-input', required: true, autofocus: true, autocomplete: 'off', title: _('This field is required.'), data: { qa_selector: 'two_fa_code_field' }
%p.form-text.text-muted.hint= _("Enter the code from the two-factor app on your mobile device. If you've lost your device, you may enter one of your recovery codes.")
.prepend-top-20
- = f.submit _("Verify code"), class: "gl-button btn btn-confirm", data: { qa_selector: 'verify_code_button' }
+ = f.submit _("Verify code"), pajamas_button: true, data: { qa_selector: 'verify_code_button' }
- if @user.two_factor_webauthn_u2f_enabled?
= render "authentication/authenticate", params: params, resource: resource, resource_name: resource_name, render_remember_me: true, target_path: new_user_session_path
diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml
index a3a5fe690a7..b9fe61229bc 100644
--- a/app/views/devise/shared/_signup_box.html.haml
+++ b/app/views/devise/shared/_signup_box.html.haml
@@ -6,7 +6,7 @@
- if show_omniauth_providers && omniauth_providers_placement == :top
= render 'devise/shared/signup_omniauth_providers_top'
- = form_for(resource, as: "new_#{resource_name}", url: url, html: { class: 'new_user gl-show-field-errors js-arkose-labs-form', 'aria-live' => 'assertive' }, data: { testid: 'signup-form' }) do |f|
+ = gitlab_ui_form_for(resource, as: "new_#{resource_name}", url: url, html: { class: 'new_user gl-show-field-errors js-arkose-labs-form', 'aria-live' => 'assertive' }, data: { testid: 'signup-form' }) do |f|
.devise-errors
= render 'devise/shared/error_messages', resource: resource
- if Gitlab::CurrentSettings.invisible_captcha_enabled
@@ -72,7 +72,7 @@
= recaptcha_tags nonce: content_security_policy_nonce
.submit-container.gl-mt-5
- = f.submit button_text, class: 'btn gl-button btn-confirm gl-display-block gl-w-full', data: { qa_selector: 'new_user_register_button' }
+ = f.submit button_text, pajamas_button: true, class: 'gl-w-full', data: { qa_selector: 'new_user_register_button' }
- if Gitlab::CurrentSettings.sign_in_text.present? && Feature.enabled?(:restyle_login_page, @project)
.gl-pt-5
= markdown_field(Gitlab::CurrentSettings.current_application_settings, :sign_in_text)
diff --git a/app/views/devise/shared/_signup_omniauth_provider_list.haml b/app/views/devise/shared/_signup_omniauth_provider_list.haml
index 5c085555872..a96c8d6358b 100644
--- a/app/views/devise/shared/_signup_omniauth_provider_list.haml
+++ b/app/views/devise/shared/_signup_omniauth_provider_list.haml
@@ -1,4 +1,4 @@
-- register_omniauth_params = Feature.enabled?(:update_oauth_registration_flow) ? { intent: :register } : {}
+- register_omniauth_params = { intent: :register }
- if Feature.enabled?(:restyle_login_page, @project)
.gl-text-center.gl-pt-5
%label.gl-font-weight-normal
diff --git a/app/views/errors/omniauth_error.html.haml b/app/views/errors/omniauth_error.html.haml
index 3090c823677..c48e12561a7 100644
--- a/app/views/errors/omniauth_error.html.haml
+++ b/app/views/errors/omniauth_error.html.haml
@@ -2,18 +2,16 @@
.container
= render partial: "shared/errors/graphic_422", formats: :svg
- %h3
+ %h2
= _('Sign-in using %{provider} auth failed') % { provider: @provider }
-
- %p.light.subtitle
- = _('Sign-in failed because %{error}.') % { error: @error }
-
- %p
- = _('Try logging in using your username or email. If you have forgotten your password, try recovering it')
-
- = link_to _('Sign in'), new_session_path(:user), class: 'gl-button btn primary'
- = link_to _('Recover password'), new_password_path(:user), class: 'gl-button btn secondary'
-
- %hr
- %p.light
- = _('If none of the options work, try contacting a GitLab administrator.')
+ .gl-mb-5
+ = @error
+ .gl-mb-5
+ = render Pajamas::ButtonComponent.new(variant: :confirm,
+ href: new_session_path(:user),
+ button_options: { class: 'gl-mr-2' }) do
+ = _('Sign in')
+ = render Pajamas::ButtonComponent.new(href: new_password_path(:user)) do
+ = _('Recover password')
+ %div
+ = _('If you are unable to sign in or recover your password, contact a GitLab administrator.')
diff --git a/app/views/groups/_delete_project_button.html.haml b/app/views/groups/_delete_project_button.html.haml
index 54a99319418..8321e86c44f 100644
--- a/app/views/groups/_delete_project_button.html.haml
+++ b/app/views/groups/_delete_project_button.html.haml
@@ -1 +1,2 @@
-= link_to _('Delete'), project, data: { confirm: remove_project_message(project) }, method: :delete, class: "btn gl-button btn-danger"
+= render Pajamas::ButtonComponent.new(href: project, variant: :danger, method: :delete, button_options: { data: { confirm: remove_project_message(project) } }) do
+ = _('Delete')
diff --git a/app/views/groups/_group_admin_settings.html.haml b/app/views/groups/_group_admin_settings.html.haml
index 0b26db64ffa..8547795b4b7 100644
--- a/app/views/groups/_group_admin_settings.html.haml
+++ b/app/views/groups/_group_admin_settings.html.haml
@@ -36,4 +36,4 @@
= f.gitlab_ui_checkbox_component :runner_registration_enabled,
s_('Runners|New group runners can be registered'),
checkbox_options: { checked: @group.runner_registration_enabled && !parent_disabled, disabled: parent_disabled },
- help_text: s_('Runners|Existing runners are not affected. To permit runner registration for all groups, enable this setting in the Admin Area in Settings &gt CI/CD.').html_safe
+ help_text: s_('Runners|Existing runners are not affected. To permit runner registration for all groups, enable this setting in the Admin Area in Settings &gt; CI/CD.').html_safe
diff --git a/app/views/groups/_home_panel.html.haml b/app/views/groups/_home_panel.html.haml
index 1494990e427..fac0fd3d2a4 100644
--- a/app/views/groups/_home_panel.html.haml
+++ b/app/views/groups/_home_panel.html.haml
@@ -12,6 +12,7 @@
= @group.name
%span.visibility-icon.gl-text-secondary.has-tooltip.gl-ml-2{ data: { container: 'body' }, title: visibility_icon_description(@group) }
= visibility_level_icon(@group.visibility_level, options: {class: 'icon'})
+ = render_if_exists 'shared/tier_badge', source: @group, source_type: 'Group'
.home-panel-metadata.gl-text-secondary.gl-font-base.gl-font-weight-normal.gl-line-height-normal{ data: { qa_selector: 'group_id_content' }, itemprop: 'identifier' }
- if can?(current_user, :read_group, @group)
%span.gl-display-inline-block.gl-vertical-align-middle
@@ -24,25 +25,23 @@
- if current_user
.home-panel-buttons.gl-display-flex.gl-justify-content-md-end.gl-align-items-center.gl-flex-wrap.gl-gap-3{ data: { testid: 'group-buttons' } }
- if current_user.admin?
- = link_to [:admin, @group], class: 'btn btn-default gl-button btn-icon', title: _('View group in admin area'),
- data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
- = sprite_icon('admin')
+ = render Pajamas::ButtonComponent.new(href: [:admin, @group], icon: 'admin', button_options: { title: _('View group in admin area'), data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } })
- if @notification_setting
.js-vue-notification-dropdown{ data: { disabled: emails_disabled.to_s, dropdown_items: notification_dropdown_items(@notification_setting).to_json, notification_level: @notification_setting.level, help_page_path: help_page_path('user/profile/notifications'), group_id: @group.id, container_class: 'gl-vertical-align-top', no_flip: 'true' } }
- if can_create_subgroups
.gl-sm-w-auto.gl-w-full
- = link_to _("New subgroup"),
- new_group_path(parent_id: @group.id, anchor: 'create-group-pane'),
- class: "btn btn-default gl-button gl-sm-w-auto gl-w-full",
- data: { qa_selector: 'new_subgroup_button' }
+ = render Pajamas::ButtonComponent.new(href: new_group_path(parent_id: @group.id, anchor: 'create-group-pane'), button_options: { data: { qa_selector: 'new_subgroup_button' }, class: 'gl-sm-w-auto gl-w-full'}) do
+ = _("New subgroup")
+
- if can_create_projects
.gl-sm-w-auto.gl-w-full
- = link_to _("New project"), new_project_path(namespace_id: @group.id), class: "btn btn-confirm gl-button gl-sm-w-auto gl-w-full", data: { qa_selector: 'new_project_button' }
+ = render Pajamas::ButtonComponent.new(href: new_project_path(namespace_id: @group.id), variant: :confirm, button_options: { data: { qa_selector: 'new_project_button' }, class: 'gl-sm-w-auto gl-w-full' }) do
+ = _('New project')
- if @group.description.present?
.group-home-desc.mt-1
.home-panel-description
.home-panel-description-markdown.read-more-container{ itemprop: 'description' }
= markdown_field(@group, :description)
- %button.gl-button.btn.btn-link.js-read-more-trigger.d-lg-none{ type: "button" }
+ = render Pajamas::ButtonComponent.new(variant: :link, button_options: { class: 'js-read-more-trigger gl-lg-display-none' }) do
= _("Read more")
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 4a4bdfc6714..24ba060a89a 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,7 +4,7 @@
.gl-border-l-solid.gl-border-r-solid.gl-border-t-solid.gl-border-gray-100.gl-border-1.gl-p-5.gl-mt-4
.gl-display-flex.gl-align-items-center
%h4.gl-display-flex
- = s_('GroupsNew|Import groups from another instance of GitLab')
+ = s_('GroupsNew|Import groups by direct transfer')
= link_to _('History'), history_import_bulk_imports_path, class: 'gl-link gl-ml-auto'
- if bulk_imports_disabled
@@ -30,12 +30,12 @@
= s_('GroupsNew|Not all related objects are migrated. %{docs_link_start}More info%{docs_link_end}.').html_safe % { docs_link_start: docs_link_start, docs_link_end: docs_link_end }
%p.gl-mt-3
- = s_('GroupsNew|Provide credentials for another instance of GitLab to import your groups directly.')
+ = s_('GroupsNew|Provide credentials for the source instance to import from. You can provide this instance as a source to move groups in this instance.')
.form-group.gl-display-flex.gl-flex-direction-column
- = f.label :bulk_import_gitlab_url, s_('GroupsNew|GitLab source URL'), for: 'import_gitlab_url'
+ = f.label :bulk_import_gitlab_url, s_('GroupsNew|GitLab source instance URL'), for: 'import_gitlab_url'
= f.text_field :bulk_import_gitlab_url, disabled: bulk_imports_disabled, placeholder: 'https://gitlab.example.com', class: 'gl-form-input col-xs-12 col-sm-8',
required: true,
- title: s_('GroupsNew|Please fill in GitLab source URL.'),
+ title: s_('GroupsNew|Enter the URL for the source instance.'),
id: 'import_gitlab_url',
data: { qa_selector: 'import_gitlab_url' }
.form-group.gl-display-flex.gl-flex-direction-column
diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml
index 657a582bdc5..b75fda2f344 100644
--- a/app/views/groups/new.html.haml
+++ b/app/views/groups/new.html.haml
@@ -16,9 +16,8 @@
#import-group-pane.tab-pane
- if import_sources_enabled?
- - if BulkImports::Features.enabled?
- = render 'import_group_from_another_instance_panel'
- .gl-mt-7.gl-border-b-solid.gl-border-gray-100.gl-border-1
+ = render 'import_group_from_another_instance_panel'
+ .gl-mt-7.gl-border-b-solid.gl-border-gray-100.gl-border-1
= render 'import_group_from_file_panel'
- else
.nothing-here-block
diff --git a/app/views/groups/settings/repository/show.html.haml b/app/views/groups/settings/repository/show.html.haml
index a15652b3179..c6bf2d66683 100644
--- a/app/views/groups/settings/repository/show.html.haml
+++ b/app/views/groups/settings/repository/show.html.haml
@@ -8,5 +8,7 @@
= render "shared/deploy_tokens/index", group_or_project: @group, description: deploy_token_description
= render "default_branch", group: @group
+= render_if_exists "protected_branches/protected_branches", protected_branch_entity: @group
+
- if can?(current_user, :change_push_rules, @group)
= render "push_rules"
diff --git a/app/views/ide/_show.html.haml b/app/views/ide/_show.html.haml
index b18b5f1574b..c968d84fc36 100644
--- a/app/views/ide/_show.html.haml
+++ b/app/views/ide/_show.html.haml
@@ -1,4 +1,4 @@
-- page_title _('IDE')
+- page_title _("IDE"), @project.full_name
- unless use_new_web_ide?
- add_page_specific_style 'page_bundles/build'
diff --git a/app/views/layouts/_loading_hints.html.haml b/app/views/layouts/_loading_hints.html.haml
index b1d1447ae2a..60ab6927fd2 100644
--- a/app/views/layouts/_loading_hints.html.haml
+++ b/app/views/layouts/_loading_hints.html.haml
@@ -18,4 +18,7 @@
-# See https://github.com/web-platform-tests/wpt/pull/36930
%link{ rel: 'preload', href: font_path('gitlab-sans/GitLabSans.woff2'), as: 'font', crossorigin: css_crossorigin }
%link{ rel: 'preload', href: font_path('jetbrains-mono/JetBrainsMono.woff2'), as: 'font', crossorigin: css_crossorigin }
+ %link{ rel: 'preload', href: font_path('jetbrains-mono/JetBrainsMono-Bold.woff2'), as: 'font', crossorigin: css_crossorigin }
+ %link{ rel: 'preload', href: font_path('jetbrains-mono/JetBrainsMono-Italic.woff2'), as: 'font', crossorigin: css_crossorigin }
+ %link{ rel: 'preload', href: font_path('jetbrains-mono/JetBrainsMono-BoldItalic.woff2'), as: 'font', crossorigin: css_crossorigin }
= preload_link_tag(path_to_stylesheet('fonts'), crossorigin: css_crossorigin)
diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml
index bb1d051f71f..010ddd8da39 100644
--- a/app/views/layouts/_page.html.haml
+++ b/app/views/layouts/_page.html.haml
@@ -1,5 +1,10 @@
+- if show_super_sidebar?
+ - @left_sidebar = true
.layout-page.hide-when-top-nav-responsive-open{ class: page_with_sidebar_class }
- - if defined?(nav) && nav
+ - if show_super_sidebar?
+ - sidebar_data = super_sidebar_context(current_user).to_json
+ %aside.js-super-sidebar.nav-sidebar{ data: { root_path: root_path, sidebar: sidebar_data, toggle_new_nav_endpoint: profile_preferences_url } }
+ - elsif defined?(nav) && nav
= render "layouts/nav/sidebar/#{nav}"
.content-wrapper.content-wrapper-margin{ class: "#{@content_wrapper_class}" }
.mobile-overlay
diff --git a/app/views/layouts/_snowplow.html.haml b/app/views/layouts/_snowplow.html.haml
index 22cc8027202..0b5c4730b64 100644
--- a/app/views/layouts/_snowplow.html.haml
+++ b/app/views/layouts/_snowplow.html.haml
@@ -7,7 +7,7 @@
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
- n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","#{asset_url('snowplow/sp.js')}","snowplow"));
+ n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","#{escaped_url(asset_url('snowplow/sp.js'))}","snowplow"));
window.snowplowOptions = #{Gitlab::Tracking.options(@group).to_json}
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 455d18a5ae8..fa79219df4a 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -11,7 +11,14 @@
= render "layouts/visual_review" if ENV['REVIEW_APPS_ENABLED']
= render 'peek/bar'
= header_message
- = render partial: "layouts/header/default", locals: { project: @project, group: @group }
+
+ - if show_super_sidebar? # TODO: Move this CSS to a better place
+ :css
+ body {
+ --header-height: 0px;
+ }
+ - else
+ = render partial: "layouts/header/default", locals: { project: @project, group: @group }
= render 'layouts/page', sidebar: sidebar, nav: nav
= footer_message
diff --git a/app/views/layouts/dashboard.html.haml b/app/views/layouts/dashboard.html.haml
index c10be282952..028c22fe9e5 100644
--- a/app/views/layouts/dashboard.html.haml
+++ b/app/views/layouts/dashboard.html.haml
@@ -1,6 +1,9 @@
- page_title _("Dashboard")
- header_title _("Dashboard"), root_path unless header_title
-- sidebar "dashboard"
-- @hide_breadcrumbs = true
+- if Feature.enabled?(:your_work_sidebar, current_user)
+ - @left_sidebar = true
+ - nav "your_work"
+- else
+ - @hide_breadcrumbs = true
= render template: "layouts/application"
diff --git a/app/views/layouts/explore.html.haml b/app/views/layouts/explore.html.haml
index 24751ab4e06..389dee853ba 100644
--- a/app/views/layouts/explore.html.haml
+++ b/app/views/layouts/explore.html.haml
@@ -1,7 +1,11 @@
- page_title _("Explore")
-- @hide_breadcrumbs = true
+
+- if current_user && Feature.enabled?(:your_work_sidebar, current_user)
+ - @left_sidebar = true
+ - nav "your_work"
- unless current_user
+ - @hide_breadcrumbs = true
- header_title _("Explore GitLab"), explore_root_path
= render template: "layouts/application"
diff --git a/app/views/layouts/header/_registration_enabled_callout.html.haml b/app/views/layouts/header/_registration_enabled_callout.html.haml
index 52c39fce961..5c70136a932 100644
--- a/app/views/layouts/header/_registration_enabled_callout.html.haml
+++ b/app/views/layouts/header/_registration_enabled_callout.html.haml
@@ -9,9 +9,7 @@
= c.body do
= _("Your GitLab instance allows anyone to register for an account, which is a security risk on public-facing GitLab instances. You should deactivate new sign ups if public users aren't expected to register for an account.")
= c.actions do
- = link_to general_admin_application_settings_path(anchor: 'js-signup-settings'), class: 'btn gl-alert-action btn-confirm btn-md gl-button' do
- %span.gl-button-text
- = _('Deactivate')
- %button.btn.gl-alert-action.btn-default.btn-md.gl-button.js-close
- %span.gl-button-text
- = _('Acknowledge')
+ = render Pajamas::ButtonComponent.new(variant: :confirm, href: general_admin_application_settings_path(anchor: 'js-signup-settings')) do
+ = _('Deactivate')
+ = render Pajamas::ButtonComponent.new(button_options: { class: 'js-close gl-ml-3'}) do
+ = _('Acknowledge')
diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml
index 717175e8eb3..24b301fadce 100644
--- a/app/views/layouts/nav/sidebar/_admin.html.haml
+++ b/app/views/layouts/nav/sidebar/_admin.html.haml
@@ -7,14 +7,14 @@
%span.sidebar-context-title
= _('Admin Area')
%ul.sidebar-top-level-items{ data: { qa_selector: 'admin_overview_submenu_content' } }
- = nav_link(controller: %w[dashboard admin admin/projects users groups admin/topics jobs runners gitaly_servers cohorts], html_options: {class: 'home'}) do
+ = nav_link(controller: %w[dashboard admin admin/projects users groups admin/topics gitaly_servers cohorts], html_options: {class: 'home'}) do
= link_to admin_root_path, class: 'has-sub-items' do
.nav-icon-container
= sprite_icon('overview')
%span.nav-item-name
= _('Overview')
%ul.sidebar-sub-level-items
- = nav_link(controller: %w[dashboard admin admin/projects users groups jobs runners gitaly_servers cohorts], html_options: { class: "fly-out-top-item" }) do
+ = nav_link(controller: %w[dashboard admin admin/projects users groups gitaly_servers cohorts], html_options: { class: "fly-out-top-item" }) do
= link_to admin_root_path do
%strong.fly-out-top-item-name
= _('Overview')
@@ -39,18 +39,31 @@
= link_to admin_topics_path, title: _('Topics') do
%span
= _('Topics')
- = nav_link path: 'jobs#index' do
- = link_to admin_jobs_path, title: _('Jobs') do
+ = nav_link(controller: :gitaly_servers) do
+ = link_to admin_gitaly_servers_path, title: 'Gitaly Servers' do
%span
- = _('Jobs')
- = nav_link path: ['runners#index', 'runners#show'] do
+ = _('Gitaly Servers')
+
+ = nav_link(controller: %w[runners jobs]) do
+ = link_to admin_runners_path, class: 'has-sub-items' do
+ .nav-icon-container
+ = sprite_icon('rocket')
+ %span.nav-item-name
+ = _('CI/CD')
+ %ul.sidebar-sub-level-items
+ = nav_link(controller: %w[runners jobs], html_options: { class: "fly-out-top-item" }) do
+ = link_to admin_runners_path do
+ %strong.fly-out-top-item-name
+ = _('CI/CD')
+ %li.divider.fly-out-top-item
+ = nav_link(controller: :runners) do
= link_to admin_runners_path, title: _('Runners') do
%span
= _('Runners')
- = nav_link(controller: :gitaly_servers) do
- = link_to admin_gitaly_servers_path, title: 'Gitaly Servers' do
+ = nav_link(controller: :jobs) do
+ = link_to admin_jobs_path, title: _('Jobs') do
%span
- = _('Gitaly Servers')
+ = _('Jobs')
= nav_link(controller: admin_analytics_nav_links) do
= link_to admin_dev_ops_reports_path, data: { qa_selector: 'admin_analytics_link' }, class: 'has-sub-items' do
diff --git a/app/views/layouts/nav/sidebar/_your_work.html.haml b/app/views/layouts/nav/sidebar/_your_work.html.haml
new file mode 100644
index 00000000000..0eba5045ab1
--- /dev/null
+++ b/app/views/layouts/nav/sidebar/_your_work.html.haml
@@ -0,0 +1 @@
+= render partial: 'shared/nav/sidebar', object: Sidebars::YourWork::Panel.new(Sidebars::Context.new(current_user: current_user, container: nil))
diff --git a/app/views/layouts/oauth_error.html.haml b/app/views/layouts/oauth_error.html.haml
index 03b387f8181..8d241dfd207 100644
--- a/app/views/layouts/oauth_error.html.haml
+++ b/app/views/layouts/oauth_error.html.haml
@@ -3,35 +3,10 @@
%head
%meta{ :content => "width=device-width, initial-scale=1, maximum-scale=1", :name => "viewport" }
%title= yield(:title)
+ = stylesheet_link_tag 'application_utilities'
+ %style
+ = Rails.application.assets_manifest.find_sources('errors.css').first.to_s.html_safe
:css
- body {
- color: #666;
- text-align: center;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- margin: auto;
- font-size: 16px;
- }
-
- .container {
- margin: auto 20px;
- }
-
- h3 {
- color: #456;
- font-size: 22px;
- font-weight: 600;
- margin-bottom: 6px;
- }
-
- p {
- max-width: 470px;
- margin: 16px auto;
- }
-
- .subtitle {
- margin: 0 auto 20px;
- }
-
svg {
width: 280px;
height: 280px;
@@ -82,46 +57,5 @@
25% {opacity: 1;}
}
- .light {
- color: #8D8D8D;
- }
-
- hr {
- max-width: 600px;
- margin: 18px auto;
- border: 0;
- border-top: 1px solid #EEE;
- }
-
- .btn {
- padding: 8px 14px;
- border-radius: 3px;
- border: 1px solid;
- display: inline-block;
- text-decoration: none;
- margin: 4px 8px;
- font-size: 14px;
- }
-
- .primary {
- color: #fff;
- background-color: #1aaa55;
- border-color: #168f48;
- }
-
- .primary:hover {
- background-color: #168f48;
- }
-
- .secondary {
- color: #1aaa55;
- background-color: #fff;
- border-color: #1aaa55;
- }
-
- .secondary:hover {
- background-color: #f3fff8;
- }
-
%body
= yield
diff --git a/app/views/layouts/snippets.html.haml b/app/views/layouts/snippets.html.haml
index 54b5ec85ccc..fd331d4b6c8 100644
--- a/app/views/layouts/snippets.html.haml
+++ b/app/views/layouts/snippets.html.haml
@@ -2,6 +2,10 @@
- header_title _("Snippets"), snippets_path
- snippets_upload_path = snippets_upload_path(@snippet, current_user)
+- if current_user && Feature.enabled?(:your_work_sidebar, current_user)
+ - @left_sidebar = true
+ - nav "your_work"
+
- content_for :page_specific_javascripts do
- if snippets_upload_path
= javascript_tag do
diff --git a/app/views/notify/access_token_expired_email.html.haml b/app/views/notify/access_token_expired_email.html.haml
index 1e7c07c2282..9c3ef4cfdff 100644
--- a/app/views/notify/access_token_expired_email.html.haml
+++ b/app/views/notify/access_token_expired_email.html.haml
@@ -1,7 +1,15 @@
%p
= _('Hi %{username}!') % { username: sanitize_name(@user.name) }
%p
- = _('One or more of your personal access tokens has expired.')
+ - if @token_names.empty?
+ = _('One or more of your personal access tokens has expired.')
+ - else
+ = _('The following personal access tokens have expired:')
+
+ %p
+ %ul
+ - @token_names.each do |token|
+ %li= token
%p
- - pat_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: @target_url }
+ - pat_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: @target_url }
= html_escape(_('You can create a new one or check them in your %{pat_link_start}personal access tokens%{pat_link_end} settings.')) % { pat_link_start: pat_link_start, pat_link_end: '</a>'.html_safe }
diff --git a/app/views/notify/access_token_expired_email.text.erb b/app/views/notify/access_token_expired_email.text.erb
index 4dc67e85dc2..6f6a9d38192 100644
--- a/app/views/notify/access_token_expired_email.text.erb
+++ b/app/views/notify/access_token_expired_email.text.erb
@@ -1,5 +1,13 @@
<%= _('Hi %{username}!') % { username: sanitize_name(@user.name) } %>
-<%= _('One or more of your personal access tokens has expired.') %>
+<%- if @token_names.empty? -%>
+<%= _('One or more of your personal access tokens have expired.') %>
+<%- else -%>
+<%= _('The following personal access tokens have expired:') %>
+
+<%- @token_names.each do |token| -%>
+ - <%= token %>
+<%- end -%>
+<%- end -%>
<%= _('You can create a new one or check them in your personal access tokens settings %{pat_link}.') % { pat_link: @target_url } %>
diff --git a/app/views/notify/access_token_revoked_email.html.haml b/app/views/notify/access_token_revoked_email.html.haml
index ecd2b3e84b2..780d633f184 100644
--- a/app/views/notify/access_token_revoked_email.html.haml
+++ b/app/views/notify/access_token_revoked_email.html.haml
@@ -2,7 +2,7 @@
= _('Hi %{username}!') % { username: sanitize_name(@user.name) }
%p
= html_escape(_('A personal access token, named %{code_start}%{token_name}%{code_end}, has been revoked.')) % { code_start: '<code>'.html_safe, token_name: @token_name, code_end: '</code>'.html_safe }
-- if @source == 'secret_detection'
+- if @source == :secret_detection
= _('We found your token in a public project and have automatically revoked it to protect your account.')
%p
- pat_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: @target_url }
diff --git a/app/views/notify/access_token_revoked_email.text.erb b/app/views/notify/access_token_revoked_email.text.erb
index a0623f96488..8ddab63ae27 100644
--- a/app/views/notify/access_token_revoked_email.text.erb
+++ b/app/views/notify/access_token_revoked_email.text.erb
@@ -1,7 +1,7 @@
<%= _('Hi %{username}!') % { username: sanitize_name(@user.name) } %>
<%= _('A personal access token, named %{token_name}, has been revoked.') % { token_name: @token_name } %>
-<% if @source == 'secret_detection' %>
+<% if @source == :secret_detection %>
<%= _('We found your token in a public project and have automatically revoked it to protect your account.') %>
<% end %>
diff --git a/app/views/notify/github_gists_import_errors_email.html.haml b/app/views/notify/github_gists_import_errors_email.html.haml
new file mode 100644
index 00000000000..07b4cfca77e
--- /dev/null
+++ b/app/views/notify/github_gists_import_errors_email.html.haml
@@ -0,0 +1,19 @@
+- text_style = 'font-size:16px; text-align:center; line-height:30px;'
+
+%p{ style: text_style }
+ = s_('GithubImporter|Your import of GitHub gists into GitLab snippets is complete.')
+
+%p
+ = s_('GithubImporter|GitHub gists that were not imported:')
+
+ %ol
+ - @errors.each do |gist_id, error|
+ %li
+ = s_("GithubImporter|Gist with id %{gist_id} failed due to error: %{error}.") % { gist_id: gist_id, error: error }
+ - if error == Gitlab::GithubGistsImport::Importer::GistImporter::FILE_COUNT_LIMIT_MESSAGE
+ - import_snippets_url = help_page_url('api/import.md', anchor: 'import-github-gists-into-gitlab-snippets')
+ - import_snippets_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: import_snippets_url }
+ = html_escape(s_("GithubImporter|Please follow %{import_snippets_link_start}Import GitHub gists into GitLab snippets%{import_snippets_link_end} for more details.")) % { import_snippets_link_start: import_snippets_link_start, import_snippets_link_end: '</a>'.html_safe }
+
+%p
+ = s_('GithubImporter|GitHub gists with more than 10 files must be manually migrated.')
diff --git a/app/views/notify/github_gists_import_errors_email.text.erb b/app/views/notify/github_gists_import_errors_email.text.erb
new file mode 100644
index 00000000000..2743a658269
--- /dev/null
+++ b/app/views/notify/github_gists_import_errors_email.text.erb
@@ -0,0 +1,12 @@
+<%= s_('GithubImporter|Your import of GitHub gists into GitLab snippets is complete.') %>
+
+<%= s_('GithubImporter|GitHub gists that were not imported:') %>
+<% @errors.each do |gist_id, error| %>
+ - <%= s_("GithubImporter|Gist with id %{gist_id} failed due to error: %{error}.") % { gist_id: gist_id, error: error } %>
+ <% if error == Gitlab::GithubGistsImport::Importer::GistImporter::FILE_COUNT_LIMIT_MESSAGE %>
+ <% import_snippets_url = help_page_url('api/import.md', anchor: 'import-github-gists-into-gitlab-snippets') %>
+ <%= s_("GithubImporter|Please follow %{import_snippets_url} for more details.") % { import_snippets_url: import_snippets_url } %>
+ <% end %>
+<% end %>
+
+<%= s_('GithubImporter|GitHub gists with more than 10 files must be manually migrated.') %>
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 02f6b3914c9..969221d00d2 100644
--- a/app/views/notify/service_desk_new_note_email.html.haml
+++ b/app/views/notify/service_desk_new_note_email.html.haml
@@ -2,4 +2,4 @@
.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)
+ = markdown(@note.note, pipeline: :service_desk_email, author: @note.author, issuable_reference_expansion_enabled: true, uploads_as_attachments: @uploads_as_attachments)
diff --git a/app/views/profiles/chat_names/_chat_name.html.haml b/app/views/profiles/chat_names/_chat_name.html.haml
index 0b45869bdf9..ce2fc2098c5 100644
--- a/app/views/profiles/chat_names/_chat_name.html.haml
+++ b/app/views/profiles/chat_names/_chat_name.html.haml
@@ -1,18 +1,20 @@
- integration = chat_name.integration
-- project = integration.project
+- project = integration&.project
%tr
%td
%strong
- - if can?(current_user, :read_project, project)
+ - if project.present? && can?(current_user, :read_project, project)
= link_to project.full_name, project_path(project)
- else
.light= _('Not applicable.')
%td
%strong
- - if can?(current_user, :admin_project, project)
+ - if integration.present? && can?(current_user, :admin_project, project)
= link_to integration.title, edit_project_settings_integration_path(project, integration)
- - else
+ - elsif integration.present?
= integration.title
+ - else
+ .light= _('Not applicable.')
%td
= chat_name.team_domain
%td
diff --git a/app/views/profiles/notifications/_email_settings.html.haml b/app/views/profiles/notifications/_email_settings.html.haml
index c4de33dcd9e..cd7a7ced1d4 100644
--- a/app/views/profiles/notifications/_email_settings.html.haml
+++ b/app/views/profiles/notifications/_email_settings.html.haml
@@ -1,7 +1,6 @@
- form = local_assigns.fetch(:form)
.form-group
- = form.label :notification_email, _('Notification Email'), class: "label-bold"
- = form.select :notification_email, @user.public_verified_emails, { include_blank: _('Use primary email (%{email})') % { email: @user.email }, selected: @user.notification_email }, class: "select2", disabled: local_assigns.fetch(:email_change_disabled, nil)
+ .js-notification-email-listbox-input{ data: { label: _('Notification Email'), name: 'user[notification_email]', emails: @user.public_verified_emails.to_json, empty_value_text: _('Use primary email (%{email})') % { email: @user.email }, value: @user.notification_email, disabled: local_assigns.fetch(:email_change_disabled, nil) } }
.help-block
= local_assigns.fetch(:help_text, nil)
.form-group
diff --git a/app/views/profiles/notifications/_group_settings.html.haml b/app/views/profiles/notifications/_group_settings.html.haml
index 23fce8e04b6..898762ca78a 100644
--- a/app/views/profiles/notifications/_group_settings.html.haml
+++ b/app/views/profiles/notifications/_group_settings.html.haml
@@ -14,4 +14,4 @@
.table-section.section-30
= form_for setting, url: profile_group_notifications_path(group), method: :put, html: { class: 'update-notifications gl-display-flex' } do |f|
- = f.select :notification_email, @user.public_verified_emails, { include_blank: 'Global notification email' }, class: 'select2 js-group-notification-email'
+ .js-notification-email-listbox-input{ data: { name: 'notification_setting[notification_email]', emails: @user.public_verified_emails.to_json, empty_value_text: _('Global notification email') , value: setting.notification_email } }
diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml
index 24ef9cf4dec..b10d05efc4f 100644
--- a/app/views/profiles/preferences/show.html.haml
+++ b/app/views/profiles/preferences/show.html.haml
@@ -76,12 +76,7 @@
= f.select :layout, layout_choices, {}, class: 'gl-form-select custom-select'
.form-text.text-muted
= s_('Preferences|Choose between fixed (max. 1280px) and fluid (%{percentage}) application layout.').html_safe % { percentage: '100%' }
- .form-group
- = f.label :dashboard, class: 'label-bold' do
- = s_('Preferences|Dashboard')
- = f.select :dashboard, dashboard_choices, {}, class: 'select2'
- .form-text.text-muted
- = s_('Preferences|Choose what content you want to see by default on your dashboard.')
+ .js-listbox-input{ data: { label: s_('Preferences|Dashboard'), description: s_('Preferences|Choose what content you want to see by default on your dashboard.'), name: 'user[dashboard]', items: dashboard_choices.to_json, value: current_user.dashboard } }
= render_if_exists 'profiles/preferences/group_overview_selector', f: f # EE-specific
@@ -130,17 +125,12 @@
= succeed '.' do
= link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'localization'), target: '_blank', rel: 'noopener noreferrer'
.col-lg-8
- .form-group
- = f.label :preferred_language, class: 'label-bold' do
- = _('Language')
- = f.select :preferred_language, language_choices, {}, class: 'select2'
- .form-text.text-muted
- = s_('Preferences|This feature is experimental and translations are not yet complete.')
- %p
- = link_to help_page_url('development/i18n/translation'), class: 'text-nowrap', target: '_blank', rel: 'noopener noreferrer' do
- = _("Help translate GitLab into your language")
- %span{ aria: { label: _('Open new window') } }
- = sprite_icon('external-link')
+ .js-listbox-input{ data: { label: _('Language'), description: s_('Preferences|This feature is experimental and translations are not yet complete.'), name: 'user[preferred_language]', items: language_choices.to_json, value: current_user.preferred_language } }
+ %p.gl-mt-n5
+ = link_to help_page_url('development/i18n/translation'), class: 'text-nowrap', target: '_blank', rel: 'noopener noreferrer' do
+ = _("Help translate GitLab into your language")
+ %span{ aria: { label: _('Open new window') } }
+ = sprite_icon('external-link')
.form-group
= f.label :first_day_of_week, class: 'label-bold' do
= _('First day of the week')
diff --git a/app/views/projects/_files.html.haml b/app/views/projects/_files.html.haml
index 712d6fabf82..e4eed63f45a 100644
--- a/app/views/projects/_files.html.haml
+++ b/app/views/projects/_files.html.haml
@@ -1,8 +1,10 @@
+- @no_breadcrumb_border = true
- show_auto_devops_callout = show_auto_devops_callout?(@project)
- is_project_overview = local_assigns.fetch(:is_project_overview, false)
- ref = local_assigns.fetch(:ref) { current_ref }
- project = local_assigns.fetch(:project) { @project }
- add_page_startup_api_call logs_file_project_ref_path(@project, ref, @path, format: "json", offset: 0)
+- source = visible_fork_source(@project)
- if readme_path = @project.repository.readme_path
- add_page_startup_api_call project_blob_path(@project, tree_join(@ref, readme_path), viewer: "rich", format: "json")
@@ -16,7 +18,7 @@
= render 'projects/tree/tree_header', tree: @tree, is_project_overview: is_project_overview
- if project.forked? && Feature.enabled?(:fork_divergence_counts, @project.fork_source)
- = render 'projects/fork_info'
+ #js-fork-info{ data: { source_name: source ? source.full_name : '', source_path: source ? project_path(source) : '' } }
- if is_project_overview
.project-buttons.gl-mb-5.js-show-on-project-root{ data: { qa_selector: 'project_buttons' } }
diff --git a/app/views/projects/_fork_info.html.haml b/app/views/projects/_fork_info.html.haml
deleted file mode 100644
index 7fe30214e97..00000000000
--- a/app/views/projects/_fork_info.html.haml
+++ /dev/null
@@ -1,14 +0,0 @@
-.info-well.gl-sm-display-flex.gl-flex-direction-column
- .well-segment.gl-p-5.gl-w-full.gl-display-flex
- .gl-icon.s32.gl-mt-4.gl-mr-4.gl-text-center
- = sprite_icon('fork')
- - source = visible_fork_source(@project)
- - if source
- %div
- #{ s_('ForkedFromProjectPath|Forked from') }
- = link_to source.full_name, project_path(source), data: { qa_selector: 'forked_from_link' }
- .gl-text-secondary
- = fork_divergence_message(::Projects::Forks::DivergenceCounts.new(@project, @ref).counts)
- - else
- .gl-py-4
- = s_('ForkedFromProjectPath|Forked from an inaccessible project')
diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml
index dc426f2f6b7..b9aeed188fa 100644
--- a/app/views/projects/_home_panel.html.haml
+++ b/app/views/projects/_home_panel.html.haml
@@ -14,6 +14,8 @@
%span.visibility-icon.gl-text-secondary.has-tooltip.gl-ml-2{ data: { container: 'body' }, title: visibility_icon_description(@project) }
= visibility_level_icon(@project.visibility_level, options: { class: 'icon' })
= render_if_exists 'compliance_management/compliance_framework/compliance_framework_badge', project: @project, additional_classes: 'gl-align-self-center gl-ml-2'
+ - if @project.group
+ = render_if_exists 'shared/tier_badge', source: @project, source_type: 'Project'
.home-panel-metadata.gl-font-sm.gl-text-secondary.gl-font-base.gl-font-weight-normal.gl-line-height-normal{ data: { qa_selector: 'project_id_content' }, itemprop: 'identifier' }
- if can?(current_user, :read_project, @project)
%span.gl-display-inline-block.gl-vertical-align-middle
@@ -60,7 +62,7 @@
#{ s_('ForkedFromProjectPath|Forked from') }
= link_to source.full_name, project_path(source), data: { qa_selector: 'forked_from_link' }
- else
- = s_('ForkedFromProjectPath|Forked from an inaccessible project')
+ = s_('ForkedFromProjectPath|Forked from an inaccessible project.')
= render_if_exists "projects/home_mirror"
diff --git a/app/views/projects/_import_project_pane.html.haml b/app/views/projects/_import_project_pane.html.haml
index cc5271a1cd2..412c91544a6 100644
--- a/app/views/projects/_import_project_pane.html.haml
+++ b/app/views/projects/_import_project_pane.html.haml
@@ -7,6 +7,14 @@
%h5.gl-display-flex
= _("Import project from")
= link_to _('History'), import_history_index_path, class: 'gl-link gl-ml-auto gl-font-weight-normal'
+ %div
+ = render Pajamas::AlertComponent.new(variant: :tip,
+ alert_options: { class: 'gl-my-3' },
+ dismissible: false) do |c|
+ = c.body do
+ - docs_link_url = help_page_path('user/group/import/index') + '#migrate-groups-by-direct-transfer-recommended'
+ - docs_link = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: docs_link_url }
+ = html_escape(_("Importing GitLab projects? Migrating GitLab projects when migrating groups by direct transfer is in Beta. %{link_start}Learn more.%{link_end}")) % { link_start: docs_link, link_end: '</a>'.html_safe }
.import-buttons
- if gitlab_project_import_enabled?
.import_gitlab_project.has-tooltip{ data: { container: 'body', qa_selector: 'gitlab_import_button' } }
diff --git a/app/views/projects/artifacts/index.html.haml b/app/views/projects/artifacts/index.html.haml
index 9cbc149177c..7fa47aed7c6 100644
--- a/app/views/projects/artifacts/index.html.haml
+++ b/app/views/projects/artifacts/index.html.haml
@@ -6,4 +6,6 @@
.gl-mb-6
%strong= s_('Artifacts|Total artifacts size')
= number_to_human_size(@total_size, precicion: 2)
- #js-artifact-management{ data: { "project-path" => @project.full_path } }
+ #js-artifact-management{ data: { "project-path": @project.full_path,
+ "can-destroy-artifacts" => can?(current_user, :destroy_artifacts, @project).to_s,
+ "artifacts-management-feedback-image-path": image_path('illustrations/chat-bubble-sm.svg') } }
diff --git a/app/views/projects/blob/_template_selectors.html.haml b/app/views/projects/blob/_template_selectors.html.haml
index 4fe68c1ce1a..c1f4633f69f 100644
--- a/app/views/projects/blob/_template_selectors.html.haml
+++ b/app/views/projects/blob/_template_selectors.html.haml
@@ -1,8 +1,5 @@
.template-selectors-menu.gl-pl-3
.template-selector-dropdowns-wrap
- .template-type-selector.js-template-type-selector-wrap.hidden
- - toggle_text = should_suggest_gitlab_ci_yml? ? '.gitlab-ci.yml' : 'Select a template type'
- = dropdown_tag(_(toggle_text), options: { toggle_class: 'js-template-type-selector', dropdown_class: 'dropdown-menu-selectable', data: { qa_selector: 'template_type_dropdown' } })
.license-selector.js-license-selector-wrap.js-template-selector-wrap.hidden
= dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-license-selector', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: licenses_for_select(@project), project: @project.name, fullname: @project.namespace.human_name, qa_selector: 'license_dropdown' } })
.gitignore-selector.js-gitignore-selector-wrap.js-template-selector-wrap.hidden
diff --git a/app/views/projects/branch_defaults/_branch_names_fields.html.haml b/app/views/projects/branch_defaults/_branch_names_fields.html.haml
index 65f975fbd9e..393b19e6c5a 100644
--- a/app/views/projects/branch_defaults/_branch_names_fields.html.haml
+++ b/app/views/projects/branch_defaults/_branch_names_fields.html.haml
@@ -10,5 +10,5 @@
%p.form-text.text-muted
= s_('ProjectSettings|Leave empty to use default template.')
= sprintf(s_('ProjectSettings|Maximum %{maxLength} characters.'), { maxLength: Issue::MAX_BRANCH_TEMPLATE })
- - branch_name_help_link = help_page_path('user/project/repository/web_editor.md', anchor: 'create-a-new-branch-from-an-issue')
+ - branch_name_help_link = help_page_path('user/project/merge_requests/creating_merge_requests.md', anchor: 'from-an-issue')
= link_to _('What variables can I use?'), branch_name_help_link, target: "_blank"
diff --git a/app/views/projects/buttons/_fork.html.haml b/app/views/projects/buttons/_fork.html.haml
index 97186149a9d..6d05f1dc955 100644
--- a/app/views/projects/buttons/_fork.html.haml
+++ b/app/views/projects/buttons/_fork.html.haml
@@ -11,7 +11,7 @@
- button_class = 'disabled' if disabled_tooltip
%span.btn-group{ class: ('has-tooltip' if disabled_tooltip), title: disabled_tooltip }
- = link_to new_project_fork_path(@project), class: "gl-button btn btn-default fork-btn #{button_class}" do
+ = link_to new_project_fork_path(@project), class: "gl-button btn btn-default fork-btn #{button_class}", data: { qa_selector: 'fork_button' } do
= sprite_icon('fork', css_class: 'icon')
%span= s_('ProjectOverview|Fork')
= link_to project_forks_path(@project), title: n_(s_('ProjectOverview|Forks'), s_('ProjectOverview|Forks'), @project.forks_count), class: "gl-button btn btn-default count has-tooltip fork-count #{count_class}" do
diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml
index b48369322e4..ecdd43a54f9 100644
--- a/app/views/projects/ci/builds/_build.html.haml
+++ b/app/views/projects/ci/builds/_build.html.haml
@@ -87,7 +87,7 @@
%td
- if job.duration
%p.duration
- = custom_icon("icon_timer")
+ = sprite_icon("timer")
= duration_in_numbers(job.duration)
- if job.finished_at
diff --git a/app/views/projects/commit/_multiple_signatures_signature_badge.html.haml b/app/views/projects/commit/_multiple_signatures_signature_badge.html.haml
index 74515438af2..2568a69cc2c 100644
--- a/app/views/projects/commit/_multiple_signatures_signature_badge.html.haml
+++ b/app/views/projects/commit/_multiple_signatures_signature_badge.html.haml
@@ -1,6 +1,5 @@
-- title = capture do
- = html_escape(_('This commit was signed with %{strong_open}multiple%{strong_close} signatures.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
-
-- locals = { signature: signature, title: title, label: _('Unverified'), css_class: 'invalid', icon: 'status_notfound_borderless' }
+- title = _('Multiple signatures')
+- description = _('This commit was signed with multiple signatures.')
+- locals = { signature: signature, title: title, description: description, label: _('Unverified'), css_class: 'invalid' }
= render partial: 'projects/commit/signature_badge', locals: locals
diff --git a/app/views/projects/commit/_other_user_signature_badge.html.haml b/app/views/projects/commit/_other_user_signature_badge.html.haml
index bb843bee7c9..ffc4b25dc21 100644
--- a/app/views/projects/commit/_other_user_signature_badge.html.haml
+++ b/app/views/projects/commit/_other_user_signature_badge.html.haml
@@ -1,6 +1,5 @@
-- title = capture do
- = _("This commit was signed with a different user's verified signature.")
-
-- locals = { signature: signature, title: title, label: _('Unverified'), css_class: 'invalid', icon: 'status_notfound_borderless', show_user: true }
+- title = _("Different user's signature")
+- description = _("This commit was signed with a different user's verified signature.")
+- locals = { signature: signature, title: title, description: description, label: _('Unverified'), css_class: 'invalid' }
= render partial: 'projects/commit/signature_badge', locals: locals
diff --git a/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml b/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml
index 629d3cfaf74..61fdf6fc87a 100644
--- a/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml
+++ b/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml
@@ -1,6 +1,5 @@
-- title = capture do
- = html_escape(_('This commit was signed with a verified signature, but the committer email is not associated with the GPG Key.'))
-
-- locals = { signature: signature, title: title, label: _('Unverified'), css_class: ['invalid'], icon: 'status_notfound_borderless', show_user: true }
+- title = _('GPG key mismatch')
+- description = _('This commit was signed with a verified signature, but the committer email is not associated with the GPG Key.')
+- locals = { signature: signature, title: title, description: description, label: _('Unverified'), css_class: ['invalid'] }
= render partial: 'projects/commit/signature_badge', locals: locals
diff --git a/app/views/projects/commit/_signature_badge.html.haml b/app/views/projects/commit/_signature_badge.html.haml
index ad6b524c01b..41ba581b9d9 100644
--- a/app/views/projects/commit/_signature_badge.html.haml
+++ b/app/views/projects/commit/_signature_badge.html.haml
@@ -1,39 +1,35 @@
- signature = local_assigns.fetch(:signature)
- title = local_assigns.fetch(:title)
+- description = local_assigns.fetch(:description, nil)
- label = local_assigns.fetch(:label)
- css_class = local_assigns.fetch(:css_class)
-- icon = local_assigns.fetch(:icon)
-- show_user = local_assigns.fetch(:show_user, false)
- css_classes = commit_signature_badge_classes(css_class)
- title = capture do
.gpg-popover-status
- .gpg-popover-icon{ class: css_class }
- = sprite_icon(icon)
%div
- = title
+ %strong
+ = title
-- content = capture do
- - if show_user
- .clearfix
- - uri_signature_badge_user = "projects/commit/#{'x509/' if signature.x509?}signature_badge_user"
- = render partial: "#{uri_signature_badge_user}", locals: { signature: signature }
+ %p.gl-my-3
+ = description
+- content = capture do
- if signature.x509?
= render partial: "projects/commit/x509/certificate_details", locals: { signature: signature }
= link_to(_('Learn more about X.509 signed commits'), help_page_path('user/project/repository/x509_signed_commits/index.md'), class: 'gl-link gl-display-block')
- - elsif ::Feature.enabled?(:ssh_commit_signatures, signature.project) && signature.ssh?
+ - elsif signature.ssh?
= _('SSH key fingerprint:')
- %span.gl-font-monospace= signature.key&.fingerprint_sha256 || _('Unknown')
+ %span.gl-font-monospace= signature.key_fingerprint_sha256 || _('Unknown')
- = link_to(_('Learn about signing commits with SSH keys.'), help_page_path('user/project/repository/ssh_signed_commits/index.md'), class: 'gl-link gl-display-block')
+ = link_to(_('Learn about signing commits with SSH keys.'), help_page_path('user/project/repository/ssh_signed_commits/index.md'), class: 'gl-link gl-display-block gl-mt-3')
- else
= _('GPG Key ID:')
%span.gl-font-monospace= signature.gpg_key_primary_keyid
- = link_to(_('Learn more about signing commits'), help_page_path('user/project/repository/gpg_signed_commits/index.md'), class: 'gl-link gl-display-block')
+ = link_to(_('Learn about signing commits'), help_page_path('user/project/repository/gpg_signed_commits/index.md'), class: 'gl-link gl-display-block gl-mt-3')
%a{ role: 'button', tabindex: 0, class: css_classes, data: { toggle: 'popover', html: 'true', placement: 'top', title: title, content: content } }
= label
diff --git a/app/views/projects/commit/_unverified_signature_badge.html.haml b/app/views/projects/commit/_unverified_signature_badge.html.haml
index 0ce8e06382b..0eae8d5564d 100644
--- a/app/views/projects/commit/_unverified_signature_badge.html.haml
+++ b/app/views/projects/commit/_unverified_signature_badge.html.haml
@@ -1,6 +1,5 @@
-- title = capture do
- = html_escape(_('This commit was signed with an %{strong_open}unverified%{strong_close} signature.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
-
-- locals = { signature: signature, title: title, label: _('Unverified'), css_class: 'invalid', icon: 'status_notfound_borderless' }
+- title = _('Unverified signature')
+- description = _('This commit was signed with an unverified signature.')
+- locals = { signature: signature, title: title, description: description, label: _('Unverified'), css_class: 'invalid' }
= render partial: 'projects/commit/signature_badge', locals: locals
diff --git a/app/views/projects/commit/_verified_signature_badge.html.haml b/app/views/projects/commit/_verified_signature_badge.html.haml
index 357ad467539..417d816c711 100644
--- a/app/views/projects/commit/_verified_signature_badge.html.haml
+++ b/app/views/projects/commit/_verified_signature_badge.html.haml
@@ -1,6 +1,5 @@
-- title = capture do
- = html_escape(_('This commit was signed with a %{strong_open}verified%{strong_close} signature and the committer email is verified to belong to the same user.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
-
-- locals = { signature: signature, title: title, label: _('Verified'), css_class: 'valid', icon: 'status_success_borderless', show_user: true }
+- title = _('Verified commit')
+- description = _('This commit was signed with a verified signature and the committer email was verified to belong to the same user.')
+- locals = { signature: signature, title: title, description: description, label: _('Verified'), css_class: 'valid' }
= render partial: 'projects/commit/signature_badge', locals: locals
diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml
index c129d978e7e..8f802792e6a 100644
--- a/app/views/projects/commits/show.html.haml
+++ b/app/views/projects/commits/show.html.haml
@@ -10,7 +10,7 @@
.nav-block
.tree-ref-container
.tree-ref-holder
- #js-project-commits-ref-switcher{ data: { "project-id" => @project.id, "ref" => @ref, "commits_path": project_commits_path(@project) } }
+ #js-project-commits-ref-switcher{ data: { "project-id" => @project.id, "ref" => @ref, "commits_path": project_commits_path(@project), "ref_type": @ref_type.to_s } }
%ul.breadcrumb.repo-breadcrumb
= commits_breadcrumbs
diff --git a/app/views/projects/feature_flags/new.html.haml b/app/views/projects/feature_flags/new.html.haml
index 9fef9864475..c91487ad198 100644
--- a/app/views/projects/feature_flags/new.html.haml
+++ b/app/views/projects/feature_flags/new.html.haml
@@ -10,5 +10,5 @@
user_callout_id: Users::CalloutsHelper::FEATURE_FLAGS_NEW_VERSION,
show_user_callout: show_feature_flags_new_version?.to_s,
strategy_type_docs_page_path: help_page_path('operations/feature_flags', anchor: 'feature-flag-strategies'),
- environments_scope_docs_path: help_page_path('ci/environments/index.md', anchor: 'scope-environments-with-specs'),
+ environments_scope_docs_path: help_page_path('ci/environments/index.md', anchor: 'limit-the-environment-scope-of-a-cicd-variable'),
project_id: @project.id } }
diff --git a/app/views/projects/forks/new.html.haml b/app/views/projects/forks/new.html.haml
index a9913fe3d5e..e9c6b3fcd22 100644
--- a/app/views/projects/forks/new.html.haml
+++ b/app/views/projects/forks/new.html.haml
@@ -5,6 +5,7 @@
new_group_path: new_group_path,
project_full_path: @project.full_path,
visibility_help_path: help_page_path("user/public_access"),
+ cancel_path: project_path(@project),
project_id: @project.id,
project_name: @project.name,
project_path: @project.path,
diff --git a/app/views/projects/imports/new.html.haml b/app/views/projects/imports/new.html.haml
index 306f24d717b..efb364bd013 100644
--- a/app/views/projects/imports/new.html.haml
+++ b/app/views/projects/imports/new.html.haml
@@ -16,4 +16,4 @@
= render 'shared/import_form', f: f
.form-actions
- = f.submit 'Start import', class: 'gl-button btn btn-confirm', data: { disable_with: false }
+ = f.submit 'Start import', pajamas_button: true, data: { disable_with: false }
diff --git a/app/views/projects/issues/_work_item_links.html.haml b/app/views/projects/issues/_work_item_links.html.haml
index 72f9ec2ff16..3deceacec8d 100644
--- a/app/views/projects/issues/_work_item_links.html.haml
+++ b/app/views/projects/issues/_work_item_links.html.haml
@@ -1 +1,5 @@
-.js-work-item-links-root{ data: { issuable_id: @issue.id, iid: @issue.iid, project_path: @project.full_path, wi: work_items_index_data(@project) } }
+.js-work-item-links-root{ data: { issuable_id: @issue.id, iid: @issue.iid,
+ project_path: @project.full_path,
+ wi: work_items_index_data(@project),
+ register_path: new_user_registration_path(redirect_to_referer: 'yes'),
+ sign_in_path: new_session_path(:user, redirect_to_referer: 'yes') } }
diff --git a/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml b/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml
index fb950611f81..0123c5efd3d 100644
--- a/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml
+++ b/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml
@@ -47,7 +47,6 @@
- if moved_mr_sidebar_enabled?
%li.gl-dropdown-divider
%hr.dropdown-divider
- %li.gl-dropdown-item
- = link_to new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request)), class: 'dropdown-item' do
- .gl-dropdown-item-text-wrapper
- = _('Report abuse to administrator')
+ #js-report-abuse-dropdown-item{ data: { report_abuse_path: add_category_abuse_reports_path, reported_user_id: @merge_request.author.id, reported_from_url: merge_request_url(@merge_request) } }
+
+#js-report-abuse-drawer
diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml
index 71f8e4c32f5..b96d869e9d7 100644
--- a/app/views/projects/merge_requests/_merge_request.html.haml
+++ b/app/views/projects/merge_requests/_merge_request.html.haml
@@ -12,6 +12,7 @@
.issuable-main-info
.merge-request-title.title
%span.merge-request-title-text.js-onboarding-mr-item
+ = hidden_merge_request_icon(merge_request)
= link_to merge_request.title, merge_request_path(merge_request), class: 'js-prefetch-document'
- if merge_request.tasks?
%span.task-status.d-none.d-sm-inline-block
diff --git a/app/views/projects/merge_requests/_mr_title.html.haml b/app/views/projects/merge_requests/_mr_title.html.haml
index a73d2aa5cc4..9d25603994a 100644
--- a/app/views/projects/merge_requests/_mr_title.html.haml
+++ b/app/views/projects/merge_requests/_mr_title.html.haml
@@ -16,7 +16,7 @@
.detail-page-header.border-bottom-0.pt-0.pb-0.gl-display-block{ class: "gl-md-display-flex! #{'is-merge-request' if moved_mr_sidebar_enabled? && !fluid_layout}" }
.detail-page-header-body
.issuable-meta.gl-display-flex
- #js-issuable-header-warnings
+ #js-issuable-header-warnings{ data: { hidden: @merge_request.hidden?.to_s } }
%h1.title.page-title.gl-font-size-h-display.gl-my-0.gl-display-inline-block{ data: { qa_selector: 'title_content' } }
= markdown_field(@merge_request, :title)
diff --git a/app/views/projects/merge_requests/_page.html.haml b/app/views/projects/merge_requests/_page.html.haml
index 9d79352659c..47eb3e016d3 100644
--- a/app/views/projects/merge_requests/_page.html.haml
+++ b/app/views/projects/merge_requests/_page.html.haml
@@ -69,7 +69,7 @@
= render "projects/merge_requests/awards_block"
= render "projects/merge_requests/widget"
- if mr_action === "show"
- - add_page_startup_api_call Feature.enabled?(:paginated_mr_discussions, @project) ? discussions_path(@merge_request, per_page: 20) : discussions_path(@merge_request)
+ - add_page_startup_api_call discussions_path(@merge_request, per_page: 20)
- add_page_startup_api_call widget_project_json_merge_request_path(@project, @merge_request, format: :json)
- add_page_startup_api_call cached_widget_project_json_merge_request_path(@project, @merge_request, format: :json)
#js-vue-mr-discussions{ data: { notes_data: notes_data(@merge_request).to_json,
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 8ff7fe6da71..95ef856daba 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -3,6 +3,7 @@
- page_title @milestone.title, _('Milestones')
- page_description @milestone.description_html
- add_page_specific_style 'page_bundles/milestone'
+- add_page_specific_style 'page_bundles/issuable'
- add_page_startup_api_call milestone_tab_path(@milestone, 'issues', show_project_name: false)
diff --git a/app/views/projects/ml/experiments/show.html.haml b/app/views/projects/ml/experiments/show.html.haml
index 2c350439762..143981eebe6 100644
--- a/app/views/projects/ml/experiments/show.html.haml
+++ b/app/views/projects/ml/experiments/show.html.haml
@@ -11,4 +11,6 @@
#js-show-ml-experiment{ data: {
candidates: items,
metrics: metrics,
- params: params } }
+ params: params,
+ pagination: @pagination.to_json
+} }
diff --git a/app/views/projects/pages/new.html.haml b/app/views/projects/pages/new.html.haml
index f1f3510d0f8..b9d2af9cf19 100644
--- a/app/views/projects/pages/new.html.haml
+++ b/app/views/projects/pages/new.html.haml
@@ -1,8 +1,14 @@
-%section.js-search-settings-section
- - if Feature.enabled?(:use_pipeline_wizard_for_pages, @project.group)
- #js-pages{ data: @pipeline_wizard_data }
+- if Feature.enabled?(:show_pages_in_deployments_menu, current_user, type: :experiment)
+ - @breadcrumb_link = project_pages_path(@project)
+ - breadcrumb_title s_('GitLabPages|Pages')
+ - page_title s_('GitLabPages|Pages')
+- else
+ %section.js-search-settings-section
- - else
- = render 'header'
+- if Feature.enabled?(:use_pipeline_wizard_for_pages, @project.group)
+ #js-pages{ data: @pipeline_wizard_data }
- = render 'use'
+- else
+ = render 'header'
+
+ = render 'use'
diff --git a/app/views/projects/pipeline_schedules/index.html.haml b/app/views/projects/pipeline_schedules/index.html.haml
index cb7cd631859..ab86d505f0f 100644
--- a/app/views/projects/pipeline_schedules/index.html.haml
+++ b/app/views/projects/pipeline_schedules/index.html.haml
@@ -6,7 +6,7 @@
#pipeline-schedules-callout{ data: { docs_url: help_page_path('ci/pipelines/schedules'), illustration_url: image_path('illustrations/pipeline_schedule_callout.svg') } }
- if Feature.enabled?(:pipeline_schedules_vue, @project)
- #pipeline-schedules-app{ data: { full_path: @project.full_path } }
+ #pipeline-schedules-app{ data: { full_path: @project.full_path, pipelines_path: project_pipelines_path(@project) } }
- else
.top-area
- schedule_path_proc = ->(scope) { pipeline_schedules_path(@project, scope: scope) }
diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml
index 1a079324a0f..8f7f0a15e69 100644
--- a/app/views/projects/pipelines/_info.html.haml
+++ b/app/views/projects/pipelines/_info.html.haml
@@ -1,4 +1,4 @@
-- if Feature.enabled?(:pipeline_name, @pipeline.project) && @pipeline.name
+- if @pipeline.name
.gl-border-t.gl-p-5.gl-px-0
%h3.gl-m-0.gl-text-body
= @pipeline.name
@@ -53,7 +53,7 @@
.well-segment{ 'data-testid': 'commit-row' }
.icon-container.commit-icon
= sprite_icon('commit', css_class: 'gl-top-0!')
- - if Feature.enabled?(:pipeline_name, @pipeline.project) && @pipeline.name
+ - if @pipeline.name
= markdown(commit.title, pipeline: :single_line)
= clipboard_button(text: @pipeline.sha, title: _("Copy commit SHA"))
= link_to commit.short_id, project_commit_path(@project, @pipeline.sha), class: "commit-sha"
diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml
index 1b35de85145..b27f5a0e5ed 100644
--- a/app/views/projects/settings/ci_cd/show.html.haml
+++ b/app/views/projects/settings/ci_cd/show.html.haml
@@ -43,7 +43,10 @@
= _("Runners are processes that pick up and execute CI/CD jobs for GitLab.")
= link_to s_('What is GitLab Runner?'), 'https://docs.gitlab.com/runner/', target: '_blank', rel: 'noopener noreferrer'
.settings-content
- = render 'projects/runners/settings'
+ - if Feature.enabled?(:project_runners_vue_ui, @project)
+ #js-project-runners{ data: { project_full_path: @project.full_path } }
+ - else
+ = render 'projects/runners/settings'
- if Gitlab::CurrentSettings.current_application_settings.keep_latest_artifact?
%section.settings.no-animate#js-artifacts-settings{ class: ('expanded' if expanded) }
diff --git a/app/views/projects/settings/repository/_protected_branches.html.haml b/app/views/projects/settings/repository/_protected_branches.html.haml
index d2356b5df09..340883ba853 100644
--- a/app/views/projects/settings/repository/_protected_branches.html.haml
+++ b/app/views/projects/settings/repository/_protected_branches.html.haml
@@ -1,2 +1,2 @@
-= render "protected_branches/index"
+= render "protected_branches/index", protected_branch_entity: protected_branch_entity
= render "projects/protected_tags/index"
diff --git a/app/views/projects/settings/repository/show.html.haml b/app/views/projects/settings/repository/show.html.haml
index 306ce47cee7..953bfcf71ab 100644
--- a/app/views/projects/settings/repository/show.html.haml
+++ b/app/views/projects/settings/repository/show.html.haml
@@ -13,7 +13,7 @@
-# The shared parts of the views can be found in the `shared` directory.
-# Those are used throughout the actual views. These `shared` views are then
-# reused in EE.
-= render "projects/settings/repository/protected_branches"
+= render "projects/settings/repository/protected_branches", protected_branch_entity: @project
= render "shared/deploy_tokens/index", group_or_project: @project, description: deploy_token_description
= render @deploy_keys
= render "projects/cleanup/show"
diff --git a/app/views/projects/triggers/_index.html.haml b/app/views/projects/triggers/_index.html.haml
index a7f29b5cbf9..de127d15351 100644
--- a/app/views/projects/triggers/_index.html.haml
+++ b/app/views/projects/triggers/_index.html.haml
@@ -6,32 +6,7 @@
- c.body do
= render 'projects/triggers/form', btn_text: _('Add trigger')
.gl-mb-5
- - if Feature.enabled?(:ci_pipeline_triggers_settings_vue_ui, @project)
- #js-ci-pipeline-triggers-list.triggers-list{ data: { triggers: @triggers_json } }
- - else
- - if @triggers.any?
- .table-responsive.triggers-list
- %table.table
- %thead
- %th
- %strong
- = _('Token')
- %th
- %strong
- = _('Description')
- %th
- %strong
- = _('Owner')
- %th
- %strong
- = _('Last used')
- %th
- = render partial: 'projects/triggers/trigger', collection: @triggers, as: :trigger
- - else
- = render Pajamas::AlertComponent.new(variant: :warning, show_icon: false, dismissible: false,
- alert_options: { data: { testid: 'no_triggers_content' }}) do |c|
- = c.body do
- = _('No triggers exist yet. Use the form above to create one.')
+ #js-ci-pipeline-triggers-list.triggers-list{ data: { triggers: @triggers_json } }
- c.footer do
%p
= _("These examples show how to trigger this project's pipeline for a branch or tag.")
diff --git a/app/views/projects/triggers/_trigger.html.haml b/app/views/projects/triggers/_trigger.html.haml
deleted file mode 100644
index bce7dc8a94b..00000000000
--- a/app/views/projects/triggers/_trigger.html.haml
+++ /dev/null
@@ -1,37 +0,0 @@
-%tr
- %td
- - if trigger.has_token_exposed?
- %span= trigger.token
- = clipboard_button(text: trigger.token, title: _("Copy trigger token"), testid: 'clipboard-btn')
- - else
- %span= trigger.short_token
-
- .gl-display-inline-block.gl-ml-3
- - unless trigger.can_access_project?
- = gl_badge_tag s_('Trigger|invalid'), { variant: :danger }, { title: s_('Trigger|Trigger user has insufficient permissions to project'), data: { toggle: 'tooltip', container: 'body' } }
-
- %td
- - if trigger.description? && trigger.description.length > 15
- %span.has-tooltip{ title: trigger.description }= truncate(trigger.description, length: 15)
- - else
- = trigger.description
-
- %td
- - if trigger.owner
- .trigger-owner.sr-only= trigger.owner.name
- = user_avatar(user: trigger.owner, size: 20)
-
- %td
- - if trigger.last_used
- = time_ago_with_tooltip trigger.last_used
- - else
- Never
-
- %td.text-right.gl-white-space-nowrap
- - revoke_trigger_confirmation = "By revoking a trigger you will break any processes making use of it. Are you sure?"
- - if can?(current_user, :admin_trigger, trigger)
- = link_to edit_project_trigger_path(@project, trigger), method: :get, title: "Edit", class: "gl-button btn btn-default btn-icon" do
- = sprite_icon('pencil')
- - if can?(current_user, :manage_trigger, trigger)
- = link_to project_trigger_path(@project, trigger), aria: { label: _('Revoke') }, data: { confirm: revoke_trigger_confirmation, testid: 'trigger_revoke_button', confirm_btn_variant: "danger" }, method: :delete, title: "Revoke", class: "gl-button btn btn-default btn-icon btn-trigger-revoke gl-ml-3" do
- = sprite_icon('remove')
diff --git a/app/views/protected_branches/_branches_list.html.haml b/app/views/protected_branches/_branches_list.html.haml
index 82eac348f16..2b0160f98e7 100644
--- a/app/views/protected_branches/_branches_list.html.haml
+++ b/app/views/protected_branches/_branches_list.html.haml
@@ -1,4 +1,4 @@
-- can_admin_project = can?(current_user, :admin_project, @project)
+- can_admin_entity = protected_branch_can_admin_entity?(protected_branch_entity)
-= render layout: 'protected_branches/shared/branches_list', locals: { can_admin_project: can_admin_project } do
- = render partial: 'protected_branches/protected_branch', collection: @protected_branches
+= render layout: 'protected_branches/shared/branches_list', locals: { can_admin_entity: can_admin_entity, protected_branch_entity: protected_branch_entity } do
+ = render partial: 'protected_branches/protected_branch', collection: @protected_branches, locals: { protected_branch_entity: protected_branch_entity }
diff --git a/app/views/protected_branches/_create_protected_branch.html.haml b/app/views/protected_branches/_create_protected_branch.html.haml
index 22a49ba9c7e..b4765ab49c2 100644
--- a/app/views/protected_branches/_create_protected_branch.html.haml
+++ b/app/views/protected_branches/_create_protected_branch.html.haml
@@ -11,4 +11,4 @@
dropdown_class: 'dropdown-menu-selectable capitalize-header', dropdown_qa_selector: 'allowed_to_push_dropdown_content' , dropdown_testid: 'allowed-to-push-dropdown',
data: { field_name: 'protected_branch[push_access_levels_attributes][0][access_level]', input_id: 'push_access_levels_attributes', qa_selector: 'allowed_to_push_dropdown' }})
-= render 'protected_branches/shared/create_protected_branch'
+= render 'protected_branches/shared/create_protected_branch', protected_branch_entity: protected_branch_entity
diff --git a/app/views/protected_branches/_index.html.haml b/app/views/protected_branches/_index.html.haml
index 4beca4845b8..84a221555ab 100644
--- a/app/views/protected_branches/_index.html.haml
+++ b/app/views/protected_branches/_index.html.haml
@@ -1,7 +1,7 @@
- content_for :create_protected_branch do
- = render 'protected_branches/create_protected_branch'
+ = render 'protected_branches/create_protected_branch', protected_branch_entity: protected_branch_entity
- content_for :branches_list do
- = render "protected_branches/branches_list"
+ = render "protected_branches/branches_list", protected_branch_entity: protected_branch_entity
-= render 'protected_branches/shared/index'
+= render 'protected_branches/shared/index', protected_branch_entity: protected_branch_entity
diff --git a/app/views/protected_branches/_protected_branch.html.haml b/app/views/protected_branches/_protected_branch.html.haml
index 423d7f23eb5..acd62968b09 100644
--- a/app/views/protected_branches/_protected_branch.html.haml
+++ b/app/views/protected_branches/_protected_branch.html.haml
@@ -1,2 +1,2 @@
-= render layout: 'protected_branches/shared/protected_branch', locals: { protected_branch: protected_branch } do
+= render layout: 'protected_branches/shared/protected_branch', locals: { protected_branch: protected_branch, protected_branch_entity: protected_branch_entity } do
= render_if_exists 'protected_branches/update_protected_branch', protected_branch: protected_branch
diff --git a/app/views/protected_branches/shared/_branches_list.html.haml b/app/views/protected_branches/shared/_branches_list.html.haml
index d041f9c5b48..c35895e000c 100644
--- a/app/views/protected_branches/shared/_branches_list.html.haml
+++ b/app/views/protected_branches/shared/_branches_list.html.haml
@@ -13,7 +13,7 @@
%col{ width: "20%" }
%col{ width: "10%" }
%col{ width: "10%" }
- - if can_admin_project
+ - if can_admin_entity
%col
%thead
%tr
@@ -28,9 +28,9 @@
%span.has-tooltip{ data: { container: 'body' }, title: s_('ProtectedBranch|Allow all users with push access to force push.'), 'aria-hidden': 'true' }
= sprite_icon('question', size: 16, css_class: 'gl-text-gray-500')
- = render_if_exists 'protected_branches/ee/code_owner_approval_table_head'
+ = render_if_exists 'protected_branches/ee/code_owner_approval_table_head', protected_branch_entity: protected_branch_entity
- - if can_admin_project
+ - if can_admin_entity
%th
%tbody
= yield
diff --git a/app/views/protected_branches/shared/_create_protected_branch.html.haml b/app/views/protected_branches/shared/_create_protected_branch.html.haml
index 6b4a143df69..315daa5e029 100644
--- a/app/views/protected_branches/shared/_create_protected_branch.html.haml
+++ b/app/views/protected_branches/shared/_create_protected_branch.html.haml
@@ -1,4 +1,4 @@
-= gitlab_ui_form_for [@project, @protected_branch], html: { class: 'new-protected-branch js-new-protected-branch' } do |f|
+= gitlab_ui_form_for [protected_branch_entity, @protected_branch], html: { class: 'new-protected-branch js-new-protected-branch' } do |f|
%input{ type: 'hidden', name: 'update_section', value: 'js-protected-branches-settings' }
= render Pajamas::CardComponent.new(card_options: { class: "gl-mb-5" }) do |c|
- c.header do
@@ -8,11 +8,18 @@
.form-group.row
= f.label :name, s_('ProtectedBranch|Branch:'), class: 'col-sm-12'
.col-sm-12
- = render partial: "protected_branches/shared/dropdown", locals: { f: f, toggle_classes: 'gl-w-full! gl-form-input-lg' }
+ - if protected_branch_entity.is_a?(Group)
+ = f.text_field :name, placeholder: 'prod*', class: 'form-control gl-w-full! gl-form-input-lg'
+ - else
+ = render partial: "protected_branches/shared/dropdown", locals: { f: f, toggle_classes: 'gl-w-full! gl-form-input-lg' }
.form-text.text-muted
- wildcards_url = help_page_url('user/project/protected_branches', anchor: 'configure-multiple-protected-branches-by-using-a-wildcard')
- wildcards_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: wildcards_url }
- = (s_("ProtectedBranch|%{wildcards_link_start}Wildcards%{wildcards_link_end} such as %{code_tag_start}*-stable%{code_tag_end} or %{code_tag_start}production/*%{code_tag_end} are supported.") % { wildcards_link_start: wildcards_link_start, wildcards_link_end: '</a>', code_tag_start: '<code>', code_tag_end: '</code>' }).html_safe
+ - placeholders = { wildcards_link_start: wildcards_link_start, wildcards_link_end: '</a>', code_tag_start: '<code>', code_tag_end: '</code>' }
+ - if protected_branch_entity.is_a?(Group)
+ = (s_("ProtectedBranch|Only %{wildcards_link_start}Wildcards%{wildcards_link_end} such as %{code_tag_start}*-stable%{code_tag_end} or %{code_tag_start}production/*%{code_tag_end} are supported.") % placeholders).html_safe
+ - else
+ = (s_("ProtectedBranch|%{wildcards_link_start}Wildcards%{wildcards_link_end} such as %{code_tag_start}*-stable%{code_tag_end} or %{code_tag_start}production/*%{code_tag_end} are supported.") % placeholders).html_safe
.form-group.row
= f.label :merge_access_levels_attributes, s_("ProtectedBranch|Allowed to merge:"), class: 'col-sm-12'
.col-sm-12
@@ -30,6 +37,6 @@
- force_push_docs_url = help_page_url('topics/git/git_rebase', anchor: 'force-push')
- force_push_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: force_push_docs_url }
= (s_("ProtectedBranch|Allow all users with push access to %{tag_start}force push%{tag_end}.") % { tag_start: force_push_link_start, tag_end: '</a>' }).html_safe
- = render_if_exists 'protected_branches/ee/code_owner_approval_form', f: f
+ = render_if_exists 'protected_branches/ee/code_owner_approval_form', f: f, protected_branch_entity: protected_branch_entity
- c.footer do
= f.submit s_('ProtectedBranch|Protect'), disabled: true, data: { qa_selector: 'protect_button' }, pajamas_button: true
diff --git a/app/views/protected_branches/shared/_index.html.haml b/app/views/protected_branches/shared/_index.html.haml
index c204508d355..d0e21e38429 100644
--- a/app/views/protected_branches/shared/_index.html.haml
+++ b/app/views/protected_branches/shared/_index.html.haml
@@ -1,3 +1,4 @@
+- can_admin_entity = protected_branch_can_admin_entity?(protected_branch_entity)
- expanded = expanded_by_default?
%section.settings.no-animate#js-protected-branches-settings{ class: ('expanded' if expanded), data: { qa_selector: 'protected_branches_settings_content' } }
@@ -14,7 +15,7 @@
= s_("ProtectedBranch|By default, protected branches restrict who can modify the branch.")
= link_to s_("ProtectedBranch|Learn more."), help_page_path("user/project/protected_branches", anchor: "who-can-modify-a-protected-branch")
- - if can? current_user, :admin_project, @project
+ - if can_admin_entity
= content_for :create_protected_branch
= content_for :branches_list
diff --git a/app/views/protected_branches/shared/_protected_branch.html.haml b/app/views/protected_branches/shared/_protected_branch.html.haml
index 5dea85aaa41..b4fd7a24b41 100644
--- a/app/views/protected_branches/shared/_protected_branch.html.haml
+++ b/app/views/protected_branches/shared/_protected_branch.html.haml
@@ -1,23 +1,25 @@
-- can_admin_project = can?(current_user, :admin_project, @project)
+- can_admin_entity = protected_branch_can_admin_entity?(protected_branch_entity)
+- url = protected_branch_path_by_entity(protected_branch, protected_branch_entity)
-%tr.js-protected-branch-edit-form{ data: { url: namespace_project_protected_branch_path(@project.namespace, @project, protected_branch), testid: 'protected-branch' } }
+%tr.js-protected-branch-edit-form{ data: { url: url, testid: 'protected-branch' } }
%td
%span.ref-name= protected_branch.name
- - if @project.root_ref?(protected_branch.name)
+ - if protected_branch_entity.is_a?(Project) && protected_branch_entity.root_ref?(protected_branch.name)
= gl_badge_tag s_('ProtectedBranch|default'), variant: :info
- %div
- - if protected_branch.wildcard?
- - matching_branches = protected_branch.matching(repository.branch_names)
- = link_to pluralize(matching_branches.count, "matching branch"), namespace_project_protected_branch_path(@project.namespace, @project, protected_branch)
- - elsif !protected_branch.commit
- %span.text-muted Branch was deleted.
+ - if protected_branch_entity.is_a?(Project)
+ %div
+ - if protected_branch.wildcard?
+ - matching_branches = protected_branch.matching(repository.branch_names)
+ = link_to pluralize(matching_branches.count, "matching branch"), namespace_project_protected_branch_path(@project.namespace, @project, protected_branch)
+ - elsif !protected_branch.commit
+ %span.text-muted= s_('ProtectedBranch|Branch does not exist.')
= yield
- = render_if_exists 'protected_branches/ee/code_owner_approval_table', protected_branch: protected_branch
+ = render_if_exists 'protected_branches/ee/code_owner_approval_table', protected_branch: protected_branch, protected_branch_entity: protected_branch_entity
- - if can_admin_project
+ - if can_admin_entity
%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-danger btn-sm"
+ = link_to s_('ProtectedBranch|Unprotect'), [protected_branch_entity, 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/pwa/manifest.json.erb b/app/views/pwa/manifest.json.erb
index c5403caeafa..9abb759389d 100644
--- a/app/views/pwa/manifest.json.erb
+++ b/app/views/pwa/manifest.json.erb
@@ -1,6 +1,6 @@
{
"name": "<%= Appearance.current&.title.presence || _('GitLab') %>",
- "short_name": "<%= Appearance.current&.short_title.presence || _('GitLab') %>",
+ "short_name": "<%= appearance_short_name %>",
"description": "<%= Appearance.current&.description.presence || _("The complete DevOps platform. One application with endless possibilities. Organizations rely on GitLab’s source code management, CI/CD, security, and more to deliver software rapidly.") %>",
"start_url": "<%= explore_projects_path %>",
"scope": "<%= root_path %>",
diff --git a/app/views/search/_category.html.haml b/app/views/search/_category.html.haml
index 3e483fe8cd2..74a5d5fb425 100644
--- a/app/views/search/_category.html.haml
+++ b/app/views/search/_category.html.haml
@@ -23,7 +23,7 @@
= search_filter_link 'milestones', _("Milestones")
= users
- - elsif @search_service.show_snippets?
+ - elsif @search_service_presenter.show_snippets?
= search_filter_link 'snippet_titles', _("Titles and Descriptions"), search: { snippets: true, group_id: nil, project_id: nil }
- else
= search_filter_link 'projects', _("Projects"), data: { qa_selector: 'projects_tab' }
diff --git a/app/views/search/_results.html.haml b/app/views/search/_results.html.haml
index 027ae6bf77c..5c952042663 100644
--- a/app/views/search/_results.html.haml
+++ b/app/views/search/_results.html.haml
@@ -3,16 +3,16 @@
= render_if_exists 'shared/promotions/promote_advanced_search'
- if Feature.enabled?(:search_page_vertical_nav, current_user)
.results.gl-md-display-flex.gl-mt-0
- #js-search-sidebar{ class: search_bar_classes, data: { navigation: search_navigation_json } }
+ #js-search-sidebar{ class: search_bar_classes, data: { navigation_json: search_navigation_json } }
.gl-w-full.gl-flex-grow-1.gl-overflow-x-hidden
- = render partial: 'search/results_status', locals: { search_service: @search_service } unless @search_objects.to_a.empty?
+ = render partial: 'search/results_status' unless @search_objects.to_a.empty?
= render partial: 'search/results_list'
- else
- = render partial: 'search/results_status', locals: { search_service: @search_service } unless @search_objects.to_a.empty?
+ = render partial: 'search/results_status' unless @search_objects.to_a.empty?
.results.gl-md-display-flex.gl-mt-3
- if %w[issues merge_requests].include?(@scope)
- #js-search-sidebar{ class: search_bar_classes, data: { navigation: search_navigation_json } }
+ #js-search-sidebar{ class: search_bar_classes, data: { navigation_json: search_navigation_json } }
.gl-w-full.gl-flex-grow-1.gl-overflow-x-hidden
= render partial: 'search/results_list'
diff --git a/app/views/search/_results_list.html.haml b/app/views/search/_results_list.html.haml
index cf910402ad4..195f0f3ad8a 100644
--- a/app/views/search/_results_list.html.haml
+++ b/app/views/search/_results_list.html.haml
@@ -7,7 +7,7 @@
%ul.content-list.commit-list
= render partial: "search/results/commit", collection: @search_objects
- else
- .search-results
+ .search-results.js-search-results
- if @scope == 'projects'
.term
= render 'shared/projects/list', projects: @search_objects, pipeline_status: false
diff --git a/app/views/search/_results_status.html.haml b/app/views/search/_results_status.html.haml
index adea6b598f7..3cd100db8b7 100644
--- a/app/views/search/_results_status.html.haml
+++ b/app/views/search/_results_status.html.haml
@@ -1,8 +1,6 @@
-- search_service = local_assigns.fetch(:search_service)
-
-- return unless search_service.show_results_status?
+- return unless @search_service_presenter.show_results_status?
- if Feature.enabled?(:search_page_vertical_nav, current_user)
- = render partial: 'search/results_status_vert_nav', locals: { search_service: search_service }
+ = render partial: 'search/results_status_vert_nav'
- else
- = render partial: 'search/results_status_horiz_nav', locals: { search_service: search_service }
+ = render partial: 'search/results_status_horiz_nav'
diff --git a/app/views/search/_results_status_horiz_nav.html.haml b/app/views/search/_results_status_horiz_nav.html.haml
index fe6ee0f12ec..c0778b70c04 100644
--- a/app/views/search/_results_status_horiz_nav.html.haml
+++ b/app/views/search/_results_status_horiz_nav.html.haml
@@ -1,22 +1,22 @@
.search-results-status
.row-content-block.gl-display-flex
.gl-md-display-flex.gl-text-left.gl-align-items-center.gl-flex-grow-1
- - unless search_service.without_count?
- = search_entries_info(search_service.search_objects, search_service.scope, params[:search])
- - unless search_service.show_snippets?
- - if search_service.project
- - link_to_project = link_to(search_service.project.full_name, search_service.project, class: 'ml-md-1')
- - if search_service.scope == 'blobs'
+ - unless @search_service_presenter.without_count?
+ = search_entries_info(@search_objects, @scope, @search_term)
+ - unless @search_service_presenter.show_snippets?
+ - if @project
+ - link_to_project = link_to(@project.full_name, @project, class: 'ml-md-1')
+ - if @scope == 'blobs'
= _("in")
.mx-md-1
- #js-blob-ref-switcher{ data: { "project-id" => search_service.project.id, "ref" => repository_ref(search_service.project), "field-name": "repository_ref" } }
+ #js-blob-ref-switcher{ data: { "project-id" => @project.id, "ref" => repository_ref(@project), "field-name": "repository_ref" } }
= s_('SearchCodeResults|of %{link_to_project}').html_safe % { link_to_project: link_to_project }
- else
= _("in project %{link_to_project}").html_safe % { link_to_project: link_to_project }
- - elsif search_service.group
- - link_to_group = link_to(search_service.group.name, search_service.group, class: 'ml-md-1')
+ - elsif @group
+ - link_to_group = link_to(@group.name, @group, class: 'ml-md-1')
= _("in group %{link_to_group}").html_safe % { link_to_group: link_to_group }
- - if search_service.show_sort_dropdown?
+ - if @search_service_presenter.show_sort_dropdown?
.gl-md-display-flex.gl-flex-direction-column
#js-search-sort{ data: { "search-sort-options" => search_sort_options.to_json } }
diff --git a/app/views/search/_results_status_vert_nav.html.haml b/app/views/search/_results_status_vert_nav.html.haml
index 03916911f43..29cc0a20123 100644
--- a/app/views/search/_results_status_vert_nav.html.haml
+++ b/app/views/search/_results_status_vert_nav.html.haml
@@ -2,22 +2,22 @@
.gl-display-flex.gl-flex-direction-column
.gl-p-5.gl-display-flex
.gl-md-display-flex.gl-text-left.gl-align-items-center.gl-flex-grow-1
- - unless search_service.without_count?
- = search_entries_info(search_service.search_objects, search_service.scope, params[:search])
- - unless search_service.show_snippets?
- - if search_service.project
- - link_to_project = link_to(search_service.project.full_name, search_service.project, class: 'ml-md-1')
- - if search_service.scope == 'blobs'
+ - unless @search_service_presenter.without_count?
+ = search_entries_info(@search_objects, @scope, @search_term)
+ - unless @search_service_presenter.show_snippets?
+ - if @project
+ - link_to_project = link_to(@project.full_name, @project, class: 'ml-md-1')
+ - if @scope == 'blobs'
= _("in")
.mx-md-1
- #js-blob-ref-switcher{ data: { "project-id" => search_service.project.id, "ref" => repository_ref(search_service.project), "field-name": "repository_ref" } }
+ #js-blob-ref-switcher{ data: { "project-id" => @project.id, "ref" => repository_ref(@project), "field-name": "repository_ref" } }
= s_('SearchCodeResults|of %{link_to_project}').html_safe % { link_to_project: link_to_project }
- else
= _("in project %{link_to_project}").html_safe % { link_to_project: link_to_project }
- - elsif search_service.group
- - link_to_group = link_to(search_service.group.name, search_service.group, class: 'ml-md-1')
+ - elsif @group
+ - link_to_group = link_to(@group.name, @group, class: 'ml-md-1')
= _("in group %{link_to_group}").html_safe % { link_to_group: link_to_group }
- - if search_service.show_sort_dropdown?
+ - if @search_service_presenter.show_sort_dropdown?
.gl-md-display-flex.gl-flex-direction-column
#js-search-sort{ data: { "search-sort-options" => search_sort_options.to_json } }
%hr.gl-mb-5.gl-mt-0.gl-border-gray-100.gl-w-full
diff --git a/app/views/search/show.html.haml b/app/views/search/show.html.haml
index e1efa271d57..2eb6af94008 100644
--- a/app/views/search/show.html.haml
+++ b/app/views/search/show.html.haml
@@ -9,7 +9,7 @@
- project_attributes = @project&.attributes&.slice('id', 'namespace_id', 'name')&.merge(name_with_namespace: @project&.name_with_namespace)
- if @search_results
- - if @search_service.without_count?
+ - if @search_service_presenter.without_count?
- page_description(_("%{scope} results for term '%{term}'") % { scope: @scope, term: @search_term })
- else
- page_description(_("%{count} %{scope} for term '%{term}'") % { count: @search_results.formatted_count(@scope), scope: @scope, term: @search_term })
@@ -20,7 +20,7 @@
= render_if_exists 'search/form_elasticsearch', attrs: { class: 'mb-2 mb-sm-0 align-self-center' }
.gl-mt-3
- #js-search-topbar{ data: { "group-initial-json": group_attributes.to_json, "project-initial-json": project_attributes.to_json, "elasticsearch-enabled": @elasticsearch_in_use.to_s, "default-branch-name": @project&.default_branch } }
+ #js-search-topbar{ data: { "group-initial-json": group_attributes.to_json, "project-initial-json": project_attributes.to_json, "elasticsearch-enabled": @search_service_presenter.advanced_search_enabled?.to_s, "default-branch-name": @project&.default_branch } }
- if @search_term
- if Feature.disabled?(:search_page_vertical_nav, current_user)
= render 'search/category'
diff --git a/app/views/shared/_broadcast_message.html.haml b/app/views/shared/_broadcast_message.html.haml
index a202add339f..4d286713cef 100644
--- a/app/views/shared/_broadcast_message.html.haml
+++ b/app/views/shared/_broadcast_message.html.haml
@@ -3,7 +3,7 @@
- preview = local_assigns.fetch(:preview, false)
- unless message.notification?
- .gl-broadcast-message.broadcast-banner-message{ role: "alert", class: "js-broadcast-notification-#{message.id} #{message.theme}" }
+ .gl-broadcast-message.broadcast-banner-message.banner{ role: "alert", class: "js-broadcast-notification-#{message.id} #{message.theme}" }
.gl-broadcast-message-content
.gl-broadcast-message-icon
= sprite_icon(icon_name)
diff --git a/app/views/shared/_milestone_expired.html.haml b/app/views/shared/_milestone_expired.html.haml
index 8c84f96932c..c7e780d8b4b 100644
--- a/app/views/shared/_milestone_expired.html.haml
+++ b/app/views/shared/_milestone_expired.html.haml
@@ -1,6 +1 @@
-- if milestone.expired? && !milestone.closed?
- = gl_badge_tag _('Expired'), { variant: :warning }, { class: "gl-mb-2" }
-- if milestone.upcoming?
- = gl_badge_tag _('Upcoming'), { variant: :info }, { class: "gl-mb-2" }
-- if milestone.closed?
- = gl_badge_tag _('Closed'), { variant: :danger }, { class: "gl-mb-2" }
+= gl_badge_tag milestone_status_string(milestone), { variant: milestone_badge_variant(milestone) }, { class: 'gl-mb-2' }
diff --git a/app/views/shared/_milestones_sort_dropdown.html.haml b/app/views/shared/_milestones_sort_dropdown.html.haml
index b68022bfeda..5795fb29b07 100644
--- a/app/views/shared/_milestones_sort_dropdown.html.haml
+++ b/app/views/shared/_milestones_sort_dropdown.html.haml
@@ -1,4 +1,4 @@
- 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'} }
+%div
= gl_redirect_listbox_tag milestones_sort_options, @sort
diff --git a/app/views/shared/_ref_dropdown.html.haml b/app/views/shared/_ref_dropdown.html.haml
deleted file mode 100644
index ee2b2a17e21..00000000000
--- a/app/views/shared/_ref_dropdown.html.haml
+++ /dev/null
@@ -1,7 +0,0 @@
-- dropdown_class = local_assigns.fetch(:dropdown_class, '')
-
-.dropdown-menu.dropdown-menu-selectable.git-revision-dropdown{ class: dropdown_class }
- = dropdown_title _('Select Git revision')
- = dropdown_filter _('Filter by Git revision')
- = dropdown_content
- = dropdown_loading
diff --git a/app/views/shared/admin/_admin_note.html.haml b/app/views/shared/admin/_admin_note.html.haml
index 9dcf181a118..2bf6baaf608 100644
--- a/app/views/shared/admin/_admin_note.html.haml
+++ b/app/views/shared/admin/_admin_note.html.haml
@@ -1,4 +1,4 @@
-- if @group.admin_note.present?
+- if @group.admin_note&.note?
- text = @group.admin_note.note
= render Pajamas::CardComponent.new(card_options: { class: 'gl-border-blue-500 gl-mb-5' }, header_options: { class: 'gl-bg-blue-500 gl-text-white' }) do |c|
- c.header do
diff --git a/app/views/shared/doorkeeper/applications/_delete_form.html.haml b/app/views/shared/doorkeeper/applications/_delete_form.html.haml
index 7cce0652f6f..b30ec2e7b3a 100644
--- a/app/views/shared/doorkeeper/applications/_delete_form.html.haml
+++ b/app/views/shared/doorkeeper/applications/_delete_form.html.haml
@@ -2,9 +2,9 @@
= form_tag path do
%input{ :name => "_method", :type => "hidden", :value => "delete" }
- if defined? small
- = button_tag type: "submit", class: "gl-button btn btn-danger btn-icon", data: { confirm: _("Are you sure?"), confirm_btn_variant: "danger" } do
+ = render Pajamas::ButtonComponent.new(type: :submit, variant: :confirm, icon: 'remove', button_options: { data: { confirm: _("Are you sure?"), confirm_btn_variant: "danger" } }) do
%span.sr-only
= _('Destroy')
- = sprite_icon('remove')
- else
- = submit_tag _('Destroy'), data: { confirm: _("Are you sure?"), confirm_btn_variant: "danger" }, aria: { label: _('Destroy') }, class: submit_btn_css
+ = render Pajamas::ButtonComponent.new(type: :submit, variant: :confirm, button_options: { aria: { label: _('Destroy') }, class: submit_btn_css, data: { confirm: _("Are you sure?"), confirm_btn_variant: "danger" } }) do
+ = _('Destroy')
diff --git a/app/views/shared/issue_type/_details_content.html.haml b/app/views/shared/issue_type/_details_content.html.haml
index 42f6f7b71a3..e1a9b30ef67 100644
--- a/app/views/shared/issue_type/_details_content.html.haml
+++ b/app/views/shared/issue_type/_details_content.html.haml
@@ -3,7 +3,11 @@
.issue-details.issuable-details.js-issue-details
.detail-page-description.content-block.js-detail-page-description.gl-pb-0.gl-border-none
- #js-issuable-app{ data: { initial: issuable_initial_data(issuable).to_json, issuable_id: issuable.id, full_path: @project.full_path } }
+ #js-issuable-app{ data: { initial: issuable_initial_data(issuable).to_json,
+ issuable_id: issuable.id,
+ full_path: @project.full_path,
+ register_path: new_user_registration_path(redirect_to_referer: 'yes'),
+ sign_in_path: new_session_path(:user, redirect_to_referer: 'yes') } }
.title-container
%h1.title.page-title.gl-font-size-h-display= markdown_field(issuable, :title)
- if issuable.description.present?
diff --git a/app/views/shared/milestones/_description.html.haml b/app/views/shared/milestones/_description.html.haml
index 747e22f47ac..fc25c7e8f89 100644
--- a/app/views/shared/milestones/_description.html.haml
+++ b/app/views/shared/milestones/_description.html.haml
@@ -1,6 +1,11 @@
.detail-page-description.milestone-detail
%h2.gl-m-0{ data: { qa_selector: "milestone_title_content" } }
= markdown_field(milestone, :title)
+ .gl-font-sm.gl-text-secondary.gl-font-base.gl-font-weight-normal.gl-line-height-normal{ data: { qa_selector: 'milestone_id_content' }, itemprop: 'identifier' }
+ - if can?(current_user, :read_milestone, @milestone)
+ %span.gl-display-inline-block.gl-vertical-align-middle
+ = s_('MilestonePage|Milestone ID: %{milestone_id}') % { milestone_id: @milestone.id }
+ = clipboard_button(title: s_('MilestonePage|Copy milestone ID'), text: @milestone.id)
- if milestone.try(:description).present?
%div{ data: { qa_selector: "milestone_description_content" } }
diff --git a/app/views/shared/milestones/_header.html.haml b/app/views/shared/milestones/_header.html.haml
index 334785685d5..900c71675d9 100644
--- a/app/views/shared/milestones/_header.html.haml
+++ b/app/views/shared/milestones/_header.html.haml
@@ -1,6 +1,5 @@
.detail-page-header.milestone-page-header
- .status-box{ class: status_box_class(milestone) }
- = milestone_status_string(milestone)
+ = gl_badge_tag milestone_status_string(milestone), { variant: milestone_badge_variant(milestone) }, { class: 'gl-mr-3' }
.header-text-content
%span.identifier
diff --git a/app/views/shared/nav/_your_work_scope_header.html.haml b/app/views/shared/nav/_your_work_scope_header.html.haml
new file mode 100644
index 00000000000..86172fb14ed
--- /dev/null
+++ b/app/views/shared/nav/_your_work_scope_header.html.haml
@@ -0,0 +1,6 @@
+%li.context-header
+ = link_to root_url, title: _('Your work'), class: 'has-tooltip', data: { container: 'body', placement: 'right' } do
+ %span.avatar-container.icon-avatar.rect-avatar.s32
+ = sprite_icon('work', size: 18)
+ %span.sidebar-context-title
+ = _('Your work')
diff --git a/app/views/shared/projects/_list.html.haml b/app/views/shared/projects/_list.html.haml
index 43cd2ee4c5b..813d8c5ed2b 100644
--- a/app/views/shared/projects/_list.html.haml
+++ b/app/views/shared/projects/_list.html.haml
@@ -19,7 +19,7 @@
- own_projects_illustration_path = 'illustrations/profile-page/personal-project.svg'
- own_projects_current_user_empty_message_header = s_('UserProfile|You haven\'t created any personal projects.')
- own_projects_current_user_empty_message_description = s_('UserProfile|Your projects can be available publicly, internally, or privately, at your choice.')
-- own_projects_visitor_empty_message = s_('UserProfile|This user doesn\'t have any personal projects')
+- own_projects_visitor_empty_message = s_('UserProfile|There are no projects available to be displayed here.')
- explore_page_empty_message = s_('UserProfile|Explore public groups to find projects to contribute to.')
- new_project_button_label = _('New project')
- new_project_button_link = new_project_path
diff --git a/app/views/shared/runners/_runner_type_alert.html.haml b/app/views/shared/runners/_runner_type_alert.html.haml
index 9736780c436..a1599b3ec49 100644
--- a/app/views/shared/runners/_runner_type_alert.html.haml
+++ b/app/views/shared/runners/_runner_type_alert.html.haml
@@ -12,5 +12,5 @@
title: s_('Runners|This runner is associated with specific projects.'),
dismissible: false) do |c|
= c.body do
- = s_('Runners|You can set up a specific runner to be used by multiple projects but you cannot make this a shared runner.')
+ = s_('Runners|You can set up a specific runner to be used by multiple projects but you cannot make this a shared or group 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/snippets/edit.html.haml b/app/views/snippets/edit.html.haml
index 5fa4a6775f9..2b2035e362b 100644
--- a/app/views/snippets/edit.html.haml
+++ b/app/views/snippets/edit.html.haml
@@ -1,5 +1,5 @@
+- breadcrumb_title _("Edit Snippet")
- page_title _("Edit"), "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets")
-- @content_class = "limit-container-width" unless fluid_layout
- content_for :prefetch_asset_tags do
- webpack_preload_asset_tag('monaco')
diff --git a/app/views/snippets/new.html.haml b/app/views/snippets/new.html.haml
index 418f96a1024..da2245432ce 100644
--- a/app/views/snippets/new.html.haml
+++ b/app/views/snippets/new.html.haml
@@ -1,7 +1,4 @@
-- @hide_top_links = true
-- @hide_breadcrumbs = true
- page_title _("New Snippet")
-- @content_class = "limit-container-width" unless fluid_layout
.page-title-holder.d-flex.align-items-center
%h1.page-title.gl-font-size-h-display= _('New Snippet')
diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml
index bb43c3c6274..eb9465a409f 100644
--- a/app/views/snippets/show.html.haml
+++ b/app/views/snippets/show.html.haml
@@ -5,7 +5,6 @@
- else
- add_page_startup_graphql_call('snippet/user_permissions')
- @hide_top_links = true
-- @content_class = "limit-container-width limited-inner-width-container" unless fluid_layout
- add_to_breadcrumbs _("Snippets"), dashboard_snippets_path
- breadcrumb_title @snippet.to_reference
- page_title "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets")
diff --git a/app/views/users/calendar_activities.html.haml b/app/views/users/calendar_activities.html.haml
index 8da1aa09215..3571031fbfa 100644
--- a/app/views/users/calendar_activities.html.haml
+++ b/app/views/users/calendar_activities.html.haml
@@ -20,7 +20,7 @@
- if event.note?
= link_to event.note_target.to_reference, event_note_target_url(event), class: 'has-tooltip', title: event.target_title
- elsif event.target
- = link_to event.target.to_reference, [event.project, event.target], class: 'has-tooltip', title: event.target_title
+ = link_to event.target.to_reference, Gitlab::UrlBuilder.build(event.target, only_path: true), class: 'has-tooltip', title: event.target_title
= s_('UserProfile|at')
%strong
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 03ecf8cac22..af29de6b0c4 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -18,14 +18,7 @@
icon: 'pencil',
button_options: { class: 'gl-flex-grow-1 gl-mx-1 has-tooltip', title: s_('UserProfile|Edit profile'), 'aria-label': 'Edit profile', data: { toggle: 'tooltip', placement: 'bottom', container: 'body' }})
- elsif current_user
- - if @user.abuse_report
- = render Pajamas::ButtonComponent.new(variant: :danger,
- icon: 'error',
- button_options: { class: 'gl-flex-grow-1 gl-mx-1 has-tooltip', title: s_('UserProfile|Already reported for abuse'), data: { toggle: 'tooltip', placement: 'bottom', container: 'body' }})
- - else
- = render Pajamas::ButtonComponent.new(href: new_abuse_report_path(user_id: @user.id, ref_url: request.referer),
- icon: 'error',
- button_options: { class: 'gl-flex-grow-1 gl-mx-1 has-tooltip', title: _('Report abuse to administrator'), data: { toggle: 'tooltip', placement: 'bottom', container: 'body' }})
+ #js-report-abuse{ data: { report_abuse_path: add_category_abuse_reports_path, reported_user_id: @user.id, reported_from_url: user_url(@user) } }
- verified_gpg_keys = @user.gpg_keys.select(&:verified?)
- if verified_gpg_keys.any?
= render Pajamas::ButtonComponent.new(href: user_gpg_keys_path,