diff options
Diffstat (limited to 'app/views/projects')
60 files changed, 204 insertions, 165 deletions
diff --git a/app/views/projects/_activity.html.haml b/app/views/projects/_activity.html.haml index 402affc7b0e..118f6fb1296 100644 --- a/app/views/projects/_activity.html.haml +++ b/app/views/projects/_activity.html.haml @@ -4,7 +4,7 @@ = render 'shared/event_filter' .controls.gl-display-flex = link_to project_path(@project, rss_url_options), title: s_("ProjectActivityRSS|Subscribe"), class: 'btn gl-button btn-default btn-icon d-none d-sm-inline-flex has-tooltip' do - = sprite_icon('rss', css_class: 'qa-rss-icon gl-icon') + = sprite_icon('rss', css_class: 'gl-icon') - if is_project_overview && can?(current_user, :download_code, @project) .project-clone-holder.d-none.d-md-inline-flex.gl-ml-2 = render "projects/buttons/clone", dropdown_class: 'dropdown-menu-right' diff --git a/app/views/projects/_commit_button.html.haml b/app/views/projects/_commit_button.html.haml index 952c6daf415..9962e03995b 100644 --- a/app/views/projects/_commit_button.html.haml +++ b/app/views/projects/_commit_button.html.haml @@ -1,5 +1,8 @@ .form-actions.gl-display-flex - = render Pajamas::ButtonComponent.new(type: :submit, variant: :confirm, button_options: { id: 'commit-changes', class: 'js-commit-button', data: { qa_selector: 'commit_button' } }) do + - submit_button_options = { type: :submit, variant: :confirm, button_options: { id: 'commit-changes', class: 'js-commit-button', data: { qa_selector: 'commit_button' } } } + = render Pajamas::ButtonComponent.new(**submit_button_options) do + = _('Commit changes') + = render Pajamas::ButtonComponent.new(loading: true, disabled: true, **submit_button_options.merge({ button_options: { class: 'js-commit-button-loading gl-display-none' } })) do = _('Commit changes') = render Pajamas::ButtonComponent.new(href: cancel_path, button_options: { class: 'gl-ml-3', id: 'cancel-changes', aria: { label: _('Discard changes') }, data: { confirm: leave_edit_message, confirm_btn_variant: "danger" } }) do diff --git a/app/views/projects/_errors.html.haml b/app/views/projects/_errors.html.haml index 5982aaf3622..2dba22d3be6 100644 --- a/app/views/projects/_errors.html.haml +++ b/app/views/projects/_errors.html.haml @@ -1 +1 @@ -= form_errors(@project, pajamas_alert: true) += form_errors(@project) diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index c220aa66c81..7ff58d12b9c 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -10,12 +10,12 @@ = project_icon(@project, alt: @project.name, class: 'avatar avatar-tile s64', width: 64, height: 64, itemprop: 'image') .d-flex.flex-column.flex-wrap.align-items-baseline .d-inline-flex.align-items-baseline - %h1.home-panel-title.gl-mt-3.gl-mb-2.gl-font-size-h1.gl-line-height-24.gl-font-weight-bold{ data: { qa_selector: 'project_name_content' }, itemprop: 'name' } + %h1.home-panel-title.gl-mt-3.gl-mb-2.gl-font-size-h1{ data: { qa_selector: 'project_name_content' }, itemprop: 'name' } = @project.name - %span.visibility-icon.text-secondary.gl-ml-2.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@project) } + %span.visibility-icon.gl-text-secondary.gl-ml-2.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@project) } = visibility_level_icon(@project.visibility_level, options: { class: 'icon' }) = render_if_exists 'compliance_management/compliance_framework/compliance_framework_badge', project: @project - .home-panel-metadata.text-secondary.gl-font-base.gl-font-weight-normal.gl-line-height-normal{ data: { qa_selector: 'project_id_content' }, itemprop: 'identifier' } + .home-panel-metadata.gl-font-sm.gl-text-secondary.gl-font-base.gl-font-weight-normal.gl-line-height-normal{ data: { qa_selector: 'project_id_content' }, itemprop: 'identifier' } - if can?(current_user, :read_project, @project) %span.gl-display-inline-block.gl-vertical-align-middle = s_('ProjectPage|Project ID: %{project_id}') % { project_id: @project.id } diff --git a/app/views/projects/_service_desk_settings.html.haml b/app/views/projects/_service_desk_settings.html.haml index cee3d9071b6..349cd88437f 100644 --- a/app/views/projects/_service_desk_settings.html.haml +++ b/app/views/projects/_service_desk_settings.html.haml @@ -17,6 +17,7 @@ selected_file_template_project_id: "#{@project.service_desk_setting&.file_template_project_id}", outgoing_name: "#{@project.service_desk_setting&.outgoing_name}", project_key: "#{@project.service_desk_setting&.project_key}", - templates: available_service_desk_templates_for(@project) } } + templates: available_service_desk_templates_for(@project), + public_project: "#{@project.public?}" } } - elsif show_callout?('promote_service_desk_dismissed') = render 'shared/promotions/promote_servicedesk' diff --git a/app/views/projects/_stat_anchor_list.html.haml b/app/views/projects/_stat_anchor_list.html.haml index 4a21cb32c20..1409b28e735 100644 --- a/app/views/projects/_stat_anchor_list.html.haml +++ b/app/views/projects/_stat_anchor_list.html.haml @@ -2,7 +2,7 @@ - project_buttons = local_assigns.fetch(:project_buttons, false) - return unless anchors.any? -%ul.nav.gl-gap-3 +%ul.nav{ class: (project_buttons ? 'gl-gap-3' : 'gl-gap-5') } - anchors.each do |anchor| %li.nav-item = link_to_if(anchor.link, anchor.label, anchor.link, stat_anchor_attrs(anchor)) do diff --git a/app/views/projects/activity.html.haml b/app/views/projects/activity.html.haml index 6a4760c3954..674b21b66b9 100644 --- a/app/views/projects/activity.html.haml +++ b/app/views/projects/activity.html.haml @@ -1,4 +1,6 @@ - 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/blame/show.html.haml b/app/views/projects/blame/show.html.haml index b44c773adff..f2c4fe017f2 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -1,9 +1,9 @@ - page_title _("Blame"), @blob.path, @ref -#blob-content-holder.tree-holder +#blob-content-holder.tree-holder{ data: { testid: 'blob-content-holder' } } = render "projects/blob/breadcrumb", blob: @blob, blame: true - .file-holder + .file-holder.gl-overflow-hidden = render "projects/blob/header", blob: @blob, blame: true .file-blame-legend @@ -20,7 +20,7 @@ %span.legend-box.legend-box-9 %span.right-label Older - .table-responsive.file-content.blame.code{ class: user_color_scheme, data: { qa_selector: 'blame_file_content' } } + .table-responsive.file-content.blame.code{ class: "#{user_color_scheme} gl-rounded-0!", data: { qa_selector: 'blame_file_content' } } %table - current_line = @blame.first_line - @blame.groups.each do |blame_group| @@ -59,5 +59,11 @@ - current_line += line_count - - if blame_pagination - = paginate(blame_pagination, theme: "gitlab") + - if @blame_pagination && @blame_pagination.total_pages > 1 + .gl-display-flex.gl-justify-content-center.gl-flex-direction-column.gl-align-items-center.gl-p-3.gl-bg-gray-50.gl-border-t-solid.gl-border-t-1.gl-border-gray-100 + = _('For faster browsing, not all history is shown.') + = render Pajamas::ButtonComponent.new(href: namespace_project_blame_path(namespace_id: @project.namespace, project_id: @project, id: @id, no_pagination: true), size: :small, button_options: { class: 'gl-mt-3' }) do |c| + = _('View entire blame') + + - if @blame_pagination + = paginate(@blame_pagination, theme: "gitlab") diff --git a/app/views/projects/blob/_header.html.haml b/app/views/projects/blob/_header.html.haml index 8260aa0fb7e..9c07713b9f8 100644 --- a/app/views/projects/blob/_header.html.haml +++ b/app/views/projects/blob/_header.html.haml @@ -6,11 +6,6 @@ .file-actions.gl-display-flex.gl-align-items-center.gl-flex-wrap.gl-md-justify-content-end< = render 'projects/blob/viewer_switcher', blob: blob unless blame = render 'shared/web_ide_button', blob: blob - .btn-group{ role: "group", class: ("gl-ml-3" if current_user) }> - = render_if_exists 'projects/blob/header_file_locks_link' - - if current_user - = replace_blob_link(@project, @ref, @path, blob: blob) - = delete_blob_link(@project, @ref, @path, blob: blob) .btn-group.gl-ml-3{ role: "group" } = copy_blob_source_button(blob) unless blame = open_raw_blob_button(blob) diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml index 220319d31b5..528999f5c89 100644 --- a/app/views/projects/blob/edit.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -2,6 +2,7 @@ - page_title _("Edit"), @blob.path, @ref - content_for :prefetch_asset_tags do - webpack_preload_asset_tag('monaco') +- add_page_specific_style 'page_bundles/editor' - if @conflict = render Pajamas::AlertComponent.new(alert_options: { class: 'gl-mb-5 gl-mt-5' }, diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml index 27f64104cf4..81b2715b228 100644 --- a/app/views/projects/blob/new.html.haml +++ b/app/views/projects/blob/new.html.haml @@ -1,5 +1,6 @@ - breadcrumb_title _("Repository") - page_title _("New File"), @path.presence, @ref +- add_page_specific_style 'page_bundles/editor' %h1.page-title.blob-new-page-title.gl-font-size-h-display = _('New file') diff --git a/app/views/projects/blob/show.html.haml b/app/views/projects/blob/show.html.haml index 16ecc1cc5a0..33b2229f5d1 100644 --- a/app/views/projects/blob/show.html.haml +++ b/app/views/projects/blob/show.html.haml @@ -3,6 +3,7 @@ - signatures_path = namespace_project_signatures_path(namespace_id: @project.namespace.full_path, project_id: @project.path, id: @last_commit, limit: 1) - content_for :prefetch_asset_tags do - webpack_preload_asset_tag('monaco', prefetch: true) +- add_page_startup_graphql_call('repository/blob_info', { projectPath: @project.full_path, ref: current_ref, filePath: @blob.path, shouldFetchRawText: @blob.rendered_as_text? && !@blob.rich_viewer }) .js-signature-container{ data: { 'signatures-path': signatures_path } } diff --git a/app/views/projects/branch_rules/_show.html.haml b/app/views/projects/branch_rules/_show.html.haml index af0e656d301..46665fdb450 100644 --- a/app/views/projects/branch_rules/_show.html.haml +++ b/app/views/projects/branch_rules/_show.html.haml @@ -9,4 +9,4 @@ = _('Define rules for who can push, merge, and the required approvals for each branch.') .settings-content.gl-pr-0 - #js-branch-rules + #js-branch-rules{ data: { project_path: @project.full_path } } diff --git a/app/views/projects/branches/new.html.haml b/app/views/projects/branches/new.html.haml index f8bee5a69e9..63d0cf7145d 100644 --- a/app/views/projects/branches/new.html.haml +++ b/app/views/projects/branches/new.html.haml @@ -11,12 +11,12 @@ = form_tag namespace_project_branches_path, method: :post, id: "new-branch-form", class: "js-create-branch-form js-requires-input" do .form-group.row - = label_tag :branch_name, nil, class: 'col-form-label col-sm-2' + = label_tag :branch_name, _('Branch name'), class: 'col-form-label col-sm-2' .col-sm-10 = text_field_tag :branch_name, params[:branch_name], required: true, autofocus: true, class: 'form-control js-branch-name monospace' .form-text.text-muted.text-danger.js-branch-name-error .form-group.row - = label_tag :ref, 'Create from', class: 'col-form-label col-sm-2' + = label_tag :ref, _('Create from'), class: 'col-form-label col-sm-2' .col-sm-10.create-from .dropdown = hidden_field_tag :ref, default_ref @@ -24,7 +24,8 @@ .text-left.dropdown-toggle-text= default_ref = sprite_icon('chevron-down', css_class: "dropdown-menu-toggle-icon gl-top-3") = render 'shared/ref_dropdown', dropdown_class: 'wide' - .form-text.text-muted Existing branch name, tag, or commit SHA + .form-text.text-muted + = _('Existing branch name, tag, or commit SHA') .form-actions = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { type: 'submit', class: 'gl-mr-3' }) do = _('Create branch') diff --git a/app/views/projects/buttons/_clone.html.haml b/app/views/projects/buttons/_clone.html.haml index 5fd1c5cd403..10a6bc6b524 100644 --- a/app/views/projects/buttons/_clone.html.haml +++ b/app/views/projects/buttons/_clone.html.haml @@ -25,7 +25,8 @@ .input-group-append = 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' - %li.divider.mt-2 + = render_if_exists 'projects/buttons/kerberos_clone_field' + %li.divider.mt-2 %li.pt-2.gl-new-dropdown-item %label.label-bold{ class: 'gl-px-4!' } = _('Open in your IDE') @@ -51,4 +52,3 @@ %a.dropdown-item.open-with-link{ href: xcode_uri_to_repo(@project) } .gl-new-dropdown-item-text-wrapper = _("Xcode") - = render_if_exists 'projects/buttons/kerberos_clone_field' diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index bd096ed74f5..b48369322e4 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -82,7 +82,7 @@ - if stage %td - = job.stage + = job.stage_name %td - if job.duration diff --git a/app/views/projects/ci/pipeline_editor/show.html.haml b/app/views/projects/ci/pipeline_editor/show.html.haml index 18eac48d42a..bc352ff6c7d 100644 --- a/app/views/projects/ci/pipeline_editor/show.html.haml +++ b/app/views/projects/ci/pipeline_editor/show.html.haml @@ -1,4 +1,5 @@ - @force_fluid_layout = true +- add_page_specific_style 'page_bundles/editor' - add_page_specific_style 'page_bundles/pipelines' - add_page_specific_style 'page_bundles/pipeline_editor' diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index 4007b657403..6b06584ea25 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -28,7 +28,7 @@ = search_field_tag :search, params[:search], { placeholder: _('Search by message'), id: 'commits-search', class: 'form-control gl-form-input input-short gl-mt-3 gl-sm-mt-0 gl-min-w-full', spellcheck: false } .control.d-none.d-md-block = link_to project_commits_path(@project, @id, rss_url_options), title: _("Commits feed"), class: 'btn gl-button btn-default btn-icon' do - = sprite_icon('rss', css_class: 'qa-rss-icon') + = sprite_icon('rss') = render_if_exists 'projects/commits/mirror_status' diff --git a/app/views/projects/default_branch/_show.html.haml b/app/views/projects/default_branch/_show.html.haml index b1fb9c70a54..eba0f336f80 100644 --- a/app/views/projects/default_branch/_show.html.haml +++ b/app/views/projects/default_branch/_show.html.haml @@ -16,7 +16,7 @@ = _('A default branch cannot be chosen for an empty project.') - else .form-group - = f.label :default_branch, "Default branch", class: 'label-bold' + = f.label :default_branch, _("Default branch"), class: 'label-bold' = f.select(:default_branch, @project.repository.branch_names, {}, {class: 'select2 select-wide', data: { qa_selector: 'default_branch_dropdown' }}) .form-group diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index a7dd69a9607..70df995cdf3 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -5,6 +5,8 @@ - expanded = expanded_by_default? - reduce_visibility_form_id = 'reduce-visibility-form' += render_if_exists 'shared/ultimate_feature_removal_banner', project: @project + %section.settings.general-settings.no-animate.expanded#js-general-settings .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Naming, topics, avatar') @@ -26,23 +28,13 @@ %template.js-project-permissions-form-data{ type: "application/json" }= project_permissions_panel_data(@project).to_json.html_safe .js-project-permissions-form{ data: visibility_confirm_modal_data(@project, reduce_visibility_form_id) } -%section.rspec-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)], data: { qa_selector: 'merge_request_settings_content' } } - .settings-header - %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Merge requests') - = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do - = expanded ? _('Collapse') : _('Expand') - = render_if_exists 'projects/merge_request_settings_description_text' - - .settings-content - = render_if_exists 'shared/promotions/promote_mr_features' - - = gitlab_ui_form_for @project, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f| - %input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-settings' } - = render 'projects/merge_request_settings', form: f - = f.submit _('Save changes'), class: "btn gl-button btn-confirm rspec-save-merge-request-changes", data: { qa_selector: 'save_merge_request_changes_button' } - -= render_if_exists 'projects/merge_request_approvals_settings', expanded: expanded - +- if show_merge_request_settings_callout? + %section.settings.expanded + = render Pajamas::AlertComponent.new(variant: :info, + title: _('Merge requests and approvals settings have moved.'), + alert_options: { class: 'js-merge-request-settings-callout gl-my-5', data: { feature_id: Users::CalloutsHelper::MERGE_REQUEST_SETTINGS_MOVED_CALLOUT, dismiss_endpoint: callouts_path, defer_links: 'true' } }) do |c| + = c.body do + = _('On the left sidebar, select %{merge_requests_link} to view them.').html_safe % { merge_requests_link: link_to('Settings > Merge requests', project_settings_merge_requests_path(@project)).html_safe } %section.settings.no-animate{ class: ('expanded' if expanded), data: { qa_selector: 'badges_settings_content' } } .settings-header diff --git a/app/views/projects/forks/new.html.haml b/app/views/projects/forks/new.html.haml index 36347776ec9..a9913fe3d5e 100644 --- a/app/views/projects/forks/new.html.haml +++ b/app/views/projects/forks/new.html.haml @@ -3,7 +3,7 @@ #fork-groups-mount-element{ data: { fork_illustration: image_path('illustrations/project-create-new-sm.svg'), endpoint: new_project_fork_path(@project, format: :json), new_group_path: new_group_path, - project_full_path: project_path(@project), + project_full_path: @project.full_path, visibility_help_path: help_page_path("user/public_access"), project_id: @project.id, project_name: @project.name, diff --git a/app/views/projects/google_cloud/databases/cloudsql_form.html.haml b/app/views/projects/google_cloud/databases/cloudsql_form.html.haml new file mode 100644 index 00000000000..05838717b49 --- /dev/null +++ b/app/views/projects/google_cloud/databases/cloudsql_form.html.haml @@ -0,0 +1,9 @@ +- add_to_breadcrumbs _('Google Cloud'), project_google_cloud_path(@project) +- add_to_breadcrumbs s_('CloudSeed|Databases'), project_google_cloud_databases_path(@project) +- breadcrumb_title @title +- page_title @title + +- @content_class = "limit-container-width" unless fluid_layout + += form_tag project_google_cloud_databases_path(@project), method: 'post' do + #js-google-cloud-databases-cloudsql-form{ data: @js_data } diff --git a/app/views/projects/google_cloud/gcp_regions/index.html.haml b/app/views/projects/google_cloud/gcp_regions/index.html.haml index 36b5630611e..4cc218ff548 100644 --- a/app/views/projects/google_cloud/gcp_regions/index.html.haml +++ b/app/views/projects/google_cloud/gcp_regions/index.html.haml @@ -1,5 +1,5 @@ - add_to_breadcrumbs _('Google Cloud'), project_google_cloud_path(@project) -- breadcrumb_title _('CloudSeed|Regions') +- breadcrumb_title s_('CloudSeed|Regions') - page_title s_('CloudSeed|Regions') - @content_class = "limit-container-width" unless fluid_layout diff --git a/app/views/projects/harbor/repositories/index.html.haml b/app/views/projects/harbor/repositories/index.html.haml index 0fce3b7f8aa..e6f0e3e950c 100644 --- a/app/views/projects/harbor/repositories/index.html.haml +++ b/app/views/projects/harbor/repositories/index.html.haml @@ -4,8 +4,9 @@ #js-harbor-registry-list-project{ data: { endpoint: project_harbor_repositories_path(@project), "no_containers_image" => image_path('illustrations/docker-empty-state.svg'), "containers_error_image" => image_path('illustrations/docker-error-state.svg'), - "repository_url" => 'demo.harbor.com/gitlab-cn/build/cng-images/gitlab-kas', - "registry_host_url_with_port" => 'demo.harbor.com', + "repository_url" => @project.harbor_integration.hostname, + "harbor_integration_project_name" => @project.harbor_integration.project_name, + "project_name" => @project.name, connection_error: (!!@connection_error).to_s, invalid_path_error: (!!@invalid_path_error).to_s, is_group_page: false.to_s, } } diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index 16b795ee3c9..11b652cc818 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -7,4 +7,5 @@ noteable_data: serialize_issuable(@issue, with_blocking_issues: true), noteable_type: 'Issue', target_type: 'issue', - current_user_data: UserSerializer.new.represent(current_user, {only_path: true}, CurrentUserEntity).to_json } } + current_user_data: UserSerializer.new.represent(current_user, {only_path: true}, CurrentUserEntity).to_json, + can_add_timeline_events: "#{can?(current_user, :admin_incident_management_timeline_event, @issue)}" } } diff --git a/app/views/projects/issues/_related_branches.html.haml b/app/views/projects/issues/_related_branches.html.haml index 310a0c1a61e..466eca2fdb0 100644 --- a/app/views/projects/issues/_related_branches.html.haml +++ b/app/views/projects/issues/_related_branches.html.haml @@ -1,7 +1,7 @@ - if @related_branches.any? %h2.gl-font-lg = pluralize(@related_branches.size, 'Related Branch') - %ul.related-merge-requests.gl-pl-0 + %ul.related-merge-requests.gl-pl-0.gl-mb-3 - @related_branches.each do |branch| %li.gl-display-flex.gl-align-items-center - if branch[:pipeline_status].present? diff --git a/app/views/projects/issues/_work_item_links.html.haml b/app/views/projects/issues/_work_item_links.html.haml index df2ffdd30ee..bc2136b89fb 100644 --- a/app/views/projects/issues/_work_item_links.html.haml +++ b/app/views/projects/issues/_work_item_links.html.haml @@ -1,2 +1,2 @@ - if Feature.enabled?(:work_items_hierarchy, @project) - .js-work-item-links-root{ data: { issuable_id: @issue.id, project_path: @project.full_path, wi: work_items_index_data(@project) } } + .js-work-item-links-root{ data: { issuable_id: @issue.id, iid: @issue.iid, project_path: @project.full_path, wi: work_items_index_data(@project) } } diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml index f7a02c521f5..f95689c0b1d 100644 --- a/app/views/projects/labels/index.html.haml +++ b/app/views/projects/labels/index.html.haml @@ -3,6 +3,7 @@ - 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/_awards_block.html.haml b/app/views/projects/merge_requests/_awards_block.html.haml index 80a58053ff7..64d35b4dfe6 100644 --- a/app/views/projects/merge_requests/_awards_block.html.haml +++ b/app/views/projects/merge_requests/_awards_block.html.haml @@ -1,5 +1,5 @@ .content-block.emoji-block.emoji-list-container.js-noteable-awards = render 'award_emoji/awards_block', awardable: @merge_request, inline: true, api_awards_path: award_emoji_merge_request_api_path(@merge_request) do - .ml-auto.gl-my-2 + .gl-my-2.gl-xs-w-full #js-vue-sort-issue-discussions = render "projects/merge_requests/discussion_filter" diff --git a/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml b/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml index 62cd8bd94e3..22571b11639 100644 --- a/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml +++ b/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml @@ -11,6 +11,10 @@ .gl-new-dropdown-inner .gl-new-dropdown-contents %ul + - if !@merge_request.merged? && current_user && moved_mr_sidebar_enabled? + %li.gl-new-dropdown-item.js-sidebar-subscriptions-entry-point + %li.gl-new-dropdown-divider + %hr.dropdown-divider - if can?(current_user, :update_merge_request, @merge_request) %li.gl-new-dropdown-item{ class: "gl-md-display-none!" } = link_to edit_project_merge_request_path(@project, @merge_request), class: 'dropdown-item' do @@ -32,17 +36,19 @@ .gl-new-dropdown-item-text-wrapper = _('Reopen') = display_issuable_type + - if moved_mr_sidebar_enabled? + %li.gl-new-dropdown-item#js-lock-entry-point + %li.gl-new-dropdown-item + %button.dropdown-item.js-copy-reference{ type: "button", data: { 'clipboard-text': @merge_request.to_reference(full: true) } } + .gl-new-dropdown-item-text-wrapper + = _('Copy reference') - unless current_controller?('conflicts') - - if current_user && moved_mr_sidebar_enabled? - - if !@merge_request.merged? + - unless issuable_author_is_current_user(@merge_request) + - if moved_mr_sidebar_enabled? %li.gl-new-dropdown-divider %hr.dropdown-divider - %li.gl-new-dropdown-item.js-sidebar-subscriptions-entry-point - - unless issuable_author_is_current_user(@merge_request) %li.gl-new-dropdown-item = link_to new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request)), class: 'dropdown-item' do .gl-new-dropdown-item-text-wrapper = _('Report abuse') - - if moved_mr_sidebar_enabled? - %li.gl-new-dropdown-item#js-lock-entry-point diff --git a/app/views/projects/merge_requests/_widget.html.haml b/app/views/projects/merge_requests/_widget.html.haml index 4e69dad2e12..783e3ac97c1 100644 --- a/app/views/projects/merge_requests/_widget.html.haml +++ b/app/views/projects/merge_requests/_widget.html.haml @@ -10,7 +10,7 @@ window.gl.mrWidgetData.squash_before_merge_help_path = '#{help_page_path("user/project/merge_requests/squash_and_merge")}'; window.gl.mrWidgetData.ci_troubleshooting_docs_path = '#{help_page_path('ci/troubleshooting.md')}'; window.gl.mrWidgetData.mr_troubleshooting_docs_path = '#{help_page_path('user/project/merge_requests/reviews/index.md', anchor: 'troubleshooting')}'; - window.gl.mrWidgetData.pipeline_must_succeed_docs_path = '#{help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds.md', anchor: 'only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds')}'; + window.gl.mrWidgetData.pipeline_must_succeed_docs_path = '#{help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds.md', anchor: 'require-a-successful-pipeline-for-merge')}'; window.gl.mrWidgetData.security_approvals_help_page_path = '#{help_page_path('user/application_security/index.md', anchor: 'security-approvals-in-merge-requests')}'; window.gl.mrWidgetData.license_compliance_docs_path = '#{help_page_path('user/compliance/license_compliance/index.md', anchor: 'policies')}'; window.gl.mrWidgetData.eligible_approvers_docs_path = '#{help_page_path('user/project/merge_requests/approvals/rules.md', anchor: 'eligible-approvers')}'; 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 cee8d2e92aa..17b1e5a757c 100644 --- a/app/views/projects/merge_requests/creations/_new_compare.html.haml +++ b/app/views/projects/merge_requests/creations/_new_compare.html.haml @@ -8,7 +8,7 @@ .col-lg-6 .card-new-merge-request %h2.gl-font-size-h2 - Source branch + = _('Source branch') .clearfix .merge-request-select.dropdown = f.hidden_field :source_project_id @@ -38,7 +38,7 @@ .col-lg-6 .card-new-merge-request %h2.gl-font-size-h2 - Target branch + = _('Target branch') .clearfix - projects = target_projects(@project) .merge-request-select.dropdown @@ -67,5 +67,5 @@ %ul.list-unstyled.mr_target_commit - if @merge_request.errors.any? - = form_errors(@merge_request, pajamas_alert: true) - = f.submit 'Compare branches and continue', class: "gl-button btn btn-confirm mr-compare-btn gl-mt-4", data: { qa_selector: "compare_branches_button" } + = form_errors(@merge_request) + = f.submit _('Compare branches and continue'), class: "gl-button btn btn-confirm mr-compare-btn gl-mt-4", data: { qa_selector: "compare_branches_button" } diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 78976be5dd7..d34848c801d 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -16,11 +16,13 @@ - add_page_startup_api_call @endpoint_metadata_url .merge-request{ data: { mr_action: mr_action, url: merge_request_path(@merge_request, format: :json), project_path: project_path(@merge_request.project), lock_version: @merge_request.lock_version } } + - if moved_mr_sidebar_enabled? + #js-merge-sticky-header{ data: { data: sticky_header_data.to_json } } = render "projects/merge_requests/mr_title" .merge-request-details.issuable-details{ data: { id: @merge_request.project.id } } = render "projects/merge_requests/mr_box" - .merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') } + .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 @@ -37,19 +39,19 @@ = 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", 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", qa_selector: "diffs_tab" do = tab_link_for @merge_request, :diffs do = _("Changes") = gl_badge_tag @diffs_count, { size: :sm } - - if Feature.enabled?(:moved_mr_sidebar, @project) - .gl-ml-auto.gl-align-items-center.gl-display-none.gl-md-display-flex.js-expand-sidebar{ class: "gl-lg-display-none!" } - = render Pajamas::ButtonComponent.new(size: 'small', - icon: 'chevron-double-lg-left', - button_options: { class: 'js-sidebar-toggle' }) do - = _('Expand') .d-flex.flex-wrap.align-items-center.justify-content-lg-end #js-vue-discussion-counter{ data: { blocks_merge: @project.only_allow_merge_if_all_discussions_are_resolved?.to_s } } - + - if moved_mr_sidebar_enabled? + - if !!@issuable_sidebar.dig(:current_user, :id) + .js-issuable-todo{ data: { project_path: @issuable_sidebar[:project_full_path], iid: @issuable_sidebar[:iid], id: @issuable_sidebar[:id] } } + .gl-ml-auto.gl-align-items-center.gl-display-none.gl-md-display-flex.gl-ml-3.js-expand-sidebar{ class: "gl-lg-display-none!" } + = render Pajamas::ButtonComponent.new(icon: 'chevron-double-lg-left', + button_options: { class: 'js-sidebar-toggle' }) do + = _('Expand') .tab-content#diff-notes-app #js-diff-file-finder #js-code-navigation @@ -99,7 +101,7 @@ #js-review-bar -- if Feature.enabled?(:mr_experience_survey, @project) && current_user +- if current_user && Feature.enabled?(:mr_experience_survey, current_user) #js-mr-experience-survey{ data: { account_age: current_user.account_age_in_days } } = render 'projects/invite_members_modal', project: @project diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml index 0d56bf7793d..c11d5e7c9b6 100644 --- a/app/views/projects/milestones/_form.html.haml +++ b/app/views/projects/milestones/_form.html.haml @@ -1,6 +1,6 @@ = gitlab_ui_form_for [@project, @milestone], html: { class: 'milestone-form common-note-form js-quick-submit js-requires-input' } do |f| - = form_errors(@milestone, pajamas_alert: true) + = form_errors(@milestone) .form-group.row .col-form-label.col-sm-2 = f.label :title, _('Title') diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml index a90d5224d04..2ae7d300979 100644 --- a/app/views/projects/mirrors/_mirror_repos.html.haml +++ b/app/views/projects/mirrors/_mirror_repos.html.haml @@ -17,7 +17,7 @@ = gitlab_ui_form_for @project, url: project_mirror_path(@project), html: { class: 'gl-show-field-errors js-mirror-form', autocomplete: 'new-password', data: mirrors_form_data_attributes } do |f| .panel.panel-default .panel-body - %div= form_errors(@project, pajamas_alert: true) + %div= form_errors(@project) .form-group.has-feedback = label_tag :url, _('Git repository URL'), class: 'label-light' @@ -41,40 +41,4 @@ = c.body do = _('Mirror settings are only available to GitLab administrators.') - .panel.panel-default - .table-responsive - %table.table.push-pull-table - %thead - %tr - %th - = _('Mirrored repositories') - = render_if_exists 'projects/mirrors/mirrored_repositories_count' - %th= _('Direction') - %th= _('Last update attempt') - %th= _('Last successful update') - %th - %th - %tbody.js-mirrors-table-body - = render_if_exists 'projects/mirrors/table_pull_row' - - @project.remote_mirrors.each_with_index do |mirror, index| - - next if mirror.new_record? - %tr.rspec-mirrored-repository-row{ class: ('bg-secondary' if mirror.disabled?), data: { qa_selector: 'mirrored_repository_row' } } - %td{ data: { qa_selector: 'mirror_repository_url_cell' } }= mirror.safe_url || _('Invalid URL') - %td= _('Push') - %td - = mirror.last_update_started_at.present? ? time_ago_with_tooltip(mirror.last_update_started_at) : _('Never') - %td{ data: { qa_selector: 'mirror_last_update_at_cell' } }= mirror.last_update_at.present? ? time_ago_with_tooltip(mirror.last_update_at) : _('Never') - %td - - if mirror.disabled? - = render 'projects/mirrors/disabled_mirror_badge' - - if mirror.last_error.present? - = gl_badge_tag _('Error'), { variant: :danger }, { data: { toggle: 'tooltip', html: 'true', qa_selector: 'mirror_error_badge' }, title: html_escape(mirror.last_error.try(:strip)) } - %td.gl-display-flex - - 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') - = render 'shared/remote_mirror_update_button', remote_mirror: mirror - = render Pajamas::ButtonComponent.new(variant: :danger, - icon: 'remove', - button_options: { class: 'js-delete-mirror qa-delete-mirror rspec-delete-mirror', title: _('Remove'), data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' } }) + = render 'projects/mirrors/mirror_repos_list' diff --git a/app/views/projects/mirrors/_mirror_repos_list.html.haml b/app/views/projects/mirrors/_mirror_repos_list.html.haml new file mode 100644 index 00000000000..2dbcbd659c8 --- /dev/null +++ b/app/views/projects/mirrors/_mirror_repos_list.html.haml @@ -0,0 +1,47 @@ +- mirror_settings_enabled = can?(current_user, :admin_remote_mirror, @project) + +.panel.panel-default + .table-responsive + - if !@project.mirror? && @project.remote_mirrors.count == 0 + .gl-card.gl-mt-5 + .gl-card-header + %strong + = _('Mirrored repositories') + ' (0)' + .gl-card-body + = _('There are currently no mirrored repositories.') + - else + %table.table.push-pull-table + %thead + %tr + %th + = _('Mirrored repositories') + = render_if_exists 'projects/mirrors/mirrored_repositories_count' + %th= _('Direction') + %th= _('Last update attempt') + %th= _('Last successful update') + %th + %th + %tbody.js-mirrors-table-body + = render_if_exists 'projects/mirrors/table_pull_row' + - @project.remote_mirrors.each_with_index do |mirror, index| + - next if mirror.new_record? + %tr.rspec-mirrored-repository-row{ class: ('bg-secondary' if mirror.disabled?), data: { qa_selector: 'mirrored_repository_row' } } + %td{ data: { qa_selector: 'mirror_repository_url_cell' } }= mirror.safe_url || _('Invalid URL') + %td= _('Push') + %td + = mirror.last_update_started_at.present? ? time_ago_with_tooltip(mirror.last_update_started_at) : _('Never') + %td{ data: { qa_selector: 'mirror_last_update_at_cell' } }= mirror.last_update_at.present? ? time_ago_with_tooltip(mirror.last_update_at) : _('Never') + %td + - if mirror.disabled? + = render 'projects/mirrors/disabled_mirror_badge' + - if mirror.last_error.present? + = gl_badge_tag _('Error'), { variant: :danger }, { data: { toggle: 'tooltip', html: 'true', qa_selector: 'mirror_error_badge' }, title: html_escape(mirror.last_error.try(:strip)) } + %td.gl-display-flex + - 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') + = render 'shared/remote_mirror_update_button', remote_mirror: mirror + = render Pajamas::ButtonComponent.new(variant: :danger, + icon: 'remove', + button_options: { class: 'js-delete-mirror qa-delete-mirror rspec-delete-mirror', title: _('Remove'), data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' } }) diff --git a/app/views/projects/pages/_header.html.haml b/app/views/projects/pages/_header.html.haml index da35f2fdf09..cf51796e878 100644 --- a/app/views/projects/pages/_header.html.haml +++ b/app/views/projects/pages/_header.html.haml @@ -1,4 +1,4 @@ -- can_add_new_domain = can?(current_user, :update_pages, @project) && (Gitlab.config.pages.external_http || Gitlab.config.pages.external_https) +- can_add_new_domain = can_create_pages_custom_domains?(current_user, @project) %h1.page-title.gl-font-size-h-display.with-button = s_('GitLabPages|Pages') diff --git a/app/views/projects/pages/new.html.haml b/app/views/projects/pages/new.html.haml index cdd52a933e9..5dea6b02e36 100644 --- a/app/views/projects/pages/new.html.haml +++ b/app/views/projects/pages/new.html.haml @@ -1,4 +1,4 @@ -- if Feature.enabled?(:use_pipeline_wizard_for_pages, @group) +- if Feature.enabled?(:use_pipeline_wizard_for_pages, @project.group) #js-pages{ data: @pipeline_wizard_data } - else diff --git a/app/views/projects/pipeline_schedules/_form.html.haml b/app/views/projects/pipeline_schedules/_form.html.haml index d29030f992f..5d5ca2aaaf3 100644 --- a/app/views/projects/pipeline_schedules/_form.html.haml +++ b/app/views/projects/pipeline_schedules/_form.html.haml @@ -1,5 +1,5 @@ = 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, pajamas_alert: true) + = form_errors(@schedule) .form-group.row .col-md-9 = f.label :description, _('Description'), class: 'label-bold' diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml index c36c3ae5adf..10dc74647b2 100644 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml @@ -2,7 +2,7 @@ %tr.pipeline-schedule-table-row %td = pipeline_schedule.description - %td.branch-name-cell + %td.branch-name-cell.gl-text-truncate - if pipeline_schedule.for_tag? = sprite_icon('tag', size: 12) - else @@ -17,7 +17,7 @@ %span ##{pipeline_schedule.last_pipeline.id} - else = s_("PipelineSchedules|None") - %td.next-run-cell + %td.gl-text-gray-500{ 'data-testid': 'next-run-cell' } - if pipeline_schedule.active? && pipeline_schedule.next_run_at = time_ago_with_tooltip(pipeline_schedule.real_next_run) - else diff --git a/app/views/projects/pipelines/_with_tabs.html.haml b/app/views/projects/pipelines/_with_tabs.html.haml index a8ad53db8c2..e83547fd8f8 100644 --- a/app/views/projects/pipelines/_with_tabs.html.haml +++ b/app/views/projects/pipelines/_with_tabs.html.haml @@ -42,7 +42,7 @@ #js-pipeline-tests-detail{ data: { summary_endpoint: summary_project_pipeline_tests_path(@project, @pipeline, format: :json), suite_endpoint: project_pipeline_test_path(@project, @pipeline, suite_name: 'suite', format: :json), blob_path: project_blob_path(@project, @pipeline.sha), - has_test_report: @pipeline.has_reports?(Ci::JobArtifact.test_reports).to_s, + has_test_report: @pipeline.complete_and_has_reports?(Ci::JobArtifact.of_report_type(:test)).to_s, empty_state_image_path: image_path('illustrations/empty-state/empty-test-cases-lg.svg'), artifacts_expired_image_path: image_path('illustrations/pipeline.svg') } } = render_if_exists "projects/pipelines/tabs_content", pipeline: @pipeline, project: @project diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index 37fe80d2aaf..34305d15eff 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -2,6 +2,7 @@ - page_title _("Members") = render_if_exists 'projects/free_user_cap_alert', project: @project += render_if_exists 'shared/ultimate_feature_removal_banner', project: @project .row.gl-mt-3 .col-lg-12 diff --git a/app/views/projects/project_templates/_template.html.haml b/app/views/projects/project_templates/_template.html.haml index d0fdd3a729a..9dde86f77b4 100644 --- a/app/views/projects/project_templates/_template.html.haml +++ b/app/views/projects/project_templates/_template.html.haml @@ -1,4 +1,4 @@ -.template-option.d-flex.align-items-center{ data: { qa_selector: 'template_option_row' } } +.template-option.d-flex.align-items-center{ data: { qa_selector: 'template_option_container' } } .logo.gl-mr-3.px-1 = image_tag template.logo, size: 32, class: "btn-template-icon icon-#{template.name}" .description diff --git a/app/views/projects/protected_branches/_create_protected_branch.html.haml b/app/views/projects/protected_branches/_create_protected_branch.html.haml index 20cd45be6da..34fe9a29068 100644 --- a/app/views/projects/protected_branches/_create_protected_branch.html.haml +++ b/app/views/projects/protected_branches/_create_protected_branch.html.haml @@ -1,14 +1,14 @@ - content_for :merge_access_levels do .merge_access_levels-container = dropdown_tag('Select', - options: { toggle_class: 'js-allowed-to-merge qa-allowed-to-merge-select wide', - dropdown_class: 'dropdown-menu-selectable qa-allowed-to-merge-dropdown rspec-allowed-to-merge-dropdown capitalize-header', - data: { field_name: 'protected_branch[merge_access_levels_attributes][0][access_level]', input_id: 'merge_access_levels_attributes' }}) + options: { toggle_class: 'js-allowed-to-merge wide', + dropdown_class: 'dropdown-menu-selectable capitalize-header', dropdown_qa_selector: 'allowed_to_merge_dropdown_content', dropdown_testid: 'allowed-to-merge-dropdown', + data: { field_name: 'protected_branch[merge_access_levels_attributes][0][access_level]', input_id: 'merge_access_levels_attributes', qa_selector: 'allowed_to_merge_dropdown' }}) - content_for :push_access_levels do .push_access_levels-container = dropdown_tag('Select', - options: { toggle_class: "js-allowed-to-push qa-allowed-to-push-select js-multiselect wide", - dropdown_class: 'dropdown-menu-selectable qa-allowed-to-push-dropdown rspec-allowed-to-push-dropdown capitalize-header', - data: { field_name: 'protected_branch[push_access_levels_attributes][0][access_level]', input_id: 'push_access_levels_attributes' }}) + options: { toggle_class: "js-allowed-to-push js-multiselect wide", + dropdown_class: 'dropdown-menu-selectable capitalize-header', dropdown_qa_selector: 'allowed_to_push_dropdown_content' , dropdown_testid: 'allowed-to-push-dropdown', + data: { field_name: 'protected_branch[push_access_levels_attributes][0][access_level]', input_id: 'push_access_levels_attributes', qa_selector: 'allowed_to_push_dropdown' }}) = render 'projects/protected_branches/shared/create_protected_branch' diff --git a/app/views/projects/protected_branches/shared/_branches_list.html.haml b/app/views/projects/protected_branches/shared/_branches_list.html.haml index 5964f2bfeda..64db51d5df2 100644 --- a/app/views/projects/protected_branches/shared/_branches_list.html.haml +++ b/app/views/projects/protected_branches/shared/_branches_list.html.haml @@ -1,4 +1,4 @@ -.protected-branches-list.js-protected-branches-list.qa-protected-branches-list +.protected-branches-list.js-protected-branches-list{ data: { testid: 'protected-branches-list' } } - if @protected_branches.empty? .card-header.bg-white = s_("ProtectedBranch|Protected branch (%{protected_branches_count})") % { protected_branches_count: 0 } diff --git a/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml index 35770c32f9f..277cbf00034 100644 --- a/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml +++ b/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml @@ -4,7 +4,7 @@ - c.header do = s_("ProtectedBranch|Protect a branch") - c.body do - = form_errors(@protected_branch, pajamas_alert: true) + = form_errors(@protected_branch) .form-group.row = f.label :name, s_('ProtectedBranch|Branch:'), class: 'col-sm-12' .col-sm-12 diff --git a/app/views/projects/protected_branches/shared/_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_protected_branch.html.haml index 6dd3b2e8d5e..098bd4a7eeb 100644 --- a/app/views/projects/protected_branches/shared/_protected_branch.html.haml +++ b/app/views/projects/protected_branches/shared/_protected_branch.html.haml @@ -1,6 +1,6 @@ - can_admin_project = can?(current_user, :admin_project, @project) -%tr.qa-protected-branch.js-protected-branch-edit-form{ data: { url: namespace_project_protected_branch_path(@project.namespace, @project, protected_branch) } } +%tr.js-protected-branch-edit-form{ data: { url: namespace_project_protected_branch_path(@project.namespace, @project, protected_branch), testid: 'protected-branch' } } %td %span.ref-name= protected_branch.name diff --git a/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml b/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml index e257117a32e..ba0935fff7d 100644 --- a/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml +++ b/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml @@ -4,7 +4,7 @@ .card-header = _('Protect a tag') .card-body - = form_errors(@protected_tag, pajamas_alert: true) + = form_errors(@protected_tag) .form-group.row = f.label :name, _('Tag:'), class: 'col-md-2 text-left text-md-right' .col-md-10.protected-tags-dropdown diff --git a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml index ea77bda0b0f..81526685bfc 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -16,7 +16,7 @@ .row .col-lg-12 = gitlab_ui_form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'autodevops-settings') do |f| - = form_errors(@project, pajamas_alert: true) + = form_errors(@project) %fieldset.builds-feature.js-auto-devops-settings .form-group = f.fields_for :auto_devops_attributes, @auto_devops do |form| diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index 50e96528c0d..9419dacc16f 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -6,7 +6,7 @@ .row.gl-mt-3 .col-lg-12 = gitlab_ui_form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings') do |f| - = form_errors(@project, pajamas_alert: true) + = form_errors(@project) %fieldset.builds-feature .form-group = f.gitlab_ui_checkbox_component :public_builds, diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index dd9cc296d52..c1df7b88352 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -103,8 +103,7 @@ = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p - = _("Control which projects can be accessed by API requests authenticated with this project's CI_JOB_TOKEN CI/CD variable. It is a security risk to disable this feature, because unauthorized projects might attempt to retrieve an active token and access the API.") - = link_to _('Learn more'), help_page_path('ci/jobs/ci_job_token'), target: '_blank', rel: 'noopener noreferrer' + = _("Control how the CI_JOB_TOKEN CI/CD variable is used for API access between projects.") .settings-content = render 'ci/token_access/index' diff --git a/app/views/projects/settings/merge_requests/show.html.haml b/app/views/projects/settings/merge_requests/show.html.haml new file mode 100644 index 00000000000..886e276dea5 --- /dev/null +++ b/app/views/projects/settings/merge_requests/show.html.haml @@ -0,0 +1,18 @@ +- breadcrumb_title _('Merge requests') +- page_title _('Merge requests') +- @content_class = 'limit-container-width' unless fluid_layout + +%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.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Merge requests') + = render_if_exists 'projects/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 + = f.submit _('Save changes'), class: "btn gl-button btn-confirm rspec-save-merge-request-changes", data: { qa_selector: 'save_merge_request_changes_button' } + += render_if_exists 'projects/settings/merge_requests/merge_request_approvals_settings', expanded: true diff --git a/app/views/projects/settings/operations/show.html.haml b/app/views/projects/settings/operations/show.html.haml index 87e3e03099c..90e0ccce8b4 100644 --- a/app/views/projects/settings/operations/show.html.haml +++ b/app/views/projects/settings/operations/show.html.haml @@ -2,19 +2,6 @@ - page_title _('Monitor Settings') - breadcrumb_title _('Monitor Settings') -= render Pajamas::AlertComponent.new(variant: :danger, - dismissible: false, - title: s_('Deprecations|Feature deprecation and removal')) do |c| - = c.body do - - removal_epic_link_url = 'https://gitlab.com/groups/gitlab-org/-/epics/7188' - - removal_epic_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer" class="gl-link">'.html_safe % { url: removal_epic_link_url } - - opstrace_link_url = 'https://gitlab.com/groups/gitlab-org/-/epics/6976' - - opstrace_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer" class="gl-link">'.html_safe % { url: opstrace_link_url } - - link_end = '</a>'.html_safe - = html_escape(s_('Deprecations|The metrics feature was deprecated in GitLab 14.7.')) - = html_escape(s_('Deprecations|The logs and tracing features were also deprecated in GitLab 14.7, and are %{removal_link_start} scheduled for removal %{link_end} in GitLab 15.0.')) % {removal_link_start: removal_epic_link_start, link_end: link_end } - = html_escape(s_('Deprecations|For information on a possible replacement, %{opstrace_link_start} learn more about Opstrace %{link_end}.')) % {opstrace_link_start: opstrace_link_start, link_end: link_end } - = render 'projects/settings/operations/metrics_dashboard' = render 'projects/settings/operations/error_tracking' = render 'projects/settings/operations/alert_management' diff --git a/app/views/projects/settings/packages_and_registries/cleanup_tags.html.haml b/app/views/projects/settings/packages_and_registries/cleanup_tags.html.haml index 795544b75a2..5244587c16d 100644 --- a/app/views/projects/settings/packages_and_registries/cleanup_tags.html.haml +++ b/app/views/projects/settings/packages_and_registries/cleanup_tags.html.haml @@ -1,6 +1,6 @@ -- add_to_breadcrumbs _('Packages & Registries'), project_settings_packages_and_registries_path(@project) +- add_to_breadcrumbs _('Package and registry settings'), project_settings_packages_and_registries_path(@project) - breadcrumb_title s_('ContainerRegistry|Clean up image tags') -- page_title s_('ContainerRegistry|Clean up image tags'), _('Packages & Registries') +- page_title s_('ContainerRegistry|Clean up image tags'), _('Package and registry settings') - @content_class = 'limit-container-width' unless fluid_layout #js-registry-settings-cleanup-image-tags{ data: cleanup_settings_data } diff --git a/app/views/projects/settings/packages_and_registries/show.html.haml b/app/views/projects/settings/packages_and_registries/show.html.haml index d579981ebc0..e0ac07f5f31 100644 --- a/app/views/projects/settings/packages_and_registries/show.html.haml +++ b/app/views/projects/settings/packages_and_registries/show.html.haml @@ -1,5 +1,5 @@ -- breadcrumb_title _('Packages & Registries') -- page_title _('Packages & Registries') +- breadcrumb_title _('Package and registry settings') +- page_title _('Package and registry settings') - @content_class = 'limit-container-width' unless fluid_layout #js-registry-settings{ data: settings_data } diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 1f529849b28..e9d1661a4f1 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -7,6 +7,7 @@ = auto_discovery_link_tag(:atom, project_path(@project, rss_url_options), title: "#{@project.name} activity") = render_if_exists 'projects/free_user_cap_alert', project: @project += render_if_exists 'shared/ultimate_feature_removal_banner', project: @project = render partial: 'flash_messages', locals: { project: @project } = render 'clusters_deprecation_alert' diff --git a/app/views/projects/tags/index.html.haml b/app/views/projects/tags/index.html.haml index 2721f94134c..fda797f3228 100644 --- a/app/views/projects/tags/index.html.haml +++ b/app/views/projects/tags/index.html.haml @@ -10,7 +10,7 @@ .nav-controls #js-tags-sort-dropdown{ data: { filter_tags_path: filter_tags_path(search: @search, sort: @sort), sort_options: tags_sort_options_hash.to_json } } = link_to project_tags_path(@project, rss_url_options), title: _("Tags feed"), class: 'btn gl-button btn-default btn-icon has-tooltip gl-ml-auto' do - = sprite_icon('rss', css_class: 'gl-icon qa-rss-icon') + = sprite_icon('rss', css_class: 'gl-icon') - if can?(current_user, :admin_tag, @project) = link_to new_project_tag_path(@project), class: 'btn gl-button btn-confirm', data: { qa_selector: "new_tag_button" } do = s_('TagsPage|New tag') diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml index 3b546888375..79fc1a64790 100644 --- a/app/views/projects/tags/new.html.haml +++ b/app/views/projects/tags/new.html.haml @@ -2,22 +2,21 @@ - default_ref = params[:ref] || @project.default_branch - if @error - = render Pajamas::AlertComponent.new(variant: :danger, dismissible: true, close_button_options: { class: 'gl-alert-dismiss' }) do |c| + = render Pajamas::AlertComponent.new(variant: :danger, dismissible: true ) do |c| = c.body do = @error %h1.page-title.gl-font-size-h-display = s_('TagsPage|New Tag') -%hr = 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 - = label_tag :tag_name, nil, class: 'col-form-label col-sm-2' - .col-sm-10 + .col-sm-12 + = label_tag :tag_name, nil = text_field_tag :tag_name, params[:tag_name], required: true, autofocus: true, class: 'form-control', data: { qa_selector: "tag_name_field" } .form-group.row - = label_tag :ref, 'Create from', class: 'col-form-label col-sm-2' - .col-sm-10.create-from + .col-sm-12.create-from + = label_tag :ref, 'Create from' .dropdown = hidden_field_tag :ref, default_ref = button_tag type: 'button', title: default_ref, class: 'dropdown-menu-toggle wide js-branch-select monospace', required: true, data: { toggle: 'dropdown', selected: default_ref, field_name: 'ref' } do @@ -27,15 +26,14 @@ .form-text.text-muted = s_('TagsPage|Existing branch name, tag, or commit SHA') .form-group.row - = label_tag :message, nil, class: 'col-form-label col-sm-2' - .col-sm-10 + .col-sm-12 + = label_tag :message, nil = text_area_tag :message, @message, required: false, class: 'form-control', rows: 5, data: { qa_selector: "tag_message_field" } .form-text.text-muted = tag_description_help_text - %hr .form-group.row - = label_tag :release_description, s_('TagsPage|Release notes'), class: 'col-form-label col-sm-2' - .col-sm-10 + .col-sm-12 + = label_tag :release_description, s_('TagsPage|Release notes'), class: 'gl-mb-0' .form-text.mb-3 - link_start = '<a href="%{url}" rel="noopener noreferrer" target="_blank">'.html_safe - releases_page_path = project_releases_path(@project) @@ -49,7 +47,7 @@ = render layout: 'shared/md_preview', locals: { url: preview_markdown_path(@project), referenced_users: true } do = render 'shared/zen', attr: :release_description, classes: 'note-textarea', placeholder: s_('TagsPage|Write your release notes or drag files hereā¦'), current_text: @release_description, qa_selector: 'release_notes_field' = render 'shared/notes/hints' - .form-actions.gl-display-flex + .gl-display-flex = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { class: 'gl-mr-3', data: { qa_selector: "create_tag_button" }, type: 'submit' }) do = s_('TagsPage|Create tag') = render Pajamas::ButtonComponent.new(href: project_tags_path(@project)) do diff --git a/app/views/projects/triggers/_form.html.haml b/app/views/projects/triggers/_form.html.haml index d24cfd61052..9043b8e60fc 100644 --- a/app/views/projects/triggers/_form.html.haml +++ b/app/views/projects/triggers/_form.html.haml @@ -1,5 +1,5 @@ = form_for [@project, @trigger], html: { class: 'gl-show-field-errors' } do |f| - = form_errors(@trigger, pajamas_alert: true) + = form_errors(@trigger) - if @trigger.token .form-group diff --git a/app/views/projects/usage_quotas/index.html.haml b/app/views/projects/usage_quotas/index.html.haml index 3de9bce14d4..5e2217d3c9f 100644 --- a/app/views/projects/usage_quotas/index.html.haml +++ b/app/views/projects/usage_quotas/index.html.haml @@ -1,6 +1,6 @@ - page_title s_("UsageQuota|Usage") -= render_if_exists 'namespaces/free_user_cap/projects/usage_quota_limitations_banner' += render_if_exists 'shared/ultimate_feature_removal_banner', project: @project = render Pajamas::AlertComponent.new(title: _('Repository usage recalculation started'), variant: :info, |