diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /app/views/projects | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'app/views/projects')
89 files changed, 231 insertions, 466 deletions
diff --git a/app/views/projects/_export.html.haml b/app/views/projects/_export.html.haml index 20fb2b43c63..58c760c54e8 100644 --- a/app/views/projects/_export.html.haml +++ b/app/views/projects/_export.html.haml @@ -9,8 +9,8 @@ - c.with_body do %p - - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/import_export') } - = _('Export this project with all its related data in order to move it to a new GitLab instance. When the exported file is ready, you can download it from this page or from the download link in the email notification you will receive. You can then import it when creating a new project. %{link_start}Learn more.%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/settings/import_export'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(_('Export this project with all its related data in order to move it to a new GitLab instance. When the exported file is ready, you can download it from this page or from the download link in the email notification you will receive. You can then import it when creating a new project. %{link_start}Learn more.%{link_end}'), tag_pair(link, :link_start, :link_end)) .gl-mb-0 %p.gl-font-weight-bold= _('The following items will be exported:') %ul diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index 4ac30547ce3..759ec541af5 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -18,7 +18,7 @@ - if can?(current_user, :read_project, @project) %span.gl-display-inline-block.gl-vertical-align-middle = s_('ProjectPage|Project ID: %{project_id}') % { project_id: @project.id } - = clipboard_button(title: s_('ProjectPage|Copy project ID'), text: @project.id) + = deprecated_clipboard_button(title: s_('ProjectPage|Copy project ID'), text: @project.id) - if current_user %span.gl-ml-3.gl-mb-3 = render 'shared/members/access_request_links', source: @project diff --git a/app/views/projects/_invite_members_empty_project.html.haml b/app/views/projects/_invite_members_empty_project.html.haml index 18d06c7d0bb..d6cab06f773 100644 --- a/app/views/projects/_invite_members_empty_project.html.haml +++ b/app/views/projects/_invite_members_empty_project.html.haml @@ -6,4 +6,4 @@ .js-invite-members-trigger{ data: { variant: 'confirm', classes: 'gl-mb-8 gl-xs-w-full', display_text: s_('InviteMember|Invite members'), - trigger_source: 'project-empty-page' } } + trigger_source: 'project_empty_page' } } diff --git a/app/views/projects/_merge_request_merge_checks_settings.html.haml b/app/views/projects/_merge_request_merge_checks_settings.html.haml deleted file mode 100644 index bb7a7731067..00000000000 --- a/app/views/projects/_merge_request_merge_checks_settings.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -- form = local_assigns.fetch(:form) - -.form-group - %b= s_('ProjectSettings|Merge checks') - %p.text-secondary= s_('ProjectSettings|These checks must pass before merge requests can be merged.') - = render 'projects/merge_request_pipelines_and_threads_options', form: form, project: @project - = render_if_exists 'projects/merge_request_merge_checks_status_checks', form: form, project: @project - = render_if_exists 'projects/merge_request_merge_checks_jira_enforcement', form: form, project: @project diff --git a/app/views/projects/_merge_request_merge_suggestions_settings.html.haml b/app/views/projects/_merge_request_merge_suggestions_settings.html.haml deleted file mode 100644 index eb2fc05686c..00000000000 --- a/app/views/projects/_merge_request_merge_suggestions_settings.html.haml +++ /dev/null @@ -1,14 +0,0 @@ -- form = local_assigns.fetch(:form) - -.form-group - %b= s_('ProjectSettings|Merge suggestions') - %p.text-secondary - = s_('ProjectSettings|The commit message used when applying merge request suggestions.') - .mb-2 - = form.text_field :suggestion_commit_message, class: 'form-control mb-2', placeholder: Gitlab::Suggestions::CommitMessage::DEFAULT_SUGGESTION_COMMIT_MESSAGE - %p.form-text.text-muted - = s_('ProjectSettings|Leave empty to use default template.') - = sprintf(s_('ProjectSettings|Maximum %{maxLength} characters.'), { maxLength: Project::MAX_SUGGESTIONS_TEMPLATE_LENGTH }) - - configure_the_commit_message_for_applied_suggestions_help_link_url = help_page_path('user/project/merge_requests/reviews/suggestions.md', anchor: 'configure-the-commit-message-for-applied-suggestions') - - configure_the_commit_message_for_applied_suggestions_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: configure_the_commit_message_for_applied_suggestions_help_link_url } - = s_('ProjectSettings|%{link_start}What variables can I use?%{link_end}').html_safe % { link_start: configure_the_commit_message_for_applied_suggestions_help_link_start, link_end: '</a>'.html_safe } diff --git a/app/views/projects/_merge_request_settings.html.haml b/app/views/projects/_merge_request_settings.html.haml deleted file mode 100644 index 728ff597860..00000000000 --- a/app/views/projects/_merge_request_settings.html.haml +++ /dev/null @@ -1,18 +0,0 @@ -- form = local_assigns.fetch(:form) - -= render 'projects/merge_request_merge_method_settings', project: @project, form: form - -= render 'projects/merge_request_merge_options_settings', project: @project, form: form - -= render 'projects/merge_request_squash_options_settings', form: form - -= render 'projects/merge_request_merge_checks_settings', project: @project, form: form - -= render 'projects/merge_request_merge_suggestions_settings', project: @project, form: form - -= render 'projects/merge_request_merge_commit_template', project: @project, form: form - -= render 'projects/merge_request_squash_commit_template', project: @project, form: form - -- if @project.forked? - = render 'projects/merge_request_target_project_settings', project: @project, form: form diff --git a/app/views/projects/_service_desk_settings.html.haml b/app/views/projects/_service_desk_settings.html.haml index c2382a66132..3dbc4c0fad7 100644 --- a/app/views/projects/_service_desk_settings.html.haml +++ b/app/views/projects/_service_desk_settings.html.haml @@ -12,7 +12,7 @@ enabled: "#{@project.service_desk_enabled}", issue_tracker_enabled: "#{@project.project_feature.issues_enabled?}", incoming_email: (@project.service_desk_incoming_address if @project.service_desk_enabled), - service_desk_email: (@project.service_desk_custom_address if @project.service_desk_enabled), + service_desk_email: (@project.service_desk_alias_address if @project.service_desk_enabled), service_desk_email_enabled: "#{Gitlab::Email::ServiceDeskEmail.enabled?}", selected_template: "#{@project.service_desk_setting&.issue_template_key}", selected_file_template_project_id: "#{@project.service_desk_setting&.file_template_project_id}", diff --git a/app/views/projects/_transfer.html.haml b/app/views/projects/_transfer.html.haml index fe84a83c43c..cf0634ee411 100644 --- a/app/views/projects/_transfer.html.haml +++ b/app/views/projects/_transfer.html.haml @@ -8,15 +8,15 @@ .gl-new-card-title-wrapper %h4.gl-new-card-title.warning-title= _('Transfer project') %p.gl-new-card-description - - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'transfer-a-project-to-another-namespace') } - = _("Transfer your project into another namespace. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/settings/index', anchor: 'transfer-a-project-to-another-namespace'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(_("Transfer your project into another namespace. %{link_start}Learn more.%{link_end}"), tag_pair(link, :link_start, :link_end)) - c.with_body do = form_for @project, url: transfer_project_path(@project), method: :put, html: { class: 'js-project-transfer-form', id: form_id } do |f| .form-group.gl-mb-0 %p - - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'rename-a-repository') } - = _("A project’s repository name defines its URL (the one you use to access the project via a browser) and its place on the file disk where GitLab is installed. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/settings/index', anchor: 'rename-a-repository'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(_("A project’s repository name defines its URL (the one you use to access the project via a browser) and its place on the file disk where GitLab is installed. %{link_start}Learn more.%{link_end}"), tag_pair(link, :link_start, :link_end)) %p= _('When you transfer your project to a group, you can easily manage multiple projects, view usage quotas for storage, pipeline minutes, and users, and start a trial or upgrade to a paid tier.') %p = _("Don't have a group?") diff --git a/app/views/projects/activity.html.haml b/app/views/projects/activity.html.haml index 674b21b66b9..6a4760c3954 100644 --- a/app/views/projects/activity.html.haml +++ b/app/views/projects/activity.html.haml @@ -1,6 +1,4 @@ - page_title _("Activity") -= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project - = render 'projects/last_push' = render 'projects/activity' diff --git a/app/views/projects/artifacts/_tree_directory.html.haml b/app/views/projects/artifacts/_tree_directory.html.haml index c68cc19f6c1..56105c4cac3 100644 --- a/app/views/projects/artifacts/_tree_directory.html.haml +++ b/app/views/projects/artifacts/_tree_directory.html.haml @@ -3,6 +3,6 @@ %tr.tree-item{ 'data-link' => path_to_directory } %td.tree-item-file-name = tree_icon('folder', '755', directory.name) - = link_to path_to_directory, class: 'str-truncated', data: { qa_selector: 'directory_name_link', qa_directory_name: directory.name } do + = link_to path_to_directory, class: 'str-truncated', data: { testid: 'directory-name-link', qa_directory_name: directory.name } do %span= directory.name %td diff --git a/app/views/projects/blob/_header_content.html.haml b/app/views/projects/blob/_header_content.html.haml index 9cd2f583fdd..8c132a16797 100644 --- a/app/views/projects/blob/_header_content.html.haml +++ b/app/views/projects/blob/_header_content.html.haml @@ -3,7 +3,7 @@ .js-table-contents = blob_icon blob.mode, blob.name - %strong.file-title-name.gl-word-break-all{ data: { qa_selector: 'file_name_content' } } + %strong.file-title-name.gl-word-break-all{ data: { testid: 'file-name-content' } } = blob.name = copy_file_path_button(blob.path) diff --git a/app/views/projects/blob/viewers/_markup.html.haml b/app/views/projects/blob/viewers/_markup.html.haml index 703ffa8896e..01f730db33e 100644 --- a/app/views/projects/blob/viewers/_markup.html.haml +++ b/app/views/projects/blob/viewers/_markup.html.haml @@ -1,3 +1,3 @@ - blob = viewer.blob -.file-content.md +.file-content.js-markup-content.md = markup(blob.name, blob.data, viewer.banzai_render_context) diff --git a/app/views/projects/blob/viewers/_metrics_dashboard_yml.html.haml b/app/views/projects/blob/viewers/_metrics_dashboard_yml.html.haml index 9c3f9b6c9fd..b7bc43d08d8 100644 --- a/app/views/projects/blob/viewers/_metrics_dashboard_yml.html.haml +++ b/app/views/projects/blob/viewers/_metrics_dashboard_yml.html.haml @@ -7,5 +7,3 @@ %ul - viewer.errors.each do |error| %li= error - -= link_to _('Learn more'), help_page_path('operations/metrics/dashboards/index.md') diff --git a/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml b/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml index 5e355ecc4b8..1f5086dc3bd 100644 --- a/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml +++ b/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml @@ -1,4 +1,2 @@ = gl_loading_icon(inline: true, css_class: "mr-1") = _('Metrics Dashboard YAML definition') + '…' - -= link_to _('Learn more'), help_page_path('operations/metrics/dashboards/yaml.md') 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 4e4a72c154f..3e77cb51a85 100644 --- a/app/views/projects/branch_defaults/_branch_names_fields.html.haml +++ b/app/views/projects/branch_defaults/_branch_names_fields.html.haml @@ -6,7 +6,7 @@ .form-group .gl-mb-2 - = f.text_field :issue_branch_template, class: 'form-control gl-mb-2', placeholder: "%{id}-%{title}" + = f.text_field :issue_branch_template, class: 'form-control gl-mb-2 gl-form-input-xl', placeholder: "%{id}-%{title}" %p.form-text.text-muted = s_('ProjectSettings|Leave empty to use default template.') = sprintf(s_('ProjectSettings|Maximum %{maxLength} characters.'), { maxLength: Issue::MAX_BRANCH_TEMPLATE }) diff --git a/app/views/projects/branch_defaults/_default_branch_fields.html.haml b/app/views/projects/branch_defaults/_default_branch_fields.html.haml index e4f51725f1a..2c59e187d30 100644 --- a/app/views/projects/branch_defaults/_default_branch_fields.html.haml +++ b/app/views/projects/branch_defaults/_default_branch_fields.html.haml @@ -6,7 +6,8 @@ .form-group = f.label :default_branch, _("Default branch"), class: 'label-bold' %p= s_('ProjectSettings|All merge requests and commits are made against this branch unless you specify a different one.') - .js-select-default-branch{ data: { default_branch: @project.default_branch, project_id: @project.id } } + .gl-form-input-xl + .js-select-default-branch{ data: { default_branch: @project.default_branch, project_id: @project.id } } .form-group - help_text = _("When merge requests and commits in the default branch close, any issues they reference also close.") diff --git a/app/views/projects/buttons/_clone.html.haml b/app/views/projects/buttons/_clone.html.haml index db5d1ff5693..b5679bc512c 100644 --- a/app/views/projects/buttons/_clone.html.haml +++ b/app/views/projects/buttons/_clone.html.haml @@ -15,7 +15,7 @@ .input-group.btn-group = text_field_tag :ssh_project_clone, ssh_clone_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true, aria: { label: _('Repository clone URL') }, data: { qa_selector: 'ssh_clone_url_content' } .input-group-append - = clipboard_button(target: '#ssh_project_clone', title: _("Copy URL"), class: "input-group-text gl-button btn btn-icon btn-default") + = deprecated_clipboard_button(target: '#ssh_project_clone', title: _("Copy URL"), class: "input-group-text gl-button btn btn-icon btn-default") = render_if_exists 'projects/buttons/geo' - if http_enabled? %li.pt-2{ class: 'gl-px-4!' } @@ -24,7 +24,7 @@ .input-group.btn-group = text_field_tag :http_project_clone, http_clone_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true, aria: { label: _('Repository clone URL') }, data: { qa_selector: 'http_clone_url_content' } .input-group-append - = clipboard_button(target: '#http_project_clone', title: _("Copy URL"), class: "input-group-text gl-button btn btn-icon btn-default") + = deprecated_clipboard_button(target: '#http_project_clone', title: _("Copy URL"), class: "input-group-text gl-button btn btn-icon btn-default") = render_if_exists 'projects/buttons/geo' = render_if_exists 'projects/buttons/kerberos_clone_field' %li.divider.mt-2 diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 24d063d3b4d..e79a91eddaf 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -45,11 +45,12 @@ = gl_loading_icon(inline: true, css_class: 'gl-vertical-align-middle') - if can?(current_user, :read_pipeline, @last_pipeline) + - status = @last_pipeline.detailed_status(current_user) .well-segment.pipeline-info .js-commit-pipeline-status{ data: { full_path: @project.full_path, iid: @last_pipeline.iid, graphql_resource_etag: graphql_etag_pipeline_path(@last_pipeline) } } #{ _('Pipeline') } = link_to "##{@last_pipeline.id}", project_pipeline_path(@project, @last_pipeline.id) - = ci_label_for_status(@last_pipeline.status) + = status&.label - if @last_pipeline.stages_count.nonzero? #{ n_(s_('Pipeline|with stage'), s_('Pipeline|with stages'), @last_pipeline.stages_count) } .js-commit-pipeline-mini-graph{ data: { stages: @last_pipeline_stages.to_json.html_safe, full_path: @project.full_path, iid: @last_pipeline.iid, graphql_resource_etag: graphql_etag_pipeline_path(@last_pipeline) } } diff --git a/app/views/projects/commit/_signature_badge.html.haml b/app/views/projects/commit/_signature_badge.html.haml index 5b99a88f29e..6aefc2eaa8b 100644 --- a/app/views/projects/commit/_signature_badge.html.haml +++ b/app/views/projects/commit/_signature_badge.html.haml @@ -17,17 +17,17 @@ - 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') + = link_to(_('Learn more about X.509 signed commits'), help_page_path('user/project/repository/signed_commits/x509.md'), class: 'gl-link gl-display-block') - elsif signature.ssh? = _('SSH key fingerprint:') %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 gl-mt-3') + = link_to(_('Learn about signing commits with SSH keys.'), help_page_path('user/project/repository/signed_commits/ssh.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 about signing commits'), help_page_path('user/project/repository/gpg_signed_commits/index.md'), class: 'gl-link gl-display-block gl-mt-3') + = link_to(_('Learn about signing commits'), help_page_path('user/project/repository/signed_commits/index.md'), class: 'gl-link gl-display-block gl-mt-3') %a.signature-badge.gl-display-inline-block.gl-ml-4{ role: 'button', tabindex: 0, data: { toggle: 'popover', html: 'true', placement: 'top', title: title, content: content } } = gl_badge_tag label, variant: variant diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index 13a406d442d..c42d0fe9931 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -76,5 +76,5 @@ .commit-sha-group.btn-group.d-none.d-sm-flex .label.label-monospace.monospace = commit.short_id - = clipboard_button(text: commit.id, title: _("Copy commit SHA"), class: "gl-button btn btn-default btn-icon", container: "body") + = clipboard_button(text: commit.id, category: :primary, size: :medium, title: _("Copy commit SHA")) = link_to_browse_code(project, commit) diff --git a/app/views/projects/compare/index.html.haml b/app/views/projects/compare/index.html.haml index 4a29402bfe7..38633c9e5f1 100644 --- a/app/views/projects/compare/index.html.haml +++ b/app/views/projects/compare/index.html.haml @@ -1,6 +1,6 @@ - breadcrumb_title s_("CompareRevisions|Compare revisions") -- page_title _("CompareRevisions|Compare revisions") +- page_title s_("CompareRevisions|Compare revisions") .prepend-top-20 #js-compare-selector{ data: project_compare_selector_data(@project, @merge_request, @compare_params) } diff --git a/app/views/projects/deployments/_commit.html.haml b/app/views/projects/deployments/_commit.html.haml deleted file mode 100644 index 509ed62b39d..00000000000 --- a/app/views/projects/deployments/_commit.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -.table-mobile-content - .branch-commit.cgray - - if deployment.ref - %span.icon-container.gl-display-inline-block - = deployment.tag? ? sprite_icon('tag', css_class: 'sprite') : sprite_icon('fork', css_class: 'sprite') - = link_to deployment.ref, project_ref_path(@project, deployment.ref), class: "ref-name" - .icon-container.commit-icon - = custom_icon("icon_commit") - = link_to deployment.short_sha, project_commit_path(@project, deployment.sha), class: "commit-sha mr-0" - - %p.commit-title.flex-truncate-parent - %span.flex-truncate-child - - if commit_title = deployment.commit_title - = author_avatar(deployment.commit, size: 20) - = link_to_markdown commit_title, project_commit_path(@project, deployment.sha), class: "commit-row-message cgray" - - else - = _("Can't find HEAD commit for this branch") diff --git a/app/views/projects/deployments/_deployment.html.haml b/app/views/projects/deployments/_deployment.html.haml deleted file mode 100644 index e3688c8d323..00000000000 --- a/app/views/projects/deployments/_deployment.html.haml +++ /dev/null @@ -1,49 +0,0 @@ -.gl-responsive-table-row.deployment{ role: 'row' } - .table-section.section-15{ role: 'gridcell' } - .table-mobile-header{ role: 'rowheader' }= _("Status") - .table-mobile-content - = render_deployment_status(deployment) - - .table-section.section-10{ role: 'gridcell' } - .table-mobile-header{ role: 'rowheader' }= _("ID") - %strong.table-mobile-content{ data: { testid: 'deployment-id' } } ##{deployment.iid} - - .table-section.section-10{ role: 'gridcell' } - .table-mobile-header{ role: 'rowheader' }= _("Triggerer") - .table-mobile-content - - if deployment.deployed_by - = user_avatar(user: deployment.deployed_by, size: 26, css_class: "mr-0 float-none") - - .table-section.section-25{ role: 'gridcell' } - .table-mobile-header{ role: 'rowheader' }= _("Commit") - = render 'projects/deployments/commit', deployment: deployment - - .table-section.section-10.build-column{ role: 'gridcell' } - .table-mobile-header{ role: 'rowheader' }= _("Job") - - if deployment.deployable - .table-mobile-content - .flex-truncate-parent - .flex-truncate-child.has-tooltip.gl-white-space-normal.gl-md-white-space-nowrap{ :title => "#{deployment.deployable.name} (##{deployment.deployable.id})", data: { container: 'body' } } - = link_to deployment_path(deployment), class: 'build-link' do - #{deployment.deployable.name} (##{deployment.deployable.id}) - - else - = gl_badge_tag s_('Deployment|API'), { variant: :info }, { class: 'gl-cursor-help', data: { toggle: 'tooltip' }, title: s_('Deployment|This deployment was created using the API') } - - .table-section.section-10{ role: 'gridcell' } - .table-mobile-header{ role: 'rowheader' }= _("Created") - %span.table-mobile-content.flex-truncate-parent - %span.flex-truncate-child - = time_ago_with_tooltip(deployment.created_at) - - .table-section.section-10{ role: 'gridcell' } - .table-mobile-header{ role: 'rowheader' }= _("Deployed") - - if deployment.deployed_at - %span.table-mobile-content.flex-truncate-parent - %span.flex-truncate-child - = time_ago_with_tooltip(deployment.deployed_at) - - .table-section.section-10.table-button-footer{ role: 'gridcell' } - .btn-group.table-action-buttons - = render 'projects/deployments/actions', deployment: deployment - = render 'projects/deployments/rollback', deployment: deployment - = render_if_exists 'projects/deployments/approvals', deployment: deployment diff --git a/app/views/projects/deployments/_rollback.haml b/app/views/projects/deployments/_rollback.haml deleted file mode 100644 index e50fa1fa0f7..00000000000 --- a/app/views/projects/deployments/_rollback.haml +++ /dev/null @@ -1,4 +0,0 @@ -- if deployment.deployable && can?(current_user, :play_job, deployment.deployable) - - tooltip = deployment.last? ? s_('Environments|Re-deploy to environment') : s_('Environments|Rollback environment') - - icon = deployment.last? ? 'repeat' : 'redo' - = render Pajamas::ButtonComponent.new(icon: icon, button_options: { title: tooltip, class: 'js-confirm-rollback-modal-button has-tooltip', data: { environment_name: @environment.name, commit_short_sha: deployment.short_sha, commit_url: project_commit_path(@project, deployment.sha), is_last_deployment: deployment.last?.to_s, retry_path: retry_project_job_path(@environment.project, deployment.deployable) } }) diff --git a/app/views/projects/diffs/_file_header.html.haml b/app/views/projects/diffs/_file_header.html.haml index afca27c5430..17e55699615 100644 --- a/app/views/projects/diffs/_file_header.html.haml +++ b/app/views/projects/diffs/_file_header.html.haml @@ -5,7 +5,7 @@ - if diff_file.submodule? %span - = sprite_icon('archive') + = sprite_icon('folder-git', file_icon: true) %strong.file-title-name = submodule_link(diff_file.blob, diff_file.content_sha, diff_file.repository) @@ -23,7 +23,7 @@ %strong.file-title-name.has-tooltip.gl-word-break-all{ data: { title: diff_file.new_path, container: 'body' } } = new_path - else - %strong.file-title-name.has-tooltip.gl-word-break-all{ data: { title: diff_file.file_path, container: 'body', qa_selector: 'file_name_content' } } + %strong.file-title-name.has-tooltip.gl-word-break-all{ data: { title: diff_file.file_path, container: 'body', testid: 'file-name-content' } } = diff_file.file_path - if diff_file.deleted_file? diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 662f1bb158d..0158018ecc0 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -5,8 +5,6 @@ - reduce_visibility_form_id = 'reduce-visibility-form' - @force_desktop_expanded_sidebar = true -= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project - = render Pajamas::AlertComponent.new(title: _('GitLab Pages has moved'), alert_options: { class: 'gl-my-5', data: { feature_id: Users::CalloutsHelper::PAGES_MOVED_CALLOUT, dismiss_endpoint: callouts_path, defer_links: 'true' } }) do |c| - c.with_body do @@ -91,8 +89,8 @@ .gl-new-card-title-wrapper %h4.gl-new-card-title.warning-title= _('Change path') %p.gl-new-card-description - - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'rename-a-repository') } - = _("A project’s repository name defines its URL (the one you use to access the project via a browser) and its place on the file disk where GitLab is installed. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/settings/index', anchor: 'rename-a-repository'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(_("A project’s repository name defines its URL (the one you use to access the project via a browser) and its place on the file disk where GitLab is installed. %{link_start}Learn more.%{link_end}"), tag_pair(link, :link_start, :link_end)) - c.with_body do = render 'projects/errors' diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml index e97cae911d9..46ec430cadb 100644 --- a/app/views/projects/environments/show.html.haml +++ b/app/views/projects/environments/show.html.haml @@ -8,33 +8,4 @@ #environments-detail-view{ data: { details: environments_detail_data_json(current_user, @project, @environment) } } #environments-detail-view-header - - if Feature.enabled?(:environment_details_vue, @project) - #environment_details_page - - else - .environments-container - - if @deployments.blank? - .empty-state - .text-content - %h4.state-title - = _("You don't have any deployments right now.") - %p - = html_escape(_("Define environments in the deploy stage(s) in %{code_open}.gitlab-ci.yml%{code_close} to track deployments here.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } - .text-center - = render Pajamas::ButtonComponent.new(variant: :confirm, href: help_page_path("ci/environments/index.md")) do - = _('Read more') - - - else - .table-holder.gl-overflow-visible - .ci-table.environments{ role: 'grid' } - .gl-responsive-table-row.table-row-header{ role: 'row' } - .table-section.section-15{ role: 'columnheader' }= _('Status') - .table-section.section-10{ role: 'columnheader' }= _('ID') - .table-section.section-10{ role: 'columnheader' }= _('Triggerer') - .table-section.section-25{ role: 'columnheader' }= _('Commit') - .table-section.section-10{ role: 'columnheader' }= _('Job') - .table-section.section-10{ role: 'columnheader' }= _('Created') - .table-section.section-10{ role: 'columnheader' }= _('Deployed') - - = render @deployments - - = paginate @deployments, theme: 'gitlab' + #environment_details_page diff --git a/app/views/projects/hook_logs/show.html.haml b/app/views/projects/hook_logs/show.html.haml index 2eaf89be4ef..f8025f7c462 100644 --- a/app/views/projects/hook_logs/show.html.haml +++ b/app/views/projects/hook_logs/show.html.haml @@ -1,7 +1,7 @@ - add_to_breadcrumbs _('Webhook Settings'), namespace_project_hooks_path - page_title _('Webhook Logs') -%h1.page-title.gl-font-size-h-display +%h2.page-title.gl-font-size-h-display = _("Request details") %hr diff --git a/app/views/projects/incidents/show.html.haml b/app/views/projects/incidents/show.html.haml index 6d733dc46df..400c07835cd 100644 --- a/app/views/projects/incidents/show.html.haml +++ b/app/views/projects/incidents/show.html.haml @@ -1,9 +1,17 @@ -- @content_class = "limit-container-width" unless fluid_layout - add_to_breadcrumbs _("Incidents"), project_incidents_path(@project) - breadcrumb_title @issue.to_reference + - page_title "#{@issue.title} (#{@issue.to_reference})", _("Incidents") +- page_description @issue.description_html +- page_card_attributes @issue.card_attributes +- if @issue.relocation_target + - page_canonical_link @issue.relocation_target.present(current_user: current_user).web_url + - add_page_specific_style 'page_bundles/design_management' - add_page_specific_style 'page_bundles/incidents' +- add_page_specific_style 'page_bundles/issuable' - add_page_specific_style 'page_bundles/issues_show' -= render 'projects/issuable/show', issuable: @issue +- @content_class = "limit-container-width" unless fluid_layout + += render 'projects/issues/details_content', issuable: @issue diff --git a/app/views/projects/issuable/_show.html.haml b/app/views/projects/issuable/_show.html.haml deleted file mode 100644 index e502457808d..00000000000 --- a/app/views/projects/issuable/_show.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -- api_awards_path = local_assigns.fetch(:api_awards_path, nil) -- page_description issuable.description_html -- page_card_attributes issuable.card_attributes -- if issuable.relocation_target - - page_canonical_link issuable.relocation_target.present(current_user: current_user).web_url -- add_page_specific_style 'page_bundles/issuable' - -= render "projects/issues/service_desk/alert_moved_from_service_desk", issue: issuable - -= render 'shared/issue_type/details_content', issuable: issuable, api_awards_path: api_awards_path diff --git a/app/views/projects/issues/_details_content.html.haml b/app/views/projects/issues/_details_content.html.haml new file mode 100644 index 00000000000..51ffb68f4e5 --- /dev/null +++ b/app/views/projects/issues/_details_content.html.haml @@ -0,0 +1,47 @@ +- related_branches_path = related_branches_project_issue_path(@project, issuable) +- api_awards_path = local_assigns.fetch(:api_awards_path, nil) + += render "projects/issues/service_desk/alert_moved_from_service_desk", issue: issuable + +.issue-details.issuable-details.js-issue-details + .detail-page-description.content-block.js-detail-page-description.gl-pt-3.gl-pb-0.gl-border-none + #js-issuable-app{ data: { initial: issuable_initial_data(issuable).to_json, + header_actions_data: issue_header_actions_data(@project, issuable, current_user, @issuable_sidebar).to_json } } + .title-container + %h1.title.page-title.gl-font-size-h-display= markdown_field(issuable, :title) + - if issuable.description.present? + .description + .md= markdown_field(issuable, :description) + + = edited_time_ago_with_tooltip(issuable, placement: 'bottom', html_class: 'issue-edited-ago js-issue-edited-ago') + + .js-issue-widgets + = render 'projects/issues/emoji_block', issuable: issuable, api_awards_path: api_awards_path + + .js-issue-widgets + = render 'projects/issues/sentry_stack_trace', issuable: issuable + + = render 'projects/issues/design_management' + + = render_if_exists 'projects/issues/work_item_links' + = render_if_exists 'projects/issues/linked_resources' + = render 'projects/issues/related_issues' + + #js-related-merge-requests{ data: { endpoint: expose_path(api_v4_projects_issues_related_merge_requests_path(id: @project.id, issue_iid: issuable.iid)), + has_closing_merge_request: (issuable.merge_requests_count(current_user) != 0).to_s, + project_namespace: @project.namespace.path, + project_path: @project.path } } + + - if can?(current_user, :read_code, @project) + - add_page_startup_api_call related_branches_path + #related-branches{ data: { url: related_branches_path } } + -# This element is filled in using JavaScript. + + - if can?(current_user, :admin_feature_flags_issue_links, @project) + = render_if_exists 'projects/issues/related_feature_flags' + + .js-issue-widgets + + = render 'projects/issues/discussion' + += render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @issue.assignees diff --git a/app/views/projects/issues/_emoji_block.html.haml b/app/views/projects/issues/_emoji_block.html.haml new file mode 100644 index 00000000000..7eb3c0f5c9f --- /dev/null +++ b/app/views/projects/issues/_emoji_block.html.haml @@ -0,0 +1,8 @@ +- api_awards_path = local_assigns.fetch(:api_awards_path, nil) + +.emoji-block.emoji-block-sticky + .row.gl-m-0.gl-justify-content-space-between + .js-noteable-awards + = render 'award_emoji/awards_block', awardable: issuable, inline: true, api_awards_path: api_awards_path + .new-branch-col.gl-font-size-0.gl-my-2 + = render 'new_branch' if show_new_branch_button? diff --git a/app/views/projects/issues/_related_issues.html.haml b/app/views/projects/issues/_related_issues.html.haml index 2409c61fbf2..73a88e63a4e 100644 --- a/app/views/projects/issues/_related_issues.html.haml +++ b/app/views/projects/issues/_related_issues.html.haml @@ -4,6 +4,7 @@ full_path: @project.full_path, has_issue_weights_feature: @project.licensed_feature_available?(:issue_weights).to_s, help_path: help_page_path('user/project/issues/related_issues'), + issuable_type: @issue.issue_type, show_categorized_issues: @project.licensed_feature_available?(:blocked_issues).to_s, has_iterations_feature: @project.licensed_feature_available?(:iterations).to_s, report_abuse_path: add_category_abuse_reports_path } } diff --git a/app/views/projects/issues/_sentry_stack_trace.html.haml b/app/views/projects/issues/_sentry_stack_trace.html.haml new file mode 100644 index 00000000000..40b29a74b53 --- /dev/null +++ b/app/views/projects/issues/_sentry_stack_trace.html.haml @@ -0,0 +1,4 @@ +- return unless issuable.sentry_issue.present? +- add_page_specific_style 'page_bundles/error_tracking_details' + +#js-sentry-error-stack-trace{ data: error_details_data(@project, issuable.sentry_issue.sentry_issue_identifier) } diff --git a/app/views/projects/issues/service_desk.html.haml b/app/views/projects/issues/service_desk.html.haml index 2d17719a8c2..4453cb2e538 100644 --- a/app/views/projects/issues/service_desk.html.haml +++ b/app/views/projects/issues/service_desk.html.haml @@ -2,10 +2,11 @@ - page_title _("Service Desk") - add_page_specific_style 'page_bundles/issuable_list' +- add_page_specific_style 'page_bundles/issues_list' - content_for :breadcrumbs_extra do = render "projects/issues/service_desk/nav_btns", show_export_button: false, show_rss_button: false -- support_bot_attrs = { service_desk_enabled: @project.service_desk_enabled?, **UserSerializer.new.represent(User.support_bot) }.to_json +- support_bot_attrs = { service_desk_enabled: @project.service_desk_enabled?, **UserSerializer.new.represent(Users::Internal.support_bot) }.to_json .js-service-desk-issues.service-desk-issues{ data: { support_bot: support_bot_attrs } } - if ::Feature.enabled?(:service_desk_vue_list, @project) diff --git a/app/views/projects/issues/service_desk/_issue.html.haml b/app/views/projects/issues/service_desk/_issue.html.haml index 5b98712d3eb..66b2eabac9d 100644 --- a/app/views/projects/issues/service_desk/_issue.html.haml +++ b/app/views/projects/issues/service_desk/_issue.html.haml @@ -48,10 +48,10 @@ .issuable-meta %ul.controls - if issue.closed? && issue.moved? - %li.issuable-status + %li = render Pajamas::BadgeComponent.new(_('Closed (moved)'), size: 'sm', variant: 'info') - elsif issue.closed? - %li.issuable-status + %li = render Pajamas::BadgeComponent.new(_('Closed'), size: 'sm', variant: 'info') - if issue.assignees.any? %li.gl-display-flex diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index 7e8bf4ae57f..457eaf5e194 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -1,10 +1,18 @@ -- @content_class = "limit-container-width" unless fluid_layout - add_to_breadcrumbs _("Issues"), project_issues_path(@project) - breadcrumb_title @issue.to_reference + - page_title "#{@issue.title} (#{@issue.to_reference})", _("Issues") +- page_description @issue.description_html +- page_card_attributes @issue.card_attributes +- if @issue.relocation_target + - page_canonical_link @issue.relocation_target.present(current_user: current_user).web_url + - add_page_specific_style 'page_bundles/design_management' - add_page_specific_style 'page_bundles/incidents' +- add_page_specific_style 'page_bundles/issuable' - add_page_specific_style 'page_bundles/issues_show' - add_page_specific_style 'page_bundles/work_items' -= render 'projects/issuable/show', issuable: @issue, api_awards_path: award_emoji_issue_api_path(@issue) +- @content_class = "limit-container-width" unless fluid_layout + += render 'projects/issues/details_content', issuable: @issue, api_awards_path: award_emoji_issue_api_path(@issue) diff --git a/app/views/projects/jobs/_table.html.haml b/app/views/projects/jobs/_table.html.haml deleted file mode 100644 index 0bb512b4035..00000000000 --- a/app/views/projects/jobs/_table.html.haml +++ /dev/null @@ -1,37 +0,0 @@ -- admin = local_assigns.fetch(:admin, false) - -- if builds.blank? - - if @project - .row.empty-state - .col-12 - .svg-content.svg-250 - = image_tag('jobs-empty-state.svg') - .col-12 - .text-content.gl-text-center - %h4 - = s_('Jobs|Use jobs to automate your tasks') - %p - = s_('Jobs|Jobs are the building blocks of a GitLab CI/CD pipeline. Each job has a specific task, like testing code. To set up jobs in a CI/CD pipeline, add a CI/CD configuration file to your project.') - = link_button_to s_('Jobs|Create CI/CD configuration file'), project_ci_pipeline_editor_path(project), class: 'js-empty-state-button', variant: :confirm - - else - .nothing-here-block= s_('Jobs|No jobs to show') -- else - .table-holder - %table.table.ci-table.builds-page - %thead - %tr - %th= _('Status') - %th= _('Name') - %th= _('Job') - %th= _('Pipeline') - - if admin - %th= _('Project') - %th= _('Runner') - %th= _('Stage') - %th= _('Duration') - %th= _('Coverage') - %th - - = render partial: "projects/ci/builds/build", collection: builds, as: :build, locals: { commit_sha: true, ref: true, pipeline_link: true, stage: true, allow_retry: true, admin: admin } - - = paginate_collection(builds) diff --git a/app/views/projects/labels/edit.html.haml b/app/views/projects/labels/edit.html.haml index 4f4609e6016..ce8b3f70204 100644 --- a/app/views/projects/labels/edit.html.haml +++ b/app/views/projects/labels/edit.html.haml @@ -1,8 +1,9 @@ - add_to_breadcrumbs _("Labels"), project_labels_path(@project) - breadcrumb_title _("Edit") - page_title _("Edit"), @label.name, _("Labels") +- show_lock_on_merge = @project.supports_lock_on_merge? %h1.page-title.gl-font-size-h-display = _('Edit Label') -= render 'shared/labels/form', url: project_label_path(@project, @label), back_path: project_labels_path(@project) += render 'shared/labels/form', url: project_label_path(@project, @label), back_path: project_labels_path(@project), show_lock_on_merge: show_lock_on_merge diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml index 8855e8024b3..4b27b344498 100644 --- a/app/views/projects/labels/index.html.haml +++ b/app/views/projects/labels/index.html.haml @@ -3,7 +3,6 @@ - search = params[:search] - subscribed = params[:subscribed] - labels_or_filters = @labels.exists? || @prioritized_labels.exists? || search.present? || subscribed.present? -= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project - if labels_or_filters #js-promote-label-modal diff --git a/app/views/projects/merge_requests/_code_dropdown.html.haml b/app/views/projects/merge_requests/_code_dropdown.html.haml index 4cab6fac388..bfa33f26453 100644 --- a/app/views/projects/merge_requests/_code_dropdown.html.haml +++ b/app/views/projects/merge_requests/_code_dropdown.html.haml @@ -1,6 +1,6 @@ .gl-md-ml-3.dropdown.gl-dropdown{ class: "gl-display-none! gl-md-display-flex!" } #js-check-out-modal{ data: how_merge_modal_data(@merge_request) } - = button_tag type: 'button', class: "btn dropdown-toggle btn-confirm gl-button gl-dropdown-toggle", data: { toggle: 'dropdown', qa_selector: 'mr_code_dropdown' } do + = button_tag type: 'button', class: "btn dropdown-toggle btn-confirm gl-button gl-dropdown-toggle", data: { toggle: 'dropdown', testid: 'mr-code-dropdown' } do %span.gl-dropdown-button-text= _('Code') = sprite_icon "chevron-down", size: 16, css_class: "dropdown-icon gl-icon gl-ml-2 gl-mr-0!" .dropdown-menu.dropdown-menu-right @@ -16,7 +16,7 @@ = _('Check out branch') - if current_user %li.gl-dropdown-item - = link_to ide_merge_request_path(@merge_request), class: 'dropdown-item', target: '_blank', data: { qa_selector: 'open_in_web_ide_button' } do + = link_to ide_merge_request_path(@merge_request), class: 'dropdown-item', target: '_blank', data: { testid: 'open-in-web-ide-button' } do .gl-dropdown-item-text-wrapper = _('Open in Web IDE') - if Gitlab::CurrentSettings.gitpod_enabled && current_user&.gitpod_enabled @@ -30,10 +30,10 @@ %header.dropdown-header = _('Download') %li.gl-dropdown-item - = link_to merge_request_path(@merge_request, format: :patch), class: 'dropdown-item', download: '', data: { qa_selector: 'download_email_patches_menu_item' } do + = link_to merge_request_path(@merge_request, format: :patch), class: 'dropdown-item', download: '', data: { testid: 'download-email-patches-menu-item' } do .gl-dropdown-item-text-wrapper = _('Patches') %li.gl-dropdown-item - = link_to merge_request_path(@merge_request, format: :diff), class: 'dropdown-item', download: '', data: { qa_selector: 'download_plain_diff_menu_item' } do + = link_to merge_request_path(@merge_request, format: :diff), class: 'dropdown-item', download: '', data: { testid: 'download-plain-diff-menu-item' } do .gl-dropdown-item-text-wrapper = _('Plain diff') diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml index 7b815d996e0..4a7aa9a86ab 100644 --- a/app/views/projects/merge_requests/_merge_request.html.haml +++ b/app/views/projects/merge_requests/_merge_request.html.haml @@ -45,8 +45,10 @@ .issuable-meta %ul.controls.d-flex.align-items-end - if merge_request.merged? + - merged_at = merge_request.merged_at ? l(merge_request.merged_at.to_time) : _("Merge date & time could not be determined") %li.d-none.d-sm-flex - = render Pajamas::BadgeComponent.new(_('Merged'), size: 'sm', variant: 'info') + %a.has-tooltip{ href: "#{merge_request_path(merge_request)}#widget-state", title: merged_at } + = render Pajamas::BadgeComponent.new(_('Merged'), size: 'sm', variant: 'info') - elsif merge_request.closed? %li.d-none.d-sm-flex = render Pajamas::BadgeComponent.new(_('Closed'), size: 'sm', variant: 'danger') diff --git a/app/views/projects/merge_requests/_mr_title.html.haml b/app/views/projects/merge_requests/_mr_title.html.haml index dfa582f4c60..f0e7df8a379 100644 --- a/app/views/projects/merge_requests/_mr_title.html.haml +++ b/app/views/projects/merge_requests/_mr_title.html.haml @@ -15,7 +15,7 @@ .detail-page-header.border-bottom-0.gl-display-block.gl-pt-5{ 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{ data: { hidden: @merge_request.hidden?.to_s } } + .js-header-metadata-root{ 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 69e2487152e..dfb18b52021 100644 --- a/app/views/projects/merge_requests/_page.html.haml +++ b/app/views/projects/merge_requests/_page.html.haml @@ -28,12 +28,12 @@ .merge-request-tabs-holder{ class: "#{'js-tabs-affix' unless ENV['RAILS_ENV'] == 'test'} #{'gl-static' if moved_mr_sidebar_enabled?}" } .merge-request-tabs-container.gl-display-flex.gl-justify-content-space-between{ class: "#{'is-merge-request' if Feature.enabled?(:moved_mr_sidebar, @project) && !fluid_layout}" } %ul.merge-request-tabs.nav-tabs.nav.nav-links.gl-display-flex.gl-flex-nowrap.gl-m-0.gl-p-0{ class: "#{'gl-w-full gl-lg-w-auto!' if Feature.enabled?(:moved_mr_sidebar, @project)}" } - = render "projects/merge_requests/tabs/tab", class: "notes-tab", qa_selector: "notes_tab" do + = render "projects/merge_requests/tabs/tab", class: "notes-tab", testid: "notes-tab" do = tab_link_for @merge_request, :show, force_link: @commit.present? do = _("Overview") = gl_badge_tag @merge_request.related_notes.user.count, { size: :sm }, { class: 'js-discussions-count' } - if @merge_request.source_project - = render "projects/merge_requests/tabs/tab", name: "commits", class: "commits-tab", qa_selector: "commits_tab" do + = render "projects/merge_requests/tabs/tab", name: "commits", class: "commits-tab", testid: "commits-tab" do = tab_link_for @merge_request, :commits do = _("Commits") = gl_badge_tag tab_count_display(@merge_request, @commits_count), { size: :sm }, { class: 'js-commits-count' } @@ -42,7 +42,7 @@ = tab_link_for @merge_request, :pipelines do = _("Pipelines") = gl_badge_tag @number_of_pipelines, { size: :sm }, { class: 'js-pipelines-mr-count' } - = render "projects/merge_requests/tabs/tab", name: "diffs", class: "diffs-tab js-diffs-tab", id: "diffs-tab", qa_selector: "diffs_tab" do + = render "projects/merge_requests/tabs/tab", name: "diffs", class: "diffs-tab js-diffs-tab", id: "diffs-tab", testid: "diffs-tab" do = tab_link_for @merge_request, :diffs do = _("Changes") = gl_badge_tag tab_count_display(@merge_request, @diffs_count), { size: :sm } @@ -61,6 +61,7 @@ = render "projects/merge_requests/tabs/pane", id: "notes", class: "notes voting_notes" do %div{ class: "#{'merge-request-overview' if moved_mr_sidebar_enabled?}" } %section + = render_if_exists "projects/merge_requests/diff_summary" .issuable-discussion.js-vue-notes-event - if @merge_request.description.present? .detail-page-description.gl-pb-0 diff --git a/app/views/projects/merge_requests/creations/_new_compare.html.haml b/app/views/projects/merge_requests/creations/_new_compare.html.haml index 07bae4d2396..e6bd0b05f00 100644 --- a/app/views/projects/merge_requests/creations/_new_compare.html.haml +++ b/app/views/projects/merge_requests/creations/_new_compare.html.haml @@ -14,7 +14,7 @@ = gitlab_ui_form_for [@project, @merge_request], url: project_new_merge_request_path(@project), method: :get, html: { class: "merge-request-form js-requires-input" } do |f| - if params[:nav_source].present? = hidden_field_tag(:nav_source, params[:nav_source]) - .js-merge-request-new-compare.row{ 'data-source-branch-url': project_new_merge_request_branch_from_path(@source_project), 'data-target-branch-url': project_new_merge_request_branch_to_path(@source_project) } + .js-merge-request-new-compare.row{ data: mr_compare_form_data(current_user, @merge_request) } .col-lg-6 .card-new-merge-request %h2.gl-font-size-h2 @@ -31,4 +31,4 @@ = form_errors(@merge_request) .row .col-12 - = f.submit _('Compare branches and continue'), data: { qa_selector: 'compare_branches_button' }, pajamas_button: true + = f.submit _('Compare branches and continue'), data: { testid: 'compare-branches-button' }, pajamas_button: true diff --git a/app/views/projects/merge_requests/creations/_new_submit.html.haml b/app/views/projects/merge_requests/creations/_new_submit.html.haml index a7151421acb..996928ba377 100644 --- a/app/views/projects/merge_requests/creations/_new_submit.html.haml +++ b/app/views/projects/merge_requests/creations/_new_submit.html.haml @@ -50,7 +50,7 @@ = _("Pipelines") = gl_badge_tag @pipelines.size, { size: :sm }, { class: 'gl-tab-counter-badge' } %li.diffs-tab - = link_to url_for(safe_params.merge(action: 'diffs')), data: {target: 'div#diffs', action: 'diffs', toggle: 'tabvue', qa_selector: 'diffs_tab'} do + = link_to url_for(safe_params.merge(action: 'diffs')), data: {target: 'div#diffs', action: 'diffs', toggle: 'tabvue', testid: 'diffs-tab'} do = _("Changes") = gl_badge_tag @merge_request.diff_size, { size: :sm }, { class: 'gl-tab-counter-badge' } diff --git a/app/views/projects/merge_requests/tabs/_tab.html.haml b/app/views/projects/merge_requests/tabs/_tab.html.haml index 9d942da8098..f6c8f4cd87b 100644 --- a/app/views/projects/merge_requests/tabs/_tab.html.haml +++ b/app/views/projects/merge_requests/tabs/_tab.html.haml @@ -1,8 +1,8 @@ - tab_name = local_assigns.fetch(:name, nil) - tab_class = local_assigns.fetch(:class, nil) -- qa_selector = local_assigns.fetch(:qa_selector, nil) +- testid = local_assigns.fetch(:testid, nil) - id = local_assigns.fetch(:id, nil) -- attrs = { class: [tab_class, ("active" if params[:tab] == tab_name)], data: { qa_selector: qa_selector } } +- attrs = { class: [tab_class, ("active" if params[:tab] == tab_name)], data: { testid: testid } } - attrs[:id] = id if id.present? %li{ attrs } diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml index a592062a17d..abf2949938c 100644 --- a/app/views/projects/milestones/_form.html.haml +++ b/app/views/projects/milestones/_form.html.haml @@ -15,7 +15,7 @@ - @gfm_form = true .js-markdown-editor{ data: { render_markdown_path: preview_markdown_path(@project), markdown_docs_path: help_page_path('user/markdown'), - qa_selector: 'milestone_description_field', + testid: 'milestone-description-field', form_field_placeholder: _('Write milestone description...'), supports_quick_actions: 'false', enable_autocomplete: 'true', diff --git a/app/views/projects/mirrors/_authentication_method.html.haml b/app/views/projects/mirrors/_authentication_method.html.haml index 54e1f1a8b20..c4cf128a62a 100644 --- a/app/views/projects/mirrors/_authentication_method.html.haml +++ b/app/views/projects/mirrors/_authentication_method.html.haml @@ -1,14 +1,17 @@ - mirror = f.object -- auth_options = [[_('Password'), 'password'], [_('SSH public key'), 'ssh_public_key']] +- auth_options = [[_('Username and Password'), 'password'], [_('SSH public key'), 'ssh_public_key']] .form-group = f.label :auth_method, _('Authentication method'), class: 'label-bold' = f.select :auth_method, options_for_select(auth_options, mirror.auth_method), - {}, { class: "custom-select gl-form-select js-mirror-auth-type", data: { qa_selector: 'authentication_method_field' } } + {}, { class: "custom-select gl-form-select js-mirror-auth-type gl-max-w-34 gl-display-block", data: { qa_selector: 'authentication_method_field' } } = f.hidden_field :auth_method, value: "password", class: "js-hidden-mirror-auth-type" .form-group - .well-password-auth.collapse.js-well-password-auth + = f.label :user, _('Username'), class: 'label-bold' + = f.text_field :user, class: 'form-control gl-form-input gl-form-input-xl', value: nil, autocomplete: 'off', required: false, autocorrect: 'off', autocapitalize: 'off', spellcheck: false, data: { testid: 'username-field' } +.well-password-auth.collapse.js-well-password-auth + .form-group = f.label :password, _("Password"), class: "label-bold" - = f.password_field :password, class: 'form-control gl-form-input js-mirror-password-field', autocomplete: 'off', data: { qa_selector: 'password_field' } + = f.password_field :password, class: 'form-control gl-form-input js-mirror-password-field gl-form-input-xl', autocomplete: 'off', data: { testid: 'password-field' } diff --git a/app/views/projects/mirrors/_instructions.html.haml b/app/views/projects/mirrors/_instructions.html.haml index 2bd2c7cac44..5a8710a64b0 100644 --- a/app/views/projects/mirrors/_instructions.html.haml +++ b/app/views/projects/mirrors/_instructions.html.haml @@ -4,7 +4,7 @@ = html_escape(_('The repository must be accessible over %{code_open}http://%{code_close}, %{code_open}https://%{code_close}, %{code_open}ssh://%{code_close} or %{code_open}git://%{code_close}.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } %li= html_escape(_('When using the %{code_open}http://%{code_close} or %{code_open}https://%{code_close} protocols, please provide the exact URL to the repository. HTTP redirects will not be followed.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } - %li= html_escape(_('Include the username in the URL if required: %{code_open}https://username@gitlab.company.com/group/project.git%{code_close}.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } + %li= html_escape(_('Do not include the username in the URL, use the username field below if required: %{code_open}https://gitlab.company.com/group/project.git%{code_close}.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } %li - minutes = Gitlab.config.gitlab_shell.git_timeout / 60 = _("The update action will time out after %{number_of_minutes} minutes. For big repositories, use a clone/push combination.") % { number_of_minutes: minutes } diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml index a1c89a9dd30..00837ce1c73 100644 --- a/app/views/projects/mirrors/_mirror_repos.html.haml +++ b/app/views/projects/mirrors/_mirror_repos.html.haml @@ -35,7 +35,7 @@ %div= form_errors(@project) .form-group.has-feedback = label_tag :url, _('Git repository URL'), class: 'label-light' - = text_field_tag :url, nil, class: 'form-control gl-form-input js-mirror-url js-repo-url', placeholder: _('Input the remote repository URL'), required: true, pattern: "(#{protocols}):\/\/.+", autocomplete: 'new-password', data: { qa_selector: 'mirror_repository_url_field' } + = text_field_tag :url, nil, class: 'form-control gl-form-input js-mirror-url js-repo-url gl-form-input-xl', placeholder: _('Input the remote repository URL'), required: true, pattern: "(#{protocols}):\/\/.+", autocomplete: 'new-password', data: { qa_selector: 'mirror_repository_url_field' } = render 'projects/mirrors/instructions' diff --git a/app/views/projects/mirrors/_mirror_repos_form.html.haml b/app/views/projects/mirrors/_mirror_repos_form.html.haml index 1322e677d5a..8378a74311f 100644 --- a/app/views/projects/mirrors/_mirror_repos_form.html.haml +++ b/app/views/projects/mirrors/_mirror_repos_form.html.haml @@ -1,7 +1,7 @@ .form-group = label_tag :mirror_direction, _('Mirror direction'), class: 'label-light' .select-wrapper - = select_tag :mirror_direction, options_for_select([[_('Push'), 'push']]), class: 'form-control gl-form-select select-control js-mirror-direction', disabled: true, data: { qa_selector: 'mirror_direction_field' } + = select_tag :mirror_direction, options_for_select([[_('Push'), 'push']]), class: 'form-control gl-form-select select-control js-mirror-direction gl-max-w-34 gl-display-block', disabled: true, data: { qa_selector: 'mirror_direction_field' } = sprite_icon('chevron-down', css_class: "gl-icon gl-absolute gl-top-3 gl-right-3 gl-text-gray-200") = render partial: "projects/mirrors/mirror_repos_push", locals: { f: f } diff --git a/app/views/projects/mirrors/_mirror_repos_list.html.haml b/app/views/projects/mirrors/_mirror_repos_list.html.haml index 0debd13709d..59611db941f 100644 --- a/app/views/projects/mirrors/_mirror_repos_list.html.haml +++ b/app/views/projects/mirrors/_mirror_repos_list.html.haml @@ -34,7 +34,7 @@ - if mirror_settings_enabled .btn-group.mirror-actions-group{ role: 'group' } - if mirror.ssh_key_auth? - = clipboard_button(text: mirror.ssh_public_key, class: 'gl-button btn btn-default btn-icon', title: _('Copy SSH public key'), qa_selector: 'copy_public_key_button') + = clipboard_button(text: mirror.ssh_public_key, variant: :default, category: :primary, size: :medium, title: _('Copy SSH public key'), testid: 'copy_public_key_button') = render 'shared/remote_mirror_update_button', remote_mirror: mirror = render Pajamas::ButtonComponent.new(variant: :danger, icon: 'remove', diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 59a21cecd39..bf288d3601b 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -29,9 +29,8 @@ = render Pajamas::CardComponent.new(card_options: { class: 'gl-my-5' }) do |c| - c.with_body do %div - - contributing_templates_url = 'https://gitlab.com/gitlab-org/project-templates/contributing' - - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: contributing_templates_url } - = _('Learn how to %{link_start}contribute to the built-in templates%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + - link = link_to('', 'https://gitlab.com/gitlab-org/project-templates/contributing', target: '_blank', rel: 'noopener noreferrer') + = safe_format(_('Learn how to %{link_start}contribute to the built-in templates%{link_end}'), tag_pair(link, :link_start, :link_end)) = gitlab_ui_form_for @project, html: { class: 'new_project' } do |f| .project-template .form-group diff --git a/app/views/projects/notes/_more_actions_dropdown.html.haml b/app/views/projects/notes/_more_actions_dropdown.html.haml index e3cc9199352..54d1bf012f3 100644 --- a/app/views/projects/notes/_more_actions_dropdown.html.haml +++ b/app/views/projects/notes/_more_actions_dropdown.html.haml @@ -5,7 +5,7 @@ = render Pajamas::ButtonComponent.new(icon: 'ellipsis_v', category: :tertiary, button_options: { class: 'note-action-button more-actions-toggle has-tooltip', data: { title: 'More actions', toggle: 'dropdown', container: 'body', qa_selector: 'more_actions_dropdown' }}) %ul.dropdown-menu.more-actions-dropdown.dropdown-open-left %li - = clipboard_button(text: noteable_note_url(note), title: _('Copy reference'), button_text: _('Copy link'), class: 'btn-clipboard', hide_tooltip: true, hide_button_icon: true) + = deprecated_clipboard_button(text: noteable_note_url(note), title: _('Copy reference'), button_text: _('Copy link'), class: 'btn-clipboard', hide_tooltip: true, hide_button_icon: true) - unless is_current_user .gl-ml-n2 .js-report-abuse-dropdown-item{ data: { report_abuse_path: add_category_abuse_reports_path, reported_user_id: note.author.id, reported_from_url: noteable_note_url(note) } } diff --git a/app/views/projects/pages/_pages_settings.html.haml b/app/views/projects/pages/_pages_settings.html.haml index b1ec7a362b7..1aa8148dfed 100644 --- a/app/views/projects/pages/_pages_settings.html.haml +++ b/app/views/projects/pages/_pages_settings.html.haml @@ -1,11 +1,7 @@ -- can_edit_max_page_size = can?(current_user, :update_max_pages_size) -- can_enforce_https_only = Gitlab.config.pages.external_http || Gitlab.config.pages.external_https - = gitlab_ui_form_for @project, url: project_pages_path(@project), html: { class: 'inline', title: pages_https_only_title } do |f| - - if can_edit_max_page_size - = render_if_exists 'shared/pages/max_pages_size_input', form: f + = render_if_exists 'shared/pages/max_pages_size_input', form: f - - if can_enforce_https_only + - if Gitlab.config.pages.external_http || Gitlab.config.pages.external_https .form-group = f.gitlab_ui_checkbox_component :pages_https_only, s_('GitLabPages|Force HTTPS (requires valid certificates)'), @@ -24,5 +20,14 @@ %p.gl-pl-6 = s_("GitLabPages|When enabled, a unique domain is generated to access pages.").html_safe + - if can?(current_user, :pages_multiple_versions, @project) + .form-group + = f.fields_for :project_setting do |settings| + = settings.gitlab_ui_checkbox_component :pages_multiple_versions_enabled, + s_('GitLabPages|Use multiple versions'), + label_options: { class: 'label-bold' } + %p.gl-pl-6 + = s_("GitLabPages|When enabled, you can create multiple versions of your pages site.").html_safe + .gl-mt-3 = f.submit s_('GitLabPages|Save changes'), pajamas_button: true diff --git a/app/views/projects/pages_domains/_dns.html.haml b/app/views/projects/pages_domains/_dns.html.haml index 0edce28bb9d..9ca9360199d 100644 --- a/app/views/projects/pages_domains/_dns.html.haml +++ b/app/views/projects/pages_domains/_dns.html.haml @@ -9,7 +9,7 @@ .input-group = text_field_tag :domain_dns, dns_record , class: "monospace js-select-on-focus form-control", readonly: true .input-group-append - = clipboard_button(target: '#domain_dns', class: 'btn-default input-group-text d-none d-sm-block') + = deprecated_clipboard_button(target: '#domain_dns', class: 'btn-default input-group-text d-none d-sm-block') %p.form-text.text-muted = _("To access this domain create a new DNS record") - if verification_enabled @@ -25,7 +25,7 @@ .input-group = text_field_tag :domain_verification, domain_presenter.verification_record, class: "monospace js-select-on-focus form-control", readonly: true .input-group-append - = clipboard_button(target: '#domain_verification', class: 'btn-default d-none d-sm-block') + = deprecated_clipboard_button(target: '#domain_verification', class: 'btn-default d-none d-sm-block') %p.form-text.text-muted - link_to_help = link_to(_('verify ownership'), help_page_path('user/project/pages/custom_domains_ssl_tls_certification/index.md', anchor: '4-verify-the-domains-ownership')) = _("To %{link_to_help} of your domain, add the above key to a TXT record within your DNS configuration within seven days.").html_safe % { link_to_help: link_to_help } diff --git a/app/views/projects/pipeline_schedules/_form.html.haml b/app/views/projects/pipeline_schedules/_form.html.haml deleted file mode 100644 index df85963218d..00000000000 --- a/app/views/projects/pipeline_schedules/_form.html.haml +++ /dev/null @@ -1,43 +0,0 @@ -= gitlab_ui_form_for [@project, @schedule], as: :schedule, html: { id: "new-pipeline-schedule-form", class: "js-pipeline-schedule-form pipeline-schedule-form" } do |f| - = form_errors(@schedule) - .form-group.row - .col-md-9 - = f.label :description, _('Description'), class: 'label-bold' - = f.text_field :description, class: 'form-control gl-form-input', required: true, autofocus: true, placeholder: s_('PipelineSchedules|Provide a short description for this pipeline') - .form-group.row - .col-md-9 - = f.label :cron, _('Interval Pattern'), class: 'label-bold' - #interval-pattern-input{ data: { initial_interval: @schedule.cron, daily_limit: @schedule.daily_limit } } - .form-group.row - .col-md-9{ data: { testid: 'schedule-timezone' } } - = f.label :cron_timezone, _("Cron Timezone") - .js-timezone-dropdown{ data: { timezone_data: timezone_data.to_json, initial_value: @schedule.cron_timezone, name: 'schedule[cron_timezone]' } } - - .form-group.row - .col-md-9 - = f.label :ref, _('Target branch or tag'), class: 'label-bold' - %div{ data: { testid: 'schedule-target-ref' } } - .js-target-ref-dropdown{ data: { project_id: @project.id, default_branch: @project.default_branch } } - = f.text_field :ref, value: @schedule.ref, id: 'schedule_ref', class: 'hidden', name: 'schedule[ref]', required: true - .form-group.row.js-ci-variable-list-section - .col-md-9 - %label.label-bold - #{ s_('PipelineSchedules|Variables') } - %ul.ci-variable-list - - @schedule.variables.each do |variable| - = render 'ci/variables/variable_row', form_field: 'schedule', variable: variable - = render 'ci/variables/variable_row', form_field: 'schedule' - - if @schedule.variables.size > 0 - = render Pajamas::ButtonComponent.new(category: :secondary, variant: :confirm, button_options: { class: 'gl-mt-3 js-secret-value-reveal-button', data: { secret_reveal_status: "#{@schedule.variables.size == 0}" }}) do - - if @schedule.variables.size == 0 - = n_('Hide value', 'Hide values', @schedule.variables.size) - - else - = n_('Reveal value', 'Reveal values', @schedule.variables.size) - .form-group.row - .col-md-9 - = f.label :active, s_('PipelineSchedules|Activated'), class: 'label-bold' - %div - = f.gitlab_ui_checkbox_component :active, _('Active'), checkbox_options: { value: @schedule.active, required: false } - .footer-block - = f.submit _('Save pipeline schedule'), pajamas_button: true - = link_button_to _('Cancel'), pipeline_schedules_path(@project) diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml deleted file mode 100644 index a050808f13c..00000000000 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ /dev/null @@ -1,45 +0,0 @@ -- if pipeline_schedule - %tr.pipeline-schedule-table-row - %td{ role: 'cell', data: { label: _('Description') } } - %div - = pipeline_schedule.description - %td.branch-name-cell.gl-text-truncate{ role: 'cell', data: { label: s_("PipelineSchedules|Target") } } - %div - - if pipeline_schedule.for_tag? - = sprite_icon('tag', size: 12, css_class: 'gl-vertical-align-middle!') - - else - = sprite_icon('fork', size: 12, css_class: 'gl-vertical-align-middle!') - - if pipeline_schedule.ref.present? - = link_to pipeline_schedule.ref_for_display, project_ref_path(@project, pipeline_schedule.ref_for_display), class: "ref-name" - %td{ role: 'cell', data: { label: _("Last Pipeline") } } - %div - - if pipeline_schedule.last_pipeline - .status-icon-container{ class: "ci-status-icon-#{pipeline_schedule.last_pipeline.status}" } - = link_to project_pipeline_path(@project, pipeline_schedule.last_pipeline.id) do - = ci_icon_for_status(pipeline_schedule.last_pipeline.status) - %span.gl-text-blue-500! ##{pipeline_schedule.last_pipeline.id} - - else - = s_("PipelineSchedules|None") - %td.gl-text-gray-500{ role: 'cell', data: { label: s_("PipelineSchedules|Next Run") }, 'data-testid': 'next-run-cell' } - %div - - if pipeline_schedule.active? && pipeline_schedule.next_run_at - = time_ago_with_tooltip(pipeline_schedule.real_next_run) - - else - = s_("PipelineSchedules|Inactive") - %td{ role: 'cell', data: { label: _("Owner") } } - %div - - if pipeline_schedule.owner - = render Pajamas::AvatarComponent.new(pipeline_schedule.owner, size: 24, class: "gl-mr-2") - = link_to user_path(pipeline_schedule.owner) do - = pipeline_schedule.owner&.name - %td{ role: 'cell', data: { label: _('Actions') } } - .float-right.btn-group - - if can?(current_user, :play_pipeline_schedule, pipeline_schedule) - = link_button_to nil, play_pipeline_schedule_path(pipeline_schedule), method: :post, title: _('Play'), icon: 'play' - - if can?(current_user, :admin_pipeline_schedule, pipeline_schedule) && pipeline_schedule.owner != current_user - = render Pajamas::ButtonComponent.new(button_options: { class: 'js-take-ownership-button has-tooltip', title: s_('PipelineSchedule|Take ownership to edit'), data: { url: take_ownership_pipeline_schedule_path(pipeline_schedule) } }) do - = s_('PipelineSchedules|Take ownership') - - if can?(current_user, :update_pipeline_schedule, pipeline_schedule) - = link_button_to nil, edit_pipeline_schedule_path(pipeline_schedule), title: _('Edit'), icon: 'pencil' - - if can?(current_user, :admin_pipeline_schedule, pipeline_schedule) - = link_button_to nil, pipeline_schedule_path(pipeline_schedule), title: _('Delete'), method: :delete, aria: { label: _('Delete pipeline schedule') }, data: { confirm: _("Are you sure you want to delete this pipeline schedule?"), confirm_btn_variant: 'danger' }, variant: :danger, icon: 'remove' diff --git a/app/views/projects/pipeline_schedules/_table.html.haml b/app/views/projects/pipeline_schedules/_table.html.haml deleted file mode 100644 index 2f96ac6a534..00000000000 --- a/app/views/projects/pipeline_schedules/_table.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -.table-holder - %table.table.ci-table.responsive-table.b-table.gl-table.b-table-stacked-md{ role: 'table' } - %thead{ role: 'rowgroup' } - %tr{ role: 'row' } - %th.table-th-transparent.border-bottom{ role: 'cell', style: 'width: 34%' }= _("Description") - %th.table-th-transparent.border-bottom{ role: 'cell' }= s_("PipelineSchedules|Target") - %th.table-th-transparent.border-bottom{ role: 'cell' }= _("Last Pipeline") - %th.table-th-transparent.border-bottom{ role: 'cell' }= s_("PipelineSchedules|Next Run") - %th.table-th-transparent.border-bottom{ role: 'cell' }= _("Owner") - %th.table-th-transparent.border-bottom{ role: 'cell' } - %tbody{ role: 'rowgroup' } - = render partial: "pipeline_schedule", collection: @schedules diff --git a/app/views/projects/pipeline_schedules/_tabs.html.haml b/app/views/projects/pipeline_schedules/_tabs.html.haml deleted file mode 100644 index f825ef35902..00000000000 --- a/app/views/projects/pipeline_schedules/_tabs.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -= gl_tabs_nav({ class: 'gl-display-flex gl-flex-grow-1 gl-border-0' }) do - = gl_tab_link_to schedule_path_proc.call(nil), { item_active: active_when(scope.nil?) } do - = s_("PipelineSchedules|All") - = gl_tab_counter_badge(number_with_delimiter(all_schedules.count(:id)), { class: 'js-totalbuilds-count' }) - - = gl_tab_link_to schedule_path_proc.call('active'), { item_active: active_when(scope == 'active') } do - = s_("PipelineSchedules|Active") - = gl_tab_counter_badge(number_with_delimiter(all_schedules.active.count(:id))) - - = gl_tab_link_to schedule_path_proc.call('inactive'), { item_active: active_when(scope == 'inactive') } do - = s_("PipelineSchedules|Inactive") - = gl_tab_counter_badge(number_with_delimiter(all_schedules.inactive.count(:id))) diff --git a/app/views/projects/pipeline_schedules/edit.html.haml b/app/views/projects/pipeline_schedules/edit.html.haml index 4e1ae53a101..647c0272852 100644 --- a/app/views/projects/pipeline_schedules/edit.html.haml +++ b/app/views/projects/pipeline_schedules/edit.html.haml @@ -1,12 +1,8 @@ - add_to_breadcrumbs _("Schedules"), pipeline_schedules_path(@project) - breadcrumb_title "##{@schedule.id}" - page_title _("Edit"), @schedule.description, _("Pipeline Schedule") -- add_page_specific_style 'page_bundles/pipeline_schedules' %h1.page-title.gl-font-size-h-display = _("Edit Pipeline Schedule") -- if Feature.enabled?(:pipeline_schedules_vue, @project) - #pipeline-schedules-form-edit{ data: js_pipeline_schedules_form_data(@project, @schedule) } -- else - = render "form" +#pipeline-schedules-form-edit{ data: js_pipeline_schedules_form_data(@project, @schedule) } diff --git a/app/views/projects/pipeline_schedules/index.html.haml b/app/views/projects/pipeline_schedules/index.html.haml index 5051fc6a5f5..15a80b6c7b1 100644 --- a/app/views/projects/pipeline_schedules/index.html.haml +++ b/app/views/projects/pipeline_schedules/index.html.haml @@ -1,28 +1,4 @@ - breadcrumb_title _("Schedules") - page_title _("Pipeline Schedules") -- add_page_specific_style 'page_bundles/pipeline_schedules' -- add_page_specific_style 'page_bundles/ci_status' -- add_page_specific_style 'page_bundles/merge_request' -#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, pipelines_path: project_pipelines_path(@project), new_schedule_path: new_project_pipeline_schedule_path(@project) } } -- else - .top-area - - schedule_path_proc = ->(scope) { pipeline_schedules_path(@project, scope: scope) } - = render "tabs", schedule_path_proc: schedule_path_proc, all_schedules: @all_schedules, scope: @scope - - - if can?(current_user, :create_pipeline_schedule, @project) - .nav-controls - = link_button_to new_project_pipeline_schedule_path(@project), variant: :confirm do - = _('New schedule') - - - if @schedules.present? - %ul.content-list - = render partial: "table" - - else - .nothing-here-block - = _("No schedules") - - #pipeline-take-ownership-modal +#pipeline-schedules-app{ data: { full_path: @project.full_path, pipelines_path: project_pipelines_path(@project), new_schedule_path: new_project_pipeline_schedule_path(@project) } } diff --git a/app/views/projects/pipeline_schedules/new.html.haml b/app/views/projects/pipeline_schedules/new.html.haml index ef99a79b06f..2cd65521ae9 100644 --- a/app/views/projects/pipeline_schedules/new.html.haml +++ b/app/views/projects/pipeline_schedules/new.html.haml @@ -1,14 +1,10 @@ - breadcrumb_title _('Schedules') - @breadcrumb_link = namespace_project_pipeline_schedules_path(@project.namespace, @project) - page_title _("New Pipeline Schedule") -- add_page_specific_style 'page_bundles/pipeline_schedules' - add_to_breadcrumbs("Pipelines", project_pipelines_path(@project)) %h1.page-title.gl-font-size-h-display = _("Schedule a new pipeline") -- if Feature.enabled?(:pipeline_schedules_vue, @project) - #pipeline-schedules-form-new{ data: js_pipeline_schedules_form_data(@project, @schedule) } -- else - = render "form" +#pipeline-schedules-form-new{ data: js_pipeline_schedules_form_data(@project, @schedule) } diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index 6b6aaaad802..3eb24873daf 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -1,8 +1,6 @@ - add_page_specific_style 'page_bundles/members' - page_title _("Members") -= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project - .row.gl-mt-3 .col-lg-12 .gl-display-flex.gl-flex-wrap @@ -26,7 +24,7 @@ - if can_admin_project_member?(@project) .js-invite-members-trigger{ data: { variant: 'confirm', classes: 'gl-md-w-auto gl-w-full gl-md-ml-3 gl-md-mt-0 gl-mt-3', - trigger_source: 'project-members-page', + trigger_source: 'project_members_page', display_text: _('Invite members') } } - else - if project_can_be_shared? diff --git a/app/views/projects/protected_tags/_create_protected_tag.html.haml b/app/views/projects/protected_tags/_create_protected_tag.html.haml index ef3974b04b5..1dc31503db9 100644 --- a/app/views/projects/protected_tags/_create_protected_tag.html.haml +++ b/app/views/projects/protected_tags/_create_protected_tag.html.haml @@ -1,9 +1,5 @@ - content_for :create_access_levels do .create_access_levels-container - = dropdown_tag('Select', - options: { toggle_class: 'js-allowed-to-create js-multiselect wide', - dropdown_class: 'dropdown-menu-selectable capitalize-header', - dropdown_qa_selector: 'access_levels_content', dropdown_testid: 'allowed-to-create-dropdown', - data: { field_name: 'protected_tag[create_access_levels_attributes][0][access_level]', input_id: 'create_access_levels_attributes', qa_selector: 'access_levels_dropdown' }}) + .js-allowed-to-create = render 'projects/protected_tags/shared/create_protected_tag' diff --git a/app/views/projects/protected_tags/_protected_tag_create_access_levels.haml b/app/views/projects/protected_tags/_protected_tag_create_access_levels.haml index 30b9e3e9005..389a88293a5 100644 --- a/app/views/projects/protected_tags/_protected_tag_create_access_levels.haml +++ b/app/views/projects/protected_tags/_protected_tag_create_access_levels.haml @@ -1,8 +1,5 @@ - protected_tag = local_assigns.fetch(:protected_tag) - create_access_level = local_assigns.fetch(:create_access_level) -- dropdown_label = create_access_level.first&.humanize || 'Select' = hidden_field_tag "allowed_to_create_#{protected_tag.id}", create_access_level.first&.access_level -= dropdown_tag(dropdown_label, - options: { toggle_class: 'js-allowed-to-create js-multiselect', dropdown_class: 'dropdown-menu-selectable capitalize-header js-allowed-to-create-container', - data: { field_name: "allowed_to_create_#{protected_tag.id}", preselected_items: access_levels_data(create_access_level) }}) +.js-allowed-to-create{ data: { preselected_items: access_levels_data(create_access_level).to_json } } diff --git a/app/views/projects/settings/access_tokens/index.html.haml b/app/views/projects/settings/access_tokens/index.html.haml index b81c3bc9704..ea3ad370fb5 100644 --- a/app/views/projects/settings/access_tokens/index.html.haml +++ b/app/views/projects/settings/access_tokens/index.html.haml @@ -18,9 +18,8 @@ = _('Project access token creation is disabled in this group.') - root_group = @project.group.root_ancestor - if current_user.can?(:admin_group, root_group) - - group_settings_link = edit_group_path(root_group) - - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: group_settings_link } - = _('You can enable project access token creation in %{link_start}group settings%{link_end}.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + - link = link_to('', edit_group_path(root_group), target: '_blank', rel: 'noopener noreferrer') + = safe_format(_('You can enable project access token creation in %{link_start}group settings%{link_end}.'), tag_pair(link, :link_start, :link_end)) = html_escape(_('You can still use and manage existing tokens. %{link_start}Learn more.%{link_end}')) % { link_start: help_link_start, link_end: '</a>'.html_safe } #js-new-access-token-app{ data: { access_token_type: type } } diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 6de39058455..17953e3bc14 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -25,9 +25,9 @@ %p.gl-text-secondary - auto_devops_url = help_page_path('topics/autodevops/index') - quickstart_url = help_page_path('topics/autodevops/cloud_deployments/auto_devops_with_gke') - - auto_devops_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: auto_devops_url } - - quickstart_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: quickstart_url } - = s_('AutoDevOps|%{auto_devops_start}Automate building, testing, and deploying%{auto_devops_end} your applications based on your continuous integration and delivery configuration. %{quickstart_start}How do I get started?%{quickstart_end}').html_safe % { auto_devops_start: auto_devops_start, auto_devops_end: '</a>'.html_safe, quickstart_start: quickstart_start, quickstart_end: '</a>'.html_safe } + - auto_devops_link = link_to('', auto_devops_url, target: '_blank', rel: 'noopener noreferrer') + - quickstart_link = link_to('', quickstart_url, target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('AutoDevOps|%{auto_devops_start}Automate building, testing, and deploying%{auto_devops_end} your applications based on your continuous integration and delivery configuration. %{quickstart_start}How do I get started?%{quickstart_end}'), tag_pair(auto_devops_link, :auto_devops_start, :auto_devops_end), tag_pair(quickstart_link, :quickstart_start, :quickstart_end)) .settings-content = render 'autodevops_form', auto_devops_enabled: @project.auto_devops_enabled? @@ -44,10 +44,7 @@ = _("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 - - if Feature.enabled?(:project_runners_vue_ui, @project) - #js-project-runners{ data: { project_full_path: @project.full_path } } - - else - = render 'projects/runners/settings' + = 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/integrations/_form.html.haml b/app/views/projects/settings/integrations/_form.html.haml index 97c7729de44..d2df01c22bb 100644 --- a/app/views/projects/settings/integrations/_form.html.haml +++ b/app/views/projects/settings/integrations/_form.html.haml @@ -15,9 +15,12 @@ = render 'shared/integrations/slack_notifications_deprecation_alert' %h2.gl-mb-0.gl-display-flex.gl-align-items-center.gl-gap-3 + = render Pajamas::AvatarComponent.new(integration, size: 64, alt: '') = integration.title - if integration.operating? - = render Pajamas::BadgeComponent.new(s_('FeatureFlags|Active'), variant: 'success') + = render Pajamas::BadgeComponent.new(_('Active'), variant: 'success', icon: 'status-success') + - elsif integration.persisted? + = render Pajamas::BadgeComponent.new(_('Inactive'), variant: 'neutral', icon: 'status-paused') = render 'shared/integration_settings', integration: integration - if lookup_context.template_exists?('show', "shared/integrations/#{integration.to_param}", true) diff --git a/app/views/projects/settings/integrations/index.html.haml b/app/views/projects/settings/integrations/index.html.haml index 6c0c99543cc..dca028d6167 100644 --- a/app/views/projects/settings/integrations/index.html.haml +++ b/app/views/projects/settings/integrations/index.html.haml @@ -6,7 +6,7 @@ %section.js-search-settings-section %h3= _('Integrations') - - integrations_link_start = '<a href="%{url}">'.html_safe % { url: help_page_url('user/project/integrations/index') } - - webhooks_link_start = '<a href="%{url}">'.html_safe % { url: project_hooks_path(@project) } - %p.gl-text-secondary= _("%{integrations_link_start}Integrations%{link_end} enable you to make third-party applications part of your GitLab workflow. If the available integrations don't meet your needs, consider using a %{webhooks_link_start}webhook%{link_end}.").html_safe % { integrations_link_start: integrations_link_start, webhooks_link_start: webhooks_link_start, link_end: '</a>'.html_safe } + - integrations_link = link_to('', help_page_url('user/project/integrations/index')) + - webhooks_link = link_to('', project_hooks_path(@project)) + %p.gl-text-secondary= safe_format(_("%{integrations_link_start}Integrations%{link_end} enable you to make third-party applications part of your GitLab workflow. If the available integrations don't meet your needs, consider using a %{webhooks_link_start}webhook%{link_end}."), tag_pair(integrations_link, :integrations_link_start, :link_end), tag_pair(webhooks_link, :webhooks_link_start, :link_end)) = render 'shared/integrations/index', integrations: @integrations diff --git a/app/views/projects/settings/merge_requests/_merge_request_merge_checks_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_merge_checks_settings.html.haml new file mode 100644 index 00000000000..fa9b39e0846 --- /dev/null +++ b/app/views/projects/settings/merge_requests/_merge_request_merge_checks_settings.html.haml @@ -0,0 +1,8 @@ +- form = local_assigns.fetch(:form) + +.form-group + %b= s_('ProjectSettings|Merge checks') + %p.text-secondary= s_('ProjectSettings|These checks must pass before merge requests can be merged.') + = render 'projects/settings/merge_requests/merge_request_pipelines_and_threads_options', form: form, project: @project + = render_if_exists 'projects/settings/merge_requests/merge_request_merge_checks_status_checks', form: form, project: @project + = render_if_exists 'projects/settings/merge_requests/merge_request_merge_checks_jira_enforcement', form: form, project: @project diff --git a/app/views/projects/_merge_request_merge_commit_template.html.haml b/app/views/projects/settings/merge_requests/_merge_request_merge_commit_template.html.haml index 502014b7279..da1965f549c 100644 --- a/app/views/projects/_merge_request_merge_commit_template.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_merge_commit_template.html.haml @@ -9,6 +9,5 @@ %p.form-text.text-muted = s_('ProjectSettings|Leave empty to use default template.') = sprintf(s_('ProjectSettings|Maximum %{maxLength} characters.'), { maxLength: Project::MAX_COMMIT_TEMPLATE_LENGTH }) - - configure_the_merge_commit_message_help_link_url = help_page_path('user/project/merge_requests/commit_templates.md') - - configure_the_merge_commit_message_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: configure_the_merge_commit_message_help_link_url } - = s_('ProjectSettings|%{link_start}What variables can I use?%{link_end}').html_safe % { link_start: configure_the_merge_commit_message_help_link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/merge_requests/commit_templates.md'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('ProjectSettings|%{link_start}What variables can I use?%{link_end}'), tag_pair(link, :link_start, :link_end)) diff --git a/app/views/projects/_merge_request_merge_method_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_merge_method_settings.html.haml index dd32d3f9d92..dd32d3f9d92 100644 --- a/app/views/projects/_merge_request_merge_method_settings.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_merge_method_settings.html.haml diff --git a/app/views/projects/_merge_request_merge_options_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_merge_options_settings.html.haml index e91c001ea3d..db7e59d6e2a 100644 --- a/app/views/projects/_merge_request_merge_options_settings.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_merge_options_settings.html.haml @@ -3,8 +3,8 @@ .form-group#project-merge-options{ data: { project_full_path: @project.full_path } } %b= s_('ProjectSettings|Merge options') %p.text-secondary= s_('ProjectSettings|Additional settings that influence how and when merges are done.') - = render_if_exists 'projects/merge_pipelines_settings', form: form - = render_if_exists 'projects/merge_trains_settings', form: form + = render_if_exists 'projects/settings/merge_requests/merge_pipelines_settings', form: form + = render_if_exists 'projects/settings/merge_requests/merge_trains_settings', form: form = form.gitlab_ui_checkbox_component :resolve_outdated_diff_discussions, s_('ProjectSettings|Automatically resolve merge request diff threads when they become outdated') = form.gitlab_ui_checkbox_component :printing_merge_request_link_enabled, diff --git a/app/views/projects/settings/merge_requests/_merge_request_merge_suggestions_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_merge_suggestions_settings.html.haml new file mode 100644 index 00000000000..501288f727b --- /dev/null +++ b/app/views/projects/settings/merge_requests/_merge_request_merge_suggestions_settings.html.haml @@ -0,0 +1,13 @@ +- form = local_assigns.fetch(:form) + +.form-group + %b= s_('ProjectSettings|Merge suggestions') + %p.text-secondary + = s_('ProjectSettings|The commit message used when applying merge request suggestions.') + .mb-2 + = form.text_field :suggestion_commit_message, class: 'form-control mb-2', placeholder: Gitlab::Suggestions::CommitMessage::DEFAULT_SUGGESTION_COMMIT_MESSAGE + %p.form-text.text-muted + = s_('ProjectSettings|Leave empty to use default template.') + = sprintf(s_('ProjectSettings|Maximum %{maxLength} characters.'), { maxLength: Project::MAX_SUGGESTIONS_TEMPLATE_LENGTH }) + - link = link_to('', help_page_path('user/project/merge_requests/reviews/suggestions.md', anchor: 'configure-the-commit-message-for-applied-suggestions'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('ProjectSettings|%{link_start}What variables can I use?%{link_end}'), tag_pair(link, :link_start, :link_end)) diff --git a/app/views/projects/_merge_request_pipelines_and_threads_options.html.haml b/app/views/projects/settings/merge_requests/_merge_request_pipelines_and_threads_options.html.haml index a9609434f15..a9609434f15 100644 --- a/app/views/projects/_merge_request_pipelines_and_threads_options.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_pipelines_and_threads_options.html.haml diff --git a/app/views/projects/settings/merge_requests/_merge_request_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_settings.html.haml new file mode 100644 index 00000000000..9449fc7f4ae --- /dev/null +++ b/app/views/projects/settings/merge_requests/_merge_request_settings.html.haml @@ -0,0 +1,18 @@ +- form = local_assigns.fetch(:form) + += render 'projects/settings/merge_requests/merge_request_merge_method_settings', project: @project, form: form + += render 'projects/settings/merge_requests/merge_request_merge_options_settings', project: @project, form: form + += render 'projects/settings/merge_requests/merge_request_squash_options_settings', form: form + += render 'projects/settings/merge_requests/merge_request_merge_checks_settings', project: @project, form: form + += render 'projects/settings/merge_requests/merge_request_merge_suggestions_settings', project: @project, form: form + += render 'projects/settings/merge_requests/merge_request_merge_commit_template', project: @project, form: form + += render 'projects/settings/merge_requests/merge_request_squash_commit_template', project: @project, form: form + +- if @project.forked? + = render 'projects/settings/merge_requests/merge_request_target_project_settings', project: @project, form: form diff --git a/app/views/projects/_merge_request_settings_description_text.html.haml b/app/views/projects/settings/merge_requests/_merge_request_settings_description_text.html.haml index 123520acad8..123520acad8 100644 --- a/app/views/projects/_merge_request_settings_description_text.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_settings_description_text.html.haml diff --git a/app/views/projects/_merge_request_squash_commit_template.html.haml b/app/views/projects/settings/merge_requests/_merge_request_squash_commit_template.html.haml index 4d1b89bea83..bc6530b927c 100644 --- a/app/views/projects/_merge_request_squash_commit_template.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_squash_commit_template.html.haml @@ -9,6 +9,5 @@ %p.form-text.text-muted = s_('ProjectSettings|Leave empty to use default template.') = sprintf(s_('ProjectSettings|Maximum %{maxLength} characters.'), { maxLength: Project::MAX_COMMIT_TEMPLATE_LENGTH }) - - configure_the_squash_commit_message_help_link_url = help_page_path('user/project/merge_requests/commit_templates.md') - - configure_the_squash_commit_message_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: configure_the_squash_commit_message_help_link_url } - = s_('ProjectSettings|%{link_start}What variables can I use?%{link_end}').html_safe % { link_start: configure_the_squash_commit_message_help_link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/merge_requests/commit_templates.md'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('ProjectSettings|%{link_start}What variables can I use?%{link_end}'), tag_pair(link, :link_start, :link_end)) diff --git a/app/views/projects/_merge_request_squash_options_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_squash_options_settings.html.haml index 372c0723600..372c0723600 100644 --- a/app/views/projects/_merge_request_squash_options_settings.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_squash_options_settings.html.haml diff --git a/app/views/projects/_merge_request_target_project_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_target_project_settings.html.haml index 6f2917f24e0..6f2917f24e0 100644 --- a/app/views/projects/_merge_request_target_project_settings.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_target_project_settings.html.haml diff --git a/app/views/projects/settings/merge_requests/show.html.haml b/app/views/projects/settings/merge_requests/show.html.haml index ef528d17fc9..01af028f30c 100644 --- a/app/views/projects/settings/merge_requests/show.html.haml +++ b/app/views/projects/settings/merge_requests/show.html.haml @@ -5,15 +5,16 @@ %section.rspec-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings.expanded{ class: [('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)], data: { qa_selector: 'merge_request_settings_content' } } .settings-header %h4= _('Merge requests') - = render_if_exists 'projects/merge_request_settings_description_text' + = render_if_exists 'projects/settings/merge_requests/merge_request_settings_description_text' .settings-content = render_if_exists 'shared/promotions/promote_mr_features' = gitlab_ui_form_for @project, url: project_settings_merge_requests_path(@project), html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f| %input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-settings' } - = render 'projects/merge_request_settings', form: f + = render 'projects/settings/merge_requests/merge_request_settings', form: f = f.submit _('Save changes'), class: "rspec-save-merge-request-changes", data: { qa_selector: 'save_merge_request_changes_button' }, pajamas_button: true = render_if_exists 'projects/settings/merge_requests/merge_request_approvals_settings', expanded: true = render_if_exists 'projects/settings/merge_requests/suggested_reviewers_settings', expanded: true += render_if_exists 'projects/settings/merge_requests/target_branch_rules_settings' diff --git a/app/views/projects/settings/operations/_alert_management.html.haml b/app/views/projects/settings/operations/_alert_management.html.haml index 398c7758d66..c29cedd8250 100644 --- a/app/views/projects/settings/operations/_alert_management.html.haml +++ b/app/views/projects/settings/operations/_alert_management.html.haml @@ -3,7 +3,7 @@ - add_page_specific_style 'page_bundles/alert_management_settings' - add_page_specific_style 'page_bundles/incident_management_list' -%section.settings.no-animate#js-alert-management-settings{ class: ('expanded' if expanded), data: { qa_selector: 'alerts_settings_content' } } +%section.settings.no-animate#js-alert-management-settings{ class: ('expanded' if expanded), data: { testid: 'alerts-settings-content' } } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _('Alerts') diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 8a35db357ee..c76fa5e2220 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -6,7 +6,6 @@ = content_for :meta_tags do = auto_discovery_link_tag(:atom, project_path(@project, rss_url_options), title: "#{@project.name} activity") -= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project = render_if_exists 'shared/promotions/promote_mobile_devops', project: @project = render partial: 'flash_messages', locals: { project: @project } diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml index 53c3d16ee64..281eac6c773 100644 --- a/app/views/projects/tags/new.html.haml +++ b/app/views/projects/tags/new.html.haml @@ -11,9 +11,8 @@ = s_('TagsPage|New Tag') %p.gl-text-secondary - - link_start = '<a href="%{url}">'.html_safe % { url: new_namespace_project_release_path } - - link_end = '</a>'.html_safe - = s_('TagsPage|Do you want to create a release with the new tag? You can do that in the %{link_start}New release page%{link_end}.').html_safe % { link_start: link_start, link_end: link_end } + - link = link_to('', new_namespace_project_release_path) + = safe_format(s_('TagsPage|Do you want to create a release with the new tag? You can do that in the %{link_start}New release page%{link_end}.'), tag_pair(link, :link_start, :link_end)) = form_tag namespace_project_tags_path, method: :post, id: "new-tag-form", class: "common-note-form tag-form js-quick-submit js-requires-input" do .form-group.row diff --git a/app/views/projects/tracing/index.html.haml b/app/views/projects/tracing/index.html.haml deleted file mode 100644 index ae6608cf343..00000000000 --- a/app/views/projects/tracing/index.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -- page_title _('Tracing') - -#js-tracing{ data: { view_model: observability_tracing_view_model(@project) } } - diff --git a/app/views/projects/tracing/show.html.haml b/app/views/projects/tracing/show.html.haml deleted file mode 100644 index 4ba316a0b5c..00000000000 --- a/app/views/projects/tracing/show.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- page_title _('Trace Details') -- add_to_breadcrumbs _('Tracing'), project_tracing_index_path(@project) - -#js-tracing-details{ data: { view_model: observability_tracing_details_model(@project, @trace_id) } } - diff --git a/app/views/projects/usage_quotas/index.html.haml b/app/views/projects/usage_quotas/index.html.haml index 616af3f3338..6f2a2aacf66 100644 --- a/app/views/projects/usage_quotas/index.html.haml +++ b/app/views/projects/usage_quotas/index.html.haml @@ -1,9 +1,6 @@ - page_title s_("UsageQuota|Usage") -- add_page_specific_style 'page_bundles/projects_usage_quotas' - @force_desktop_expanded_sidebar = true -= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project - = render Pajamas::AlertComponent.new(title: _('Repository usage recalculation started'), variant: :info, alert_options: { class: 'js-recalculation-started-alert gl-mt-4 gl-mb-5 gl-display-none' }) do |c| |