diff options
Diffstat (limited to 'app/views/projects')
64 files changed, 261 insertions, 275 deletions
diff --git a/app/views/projects/_commit_button.html.haml b/app/views/projects/_commit_button.html.haml index 659bca25533..952c6daf415 100644 --- a/app/views/projects/_commit_button.html.haml +++ b/app/views/projects/_commit_button.html.haml @@ -1,5 +1,5 @@ .form-actions.gl-display-flex - = render Pajamas::ButtonComponent.new(type: :submit, variant: :confirm, button_options: { id: 'commit-changes', class: 'js-commit-button qa-commit-button' }) do + = render Pajamas::ButtonComponent.new(type: :submit, variant: :confirm, button_options: { id: 'commit-changes', class: 'js-commit-button', data: { qa_selector: 'commit_button' } }) 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/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index eee9cfe0618..c220aa66c81 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -24,15 +24,12 @@ %span.gl-ml-3.gl-mb-3 = render 'shared/members/access_request_links', source: @project - .gl-mt-3.gl-pl-3.gl-w-full - = render "shared/projects/topics", project: @project, cache_enabled: cache_enabled - = cache_if(cache_enabled, [@project, :buttons, current_user, @notification_setting], expires_in: 1.day) do .project-repo-buttons.gl-display-flex.gl-justify-content-md-end.gl-align-items-start.gl-flex-wrap.gl-mt-5 - if current_user - if current_user.admin? = link_to [:admin, @project], class: 'btn gl-button btn-icon gl-align-self-start gl-py-2! gl-mr-3', title: _('View project in admin area'), - data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do + data: {toggle: 'tooltip', placement: 'top', container: 'body'} do = sprite_icon('admin') .gl-display-flex.gl-align-items-start.gl-mr-3 - if @notification_setting @@ -49,7 +46,8 @@ = render 'stat_anchor_list', anchors: @project.empty_repo_statistics_anchors - else = render 'stat_anchor_list', anchors: @project.statistics_anchors(show_auto_devops_callout: show_auto_devops_callout) - + .gl-my-3 + = render "shared/projects/topics", project: @project, cache_enabled: cache_enabled .home-panel-home-desc.mt-1 - if @project.description.present? .home-panel-description.text-break diff --git a/app/views/projects/_last_push.html.haml b/app/views/projects/_last_push.html.haml index 9845de17a11..859f065377d 100644 --- a/app/views/projects/_last_push.html.haml +++ b/app/views/projects/_last_push.html.haml @@ -14,7 +14,7 @@ #{time_ago_with_tooltip(event.created_at)} - - if can?(current_user, :create_merge_request_in, event.project.default_merge_request_target) + - if create_mr_button_from_event?(event) = c.actions do - = link_to new_mr_path_from_push_event(event), title: _("New merge request"), class: "btn gl-button btn-confirm qa-create-merge-request" do - #{ _('Create merge request') } + = render Pajamas::ButtonComponent.new(variant: :confirm, href: create_mr_path_from_push_event(event), button_options: { class: 'qa-create-merge-request' }) do + = _('Create merge request') diff --git a/app/views/projects/_new_project_fields.html.haml b/app/views/projects/_new_project_fields.html.haml index 992b46c1f7b..98cd831d6f1 100644 --- a/app/views/projects/_new_project_fields.html.haml +++ b/app/views/projects/_new_project_fields.html.haml @@ -1,6 +1,7 @@ - visibility_level = selected_visibility_level(@project, params.dig(:project, :visibility_level)) - ci_cd_only = local_assigns.fetch(:ci_cd_only, false) - hide_init_with_readme = local_assigns.fetch(:hide_init_with_readme, false) +- include_description = local_assigns.fetch(:include_description, true) - track_label = local_assigns.fetch(:track_label, 'blank_project') .row{ id: project_name_id } @@ -44,10 +45,19 @@ - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/profile/index', anchor: 'add-details-to-your-profile-with-a-readme') } = html_escape(_('%{project_path} is a project that you can use to add a README to your GitLab profile. Create a public project and initialize the repository with a README to get started. %{help_link_start}Learn more.%{help_link_end}')) % { project_path: "<strong>#{current_user.username} / #{current_user.username}</strong>".html_safe, help_link_start: help_link_start, help_link_end: '</a>'.html_safe } -.form-group - = f.label :description, class: 'label-bold' do - = s_('ProjectsNew|Project description %{tag_start}(optional)%{tag_end}').html_safe % { tag_start: '<span>'.html_safe, tag_end: '</span>'.html_safe } - = f.text_area :description, placeholder: s_('ProjectsNew|Description format'), class: "form-control gl-form-input", rows: 3, maxlength: 250, data: { qa_selector: 'project_description', track_label: "#{track_label}", track_action: "activate_form_input", track_property: "project_description", track_value: "" } +- if include_description + .form-group + = f.label :description, class: 'label-bold' do + = s_('ProjectsNew|Project description %{tag_start}(optional)%{tag_end}').html_safe % { tag_start: '<span>'.html_safe, tag_end: '</span>'.html_safe } + = f.text_area :description, + placeholder: s_('ProjectsNew|Description format'), + class: "form-control gl-form-input", + rows: 3, + maxlength: 250, + data: { qa_selector: 'project_description', + track_label: track_label, + track_action: "activate_form_input", + track_property: "project_description" } - unless Gitlab::CurrentSettings.current_application_settings.hide_third_party_offers? || !Gitlab.com? .js-deployment-target-select @@ -63,18 +73,20 @@ = s_('ProjectsNew|Project Configuration') .form-group - .form-check.gl-mb-3 - = check_box_tag 'project[initialize_with_readme]', '1', true, class: 'form-check-input', data: { qa_selector: 'initialize_with_readme_checkbox', track_label: track_label, track_action: 'activate_form_input', track_property: 'init_with_readme' } - = label_tag 'project[initialize_with_readme]', s_('ProjectsNew|Initialize repository with a README'), class: 'form-check-label' - .form-text.text-muted + = render Pajamas::CheckboxTagComponent.new(name: 'project[initialize_with_readme]', + checked: true, + checkbox_options: { data: { qa_selector: 'initialize_with_readme_checkbox', track_label: track_label, track_action: 'activate_form_input', track_property: 'init_with_readme' } }) do |c| + = c.label do + = s_('ProjectsNew|Initialize repository with a README') + = c.help_text do = s_('ProjectsNew|Allows you to immediately clone this projectās repository. Skip this if you plan to push up an existing repository.') .form-group - .form-check.gl-mb-3 - = check_box_tag 'project[initialize_with_sast]', '1', false, class: 'form-check-input', data: { qa_selector: 'initialize_with_sast_checkbox', track_label: track_label, track_action: 'activate_form_input', track_property: 'init_with_sast' } - = label_tag 'project[initialize_with_sast]', class: 'form-check-label' do + = render Pajamas::CheckboxTagComponent.new(name: 'project[initialize_with_sast]', + checkbox_options: { data: { qa_selector: 'initialize_with_sast_checkbox', track_label: track_label, track_action: 'activate_form_input', track_property: 'init_with_sast' } }) do |c| + = c.label do = s_('ProjectsNew|Enable Static Application Security Testing (SAST)') - .form-text.text-muted + = c.help_text do = s_('ProjectsNew|Analyze your source code for known security vulnerabilities.') = link_to _('Learn more.'), help_page_path('user/application_security/sast/index'), target: '_blank', rel: 'noopener noreferrer', data: { track_action: 'followed' } diff --git a/app/views/projects/_transfer.html.haml b/app/views/projects/_transfer.html.haml index 393b199fb05..02aa1f7e93b 100644 --- a/app/views/projects/_transfer.html.haml +++ b/app/views/projects/_transfer.html.haml @@ -1,7 +1,7 @@ - return unless can?(current_user, :change_namespace, @project) - form_id = "transfer-project-form" - hidden_input_id = "new_namespace_id" -- initial_data = { namespaces: namespaces_as_json, button_text: s_('ProjectSettings|Transfer project'), confirm_danger_message: transfer_project_message(@project), phrase: @project.name, target_form_id: form_id, target_hidden_input_id: hidden_input_id } +- initial_data = { button_text: s_('ProjectSettings|Transfer project'), confirm_danger_message: transfer_project_message(@project), phrase: @project.name, target_form_id: form_id, target_hidden_input_id: hidden_input_id } .sub-section %h4.danger-title= _('Transfer project') diff --git a/app/views/projects/_visibility_modal.html.haml b/app/views/projects/_visibility_modal.html.haml index 66066ceb5b2..e8a4e091dcf 100644 --- a/app/views/projects/_visibility_modal.html.haml +++ b/app/views/projects/_visibility_modal.html.haml @@ -22,8 +22,8 @@ %label{ for: "confirm_path_input" } = _("To confirm, type %{phrase_code}").html_safe % { phrase_code: '<code class="js-legacy-confirm-danger-match">%{phrase_name}</code>'.html_safe % { phrase_name: @project.full_path } } .form-group - = text_field_tag 'confirm_path_input', '', class: 'form-control js-legacy-confirm-danger-input qa-confirm-input' + = text_field_tag 'confirm_path_input', '', class: 'form-control js-legacy-confirm-danger-input' .form-actions %button.btn.gl-button.btn-default.gl-mr-4{ type: "button", "data-dismiss": "modal" } = _('Cancel') - = submit_tag _('Reduce project visibility'), class: "btn gl-button btn-danger js-legacy-confirm-danger-submit qa-confirm-button", disabled: true + = submit_tag _('Reduce project visibility'), class: "btn gl-button btn-danger js-legacy-confirm-danger-submit", disabled: true diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 09a275c24a1..398ca3dd27c 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -42,7 +42,7 @@ .file-editor.code - if Feature.enabled?(:source_editor_toolbar, current_user) #editor-toolbar - .js-edit-mode-pane.qa-editor#editor{ data: { 'editor-loading': true } }< + .js-edit-mode-pane.qa-editor#editor{ data: { 'editor-loading': true, qa_selector: 'source_editor_preview_container' } }< %pre.editor-loading-content= params[:content] || local_assigns[:blob_data] - if local_assigns[:path] .js-edit-mode-pane#preview.hide diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 1477ae66d80..52b8d6bc66f 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -33,8 +33,8 @@ .gl-display-inline-flex.gl-vertical-align-middle.gl-mr-5 %svg.s24 - - if merge_project && create_mr_button?(from: @repository.root_ref, to: branch.name, source_project: @project, target_project: @project) - = link_to create_mr_path(from: @repository.root_ref, to: branch.name, source_project: @project, target_project: @project), class: 'gl-button btn btn-default' do + - if merge_project && create_mr_button?(from: branch.name, source_project: @project) + = render Pajamas::ButtonComponent.new(href: create_mr_path(from: branch.name, source_project: @project)) do = _('Merge request') - if branch.name != @repository.root_ref diff --git a/app/views/projects/branches/_panel.html.haml b/app/views/projects/branches/_panel.html.haml index bd6831ff3b2..6ca5aaf061e 100644 --- a/app/views/projects/branches/_panel.html.haml +++ b/app/views/projects/branches/_panel.html.haml @@ -7,12 +7,13 @@ - return unless branches.any? -.card - .card-header += render Pajamas::CardComponent.new(card_options: {class: 'gl-mb-5'}, body_options: {class: 'gl-py-0'}, footer_options: {class: 'gl-text-center'}) do |c| + - c.header do = panel_title - %ul.content-list.all-branches.qa-all-branches - - branches.first(overview_max_branches).each do |branch| - = render "projects/branches/branch", branch: branch, merged: project.repository.merged_to_root_ref?(branch), commit_status: @branch_pipeline_statuses[branch.name], show_commit_status: @branch_pipeline_statuses.any? + - c.body do + %ul.content-list.all-branches.qa-all-branches + - branches.first(overview_max_branches).each do |branch| + = render "projects/branches/branch", branch: branch, merged: project.repository.merged_to_root_ref?(branch), commit_status: @branch_pipeline_statuses[branch.name], show_commit_status: @branch_pipeline_statuses.any? - if branches.size > overview_max_branches - .card-footer.text-center + - c.footer do = link_to show_more_text, project_branches_filtered_path(project, state: state), id: "state-#{state}", data: { state: state } diff --git a/app/views/projects/buttons/_remove_tag.html.haml b/app/views/projects/buttons/_remove_tag.html.haml index 060a854d4e4..dfa643a87bb 100644 --- a/app/views/projects/buttons/_remove_tag.html.haml +++ b/app/views/projects/buttons/_remove_tag.html.haml @@ -8,4 +8,4 @@ - title = s_('TagsPage|Only a project maintainer or owner can delete a protected tag') - disabled = true -= render Pajamas::ButtonComponent.new(variant: :default, icon: 'remove', button_options: { class: "js-delete-tag-button gl-ml-3\!", 'aria-label': s_('TagsPage|Delete tag'), title: title, disabled: disabled, data: { toggle: 'tooltip', container: 'body', path: project_tag_path(@project, tag.name), tag_name: tag.name, is_protected: protected_tag?(project, tag).to_s } }) += render Pajamas::ButtonComponent.new(variant: :default, icon: 'remove', button_options: { class: "js-delete-tag-button", 'aria-label': s_('TagsPage|Delete tag'), title: title, disabled: disabled, data: { toggle: 'tooltip', container: 'body', path: project_tag_path(@project, tag.name), tag_name: tag.name, is_protected: protected_tag?(project, tag).to_s } }) diff --git a/app/views/projects/buttons/_star.html.haml b/app/views/projects/buttons/_star.html.haml index 00d518450e9..f607a21ad21 100644 --- a/app/views/projects/buttons/_star.html.haml +++ b/app/views/projects/buttons/_star.html.haml @@ -7,7 +7,7 @@ - else = sprite_icon('star-o', css_class: 'icon') %span= s_('ProjectOverview|Star') - = link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'gl-button btn btn-default btn-sm star-count count' do + = link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'gl-button btn btn-default btn-sm has-tooltip star-count count' do = @project.star_count - else @@ -15,5 +15,5 @@ = link_to new_user_session_path, class: 'gl-button btn btn-default btn-sm has-tooltip star-btn', title: s_('ProjectOverview|You must sign in to star a project') do = sprite_icon('star-o', css_class: 'icon') %span= s_('ProjectOverview|Star') - = link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'gl-button btn btn-default btn-sm star-count count' do + = link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'gl-button btn btn-default btn-sm has-tooltip star-count count' do = @project.star_count diff --git a/app/views/projects/ci/secure_files/show.html.haml b/app/views/projects/ci/secure_files/show.html.haml deleted file mode 100644 index 1a87ccd753c..00000000000 --- a/app/views/projects/ci/secure_files/show.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -- page_title s_('Secure Files') - -#js-ci-secure-files{ data: { project_id: @project.id, admin: can?(current_user, :admin_secure_files, @project).to_s, file_size_limit: Ci::SecureFile::FILE_SIZE_LIMIT.to_mb } } diff --git a/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml b/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml index e56579b162f..629d3cfaf74 100644 --- a/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml +++ b/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml @@ -1,5 +1,5 @@ - title = capture do - = html_escape(_('This commit was signed with a verified signature, but the committer email is %{strong_open}not verified%{strong_close} to belong to the same user.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } + = html_escape(_('This commit was signed with a verified signature, but the committer email is not associated with the GPG Key.')) - locals = { signature: signature, title: title, label: _('Unverified'), css_class: ['invalid'], icon: 'status_notfound_borderless', show_user: true } diff --git a/app/views/projects/commits/_commit_list.html.haml b/app/views/projects/commits/_commit_list.html.haml index 6ed65d07202..23b25b5dcbd 100644 --- a/app/views/projects/commits/_commit_list.html.haml +++ b/app/views/projects/commits/_commit_list.html.haml @@ -2,14 +2,15 @@ - hidden = @hidden_commit_count - commits = Commit.decorate(commits, @project) -.card - .card-header += render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5'}, body_options: { class: 'gl-py-0'}) do |c| + - c.header do Commits (#{@total_commit_count}) - - if hidden > 0 - %ul.content-list - - commits.each do |commit| - = render "projects/commits/inline_commit", commit: commit, project: @project - %li.warning-row.unstyled - #{number_with_delimiter(hidden)} additional commits have been omitted to prevent performance issues. - - else - %ul.content-list= render commits, project: @project, ref: @ref + - c.body do + - if hidden > 0 + %ul.content-list + - commits.each do |commit| + = render "projects/commits/inline_commit", commit: commit, project: @project + %li.warning-row.unstyled + #{number_with_delimiter(hidden)} additional commits have been omitted to prevent performance issues. + - else + %ul.content-list= render commits, project: @project, ref: @ref diff --git a/app/views/projects/commits/_commits.html.haml b/app/views/projects/commits/_commits.html.haml index 764ddace0ad..bb3a38d6ac8 100644 --- a/app/views/projects/commits/_commits.html.haml +++ b/app/views/projects/commits/_commits.html.haml @@ -41,7 +41,7 @@ = n_('%s additional commit has been omitted to prevent performance issues.', '%s additional commits have been omitted to prevent performance issues.', hidden) % number_with_delimiter(hidden) - if can_update_merge_request && context_commits&.empty? - = render Pajamas::ButtonComponent.new(button_options: { class: 'gl-mt-5', data: { context_commits_empty: 'true' } }) do + = render Pajamas::ButtonComponent.new(button_options: { class: 'gl-mt-5 add-review-item-modal-trigger', data: { context_commits_empty: 'true' } }) do = _('Add previously merged commits') - if commits.size == 0 && context_commits.nil? diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index e5be3a897a5..4007b657403 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -18,9 +18,10 @@ - if @merge_request.present? .control.d-none.d-md-block = link_to _("View open merge request"), project_merge_request_path(@project, @merge_request), class: 'btn gl-button' - - elsif create_mr_button?(from: @repository.root_ref, to: @ref, source_project: @project, target_project: @project) + - elsif create_mr_button?(from: @ref, source_project: @project) .control.d-none.d-md-block - = link_to _("Create merge request"), create_mr_path(from: @repository.root_ref, to: @ref, source_project: @project, target_project: @project), class: 'btn gl-button btn-confirm' + = render Pajamas::ButtonComponent.new(variant: :confirm, href: create_mr_path(from: @ref, source_project: @project)) do + = _("Create merge request") .control = form_tag(project_commits_path(@project, @id), method: :get, class: 'commits-search-form js-signature-container', data: { 'signatures-path' => namespace_project_signatures_path }) do diff --git a/app/views/projects/compare/show.html.haml b/app/views/projects/compare/show.html.haml index a6be6695b75..95186b85838 100644 --- a/app/views/projects/compare/show.html.haml +++ b/app/views/projects/compare/show.html.haml @@ -1,7 +1,7 @@ - add_to_breadcrumbs _("Compare Revisions"), project_compare_index_path(@project) - page_title "#{params[:from]}...#{params[:to]}" -.sub-header-block.no-bottom-space +.sub-header-block.gl-border-b-0.gl-mb-0 .js-signature-container{ data: { 'signatures-path' => signatures_namespace_project_compare_index_path } } #js-compare-selector{ data: project_compare_selector_data(@project, @merge_request, params) } @@ -17,11 +17,11 @@ paginate_diffs: true, paginate_diffs_per_page: Projects::CompareController::COMMIT_DIFFS_PER_PAGE - else - .card.gl-bg-gray-50.gl-border-none.gl-p-2 - .center + = render Pajamas::CardComponent.new(card_options: { class: "gl-bg-gray-50 gl-mb-5 gl-border-none gl-text-center" }) do |c| + - c.body do %h4 = s_("CompareBranches|There isn't anything to compare.") - %p.slead + %p.gl-mb-4.gl-line-height-24 - if params[:to] == params[:from] - source_branch = capture do %span.ref-name= params[:from] diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index d596199f816..11984a9d6f6 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -11,7 +11,7 @@ .content-block.oneline-block.files-changed.diff-files-changed.js-diff-files-changed .files-changed-inner .inline-parallel-buttons.gl-display-none.gl-md-display-flex - - if !diffs_expanded? && diff_files.any? { |diff_file| diff_file.collapsed? } + - if !diffs_expanded? && diff_files.any?(&:collapsed?) = link_to _('Expand all'), url_for(safe_params.merge(expanded: 1, format: nil)), class: 'gl-button btn btn-default' - if show_whitespace_toggle - if current_controller?(:commit) diff --git a/app/views/projects/google_cloud/configuration/index.html.haml b/app/views/projects/google_cloud/configuration/index.html.haml index ec977898f47..dab49d5032a 100644 --- a/app/views/projects/google_cloud/configuration/index.html.haml +++ b/app/views/projects/google_cloud/configuration/index.html.haml @@ -1,4 +1,4 @@ -- add_to_breadcrumbs _('Google Cloud'), @google_cloud_path +- add_to_breadcrumbs _('Google Cloud'), project_google_cloud_path(@project) - breadcrumb_title s_('CloudSeed|Configuration') - page_title s_('CloudSeed|Configuration') diff --git a/app/views/projects/google_cloud/databases/index.html.haml b/app/views/projects/google_cloud/databases/index.html.haml index ad732317d8d..0528ac3d1f5 100644 --- a/app/views/projects/google_cloud/databases/index.html.haml +++ b/app/views/projects/google_cloud/databases/index.html.haml @@ -1,4 +1,4 @@ -- add_to_breadcrumbs _('Google Cloud'), @google_cloud_path +- add_to_breadcrumbs _('Google Cloud'), project_google_cloud_path(@project) - breadcrumb_title s_('CloudSeed|Databases') - page_title s_('CloudSeed|Databases') diff --git a/app/views/projects/google_cloud/deployments/index.html.haml b/app/views/projects/google_cloud/deployments/index.html.haml index b140159a7f5..22a365671bc 100644 --- a/app/views/projects/google_cloud/deployments/index.html.haml +++ b/app/views/projects/google_cloud/deployments/index.html.haml @@ -1,4 +1,4 @@ -- add_to_breadcrumbs _('Google Cloud'), @google_cloud_path +- add_to_breadcrumbs _('Google Cloud'), project_google_cloud_path(@project) - breadcrumb_title s_('CloudSeed|Deployments') - page_title s_('CloudSeed|Deployments') 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 d7cabaa029b..36b5630611e 100644 --- a/app/views/projects/google_cloud/gcp_regions/index.html.haml +++ b/app/views/projects/google_cloud/gcp_regions/index.html.haml @@ -1,4 +1,4 @@ -- add_to_breadcrumbs _('Google Cloud'), @google_cloud_path +- add_to_breadcrumbs _('Google Cloud'), project_google_cloud_path(@project) - breadcrumb_title _('CloudSeed|Regions') - page_title s_('CloudSeed|Regions') diff --git a/app/views/projects/google_cloud/service_accounts/index.html.haml b/app/views/projects/google_cloud/service_accounts/index.html.haml index 6191de577fe..8f70818abd9 100644 --- a/app/views/projects/google_cloud/service_accounts/index.html.haml +++ b/app/views/projects/google_cloud/service_accounts/index.html.haml @@ -1,4 +1,4 @@ -- add_to_breadcrumbs _('Google Cloud'), @google_cloud_path +- add_to_breadcrumbs _('Google Cloud'), project_google_cloud_path(@project) - breadcrumb_title s_('CloudSeed|Service Account') - page_title s_('CloudSeed|Service Account') diff --git a/app/views/projects/graphs/charts.html.haml b/app/views/projects/graphs/charts.html.haml index ca0307aed60..04d400688d4 100644 --- a/app/views/projects/graphs/charts.html.haml +++ b/app/views/projects/graphs/charts.html.haml @@ -15,20 +15,7 @@ - if defined?(@daily_coverage_options) .repo-charts.my-5 - .sub-header-block.border-top - .d-flex.justify-content-between.align-items-center - %h4.sub-header.m-0 - - start_date = capture do - #{@daily_coverage_options[:base_params][:start_date].strftime('%b %d')} - - end_date = capture do - #{@daily_coverage_options[:base_params][:end_date].strftime('%b %d')} - = (_("Code coverage statistics for %{ref} %{start_date} - %{end_date}") % { ref: "<strong>#{h @ref}</strong>", start_date: start_date, end_date: end_date }).html_safe - - download_path = capture do - #{@daily_coverage_options[:download_path]} - %a.btn.gl-button.btn-default.btn-sm{ href: "#{download_path}?#{@daily_coverage_options[:base_params].to_query}" } - %small - = _("Download raw data (.csv)") - #js-code-coverage-chart{ data: { graph_endpoint: "#{@daily_coverage_options[:graph_api_path]}?#{@daily_coverage_options[:base_params].to_query}" } } + #js-code-coverage-chart{ data: project_coverage_chart_data_attributes(@daily_coverage_options, @ref) } .repo-charts .sub-header-block.border-top diff --git a/app/views/projects/hook_logs/_index.html.haml b/app/views/projects/hook_logs/_index.html.haml deleted file mode 100644 index 6a46b0b3510..00000000000 --- a/app/views/projects/hook_logs/_index.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -- docs_link_url = help_page_path('user/project/integrations/webhooks', anchor: 'troubleshoot-webhooks') -- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: docs_link_url } -- link_end = '</a>'.html_safe - -.row.gl-mt-3.gl-mb-3 - .col-lg-3 - %h4.gl-mt-0 - = _('Recent events') - %p= _('GitLab events trigger webhooks. Use the request details of a webhook to help troubleshoot problems. %{link_start}How do I troubleshoot?%{link_end}').html_safe % { link_start: link_start, link_end: link_end } - .col-lg-9 - = render partial: 'shared/hook_logs/recent_deliveries_table', locals: { hook: hook, hook_logs: hook_logs } diff --git a/app/views/projects/hooks/edit.html.haml b/app/views/projects/hooks/edit.html.haml index 74af65904cd..b350455807d 100644 --- a/app/views/projects/hooks/edit.html.haml +++ b/app/views/projects/hooks/edit.html.haml @@ -18,4 +18,4 @@ %hr -= render partial: 'projects/hook_logs/index', locals: { hook: @hook, hook_logs: @hook_logs, project: @project } += render partial: 'shared/hook_logs/index', locals: { hook: @hook, hook_logs: @hook_logs, project: @project } diff --git a/app/views/projects/imports/new.html.haml b/app/views/projects/imports/new.html.haml index bcfa32566fb..306f24d717b 100644 --- a/app/views/projects/imports/new.html.haml +++ b/app/views/projects/imports/new.html.haml @@ -1,19 +1,19 @@ -- page_title _("Import repository") +- page_title _('Import repository') %h1.page-title.gl-font-size-h-display = _('Import repository') %hr - if @project.import_failed? - .card.border-danger - .card-header.bg-danger.text-white The repository could not be imported. - .card-body - %pre - :preserve - #{h(@project.import_state.last_error)} + = render Pajamas::AlertComponent.new(title: s_('Import|The repository could not be imported.'), + dismissible: false, + variant: :danger, + alert_options: { class: 'gl-mb-5' }) do |c| + = c.body do + = @project.import_state.last_error = gitlab_ui_form_for @project, url: project_import_path(@project), method: :post, html: { class: 'js-project-import' } do |f| - = render "shared/import_form", f: f + = render 'shared/import_form', f: f .form-actions - = f.submit 'Start import', class: "gl-button btn btn-confirm", data: { disable_with: false } + = f.submit 'Start import', class: 'gl-button btn btn-confirm', data: { disable_with: false } diff --git a/app/views/projects/issues/_new_branch.html.haml b/app/views/projects/issues/_new_branch.html.haml index 801841edc26..f9798d25b06 100644 --- a/app/views/projects/issues/_new_branch.html.haml +++ b/app/views/projects/issues/_new_branch.html.haml @@ -6,11 +6,10 @@ - create_mr_text = can_create_confidential_merge_request? ? _('Create confidential merge request') : _('Create merge request') - can_create_path = can_create_branch_project_issue_path(@project, @issue) - - create_mr_path = project_new_merge_request_path(@project, merge_request: { source_branch: @issue.to_branch_name, target_branch: @project.default_branch, issue_iid: @issue.iid }) - create_branch_path = project_branches_path(@project, branch_name: @issue.to_branch_name, ref: @project.default_branch, issue_iid: @issue.iid, format: :json) - refs_path = refs_namespace_project_path(@project.namespace, @project, search: '') - .create-mr-dropdown-wrap.d-inline-block.full-width-mobile.js-create-mr{ data: { project_path: @project.full_path, project_id: @project.id, can_create_path: can_create_path, create_mr_path: create_mr_path, create_branch_path: create_branch_path, refs_path: refs_path, is_confidential: can_create_confidential_merge_request?.to_s } } + .create-mr-dropdown-wrap.d-inline-block.full-width-mobile.js-create-mr{ data: { project_path: @project.full_path, project_id: @project.id, can_create_path: can_create_path, create_mr_path: create_mr_path(from: @issue.to_branch_name, source_project: @project, to: @project.default_branch, mr_params: { issue_iid: @issue.iid }), create_branch_path: create_branch_path, refs_path: refs_path, is_confidential: can_create_confidential_merge_request?.to_s } } .btn-group.unavailable %button.gl-button.btn{ type: 'button', disabled: 'disabled' } = gl_loading_icon(inline: true, css_class: 'js-create-mr-spinner gl-button-icon gl-display-none') diff --git a/app/views/projects/issues/_related_issues.html.haml b/app/views/projects/issues/_related_issues.html.haml index bab37609c20..1c252958525 100644 --- a/app/views/projects/issues/_related_issues.html.haml +++ b/app/views/projects/issues/_related_issues.html.haml @@ -1,5 +1,7 @@ - if can?(current_user, :read_issue_link, @project) .js-related-issues-root{ data: { endpoint: project_issue_links_path(@project, @issue), can_add_related_issues: "#{can?(current_user, :admin_issue_link, @issue)}", + 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'), - show_categorized_issues: "false" } } + show_categorized_issues: @project.licensed_feature_available?(:blocked_issues).to_s } } diff --git a/app/views/projects/issues/_work_item_links.html.haml b/app/views/projects/issues/_work_item_links.html.haml index 5d478784350..df2ffdd30ee 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 } } + .js-work-item-links-root{ data: { issuable_id: @issue.id, 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 647464b31f8..f7a02c521f5 100644 --- a/app/views/projects/labels/index.html.haml +++ b/app/views/projects/labels/index.html.haml @@ -11,14 +11,14 @@ .labels-container.gl-mt-5 - if can_admin_label && search.blank? %p.text-muted - = _('Labels can be applied to issues and merge requests.') - %br - = _('Star a label to make it a priority label. Order the prioritized labels to change their relative priority, by dragging.') + = _('Labels can be applied to issues and merge requests. Star a label to make it a priority label.') -# Only show it in the first page - hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1') .prioritized-labels.gl-mb-7{ class: [('hide' if hide), ('is-not-draggable' unless can_admin_label)] } %h4.gl-mt-3= _('Prioritized Labels') + %p.text-muted + = _('Drag to reorder prioritized labels and change their relative priority.') .manage-labels-list.js-prioritized-labels{ data: { url: set_priorities_project_labels_path(@project), sortable: can_admin_label } } #js-priority-labels-empty-state.priority-labels-empty-state{ class: "#{'hidden' unless @prioritized_labels.empty? && search.blank?}" } = render 'shared/empty_states/priority_labels' 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 6b367c735c3..62cd8bd94e3 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 @@ -34,9 +34,10 @@ = display_issuable_type - unless current_controller?('conflicts') - - if current_user && moved_mr_sidebar_enabled? && !@merge_request.merged? - %li.gl-new-dropdown-divider - %hr.dropdown-divider + - if current_user && moved_mr_sidebar_enabled? + - if !@merge_request.merged? + %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 diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 4ef557fbd8f..78976be5dd7 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -32,7 +32,7 @@ = tab_link_for @merge_request, :commits do = _("Commits") = gl_badge_tag @commits_count, { size: :sm } - - if @number_of_pipelines.nonzero? + - if @project.builds_enabled? = render "projects/merge_requests/tabs/tab", name: "pipelines", class: "pipelines-tab" do = tab_link_for @merge_request, :pipelines do = _("Pipelines") @@ -44,7 +44,7 @@ - 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: 'angle-double-left', + icon: 'chevron-double-lg-left', button_options: { class: 'js-sidebar-toggle' }) do = _('Expand') .d-flex.flex-wrap.align-items-center.justify-content-lg-end @@ -80,7 +80,7 @@ = render "projects/merge_requests/tabs/pane", name: "commits", id: "commits", class: "commits" do -# This tab is always loaded via AJAX = render "projects/merge_requests/tabs/pane", name: "pipelines", id: "pipelines", class: "pipelines" do - - if @number_of_pipelines.nonzero? + - if @project.builds_enabled? = render 'projects/commit/pipelines_list', disable_initialization: true, endpoint: pipelines_project_merge_request_path(@project, @merge_request) - params = request.query_parameters.merge(diff_head: true) = render "projects/merge_requests/tabs/pane", name: "diffs", id: "js-diffs-app", class: "diffs", data: diffs_tab_pane_data(@project, @merge_request, params) @@ -99,11 +99,8 @@ #js-review-bar -- if Feature.enabled?(:mr_experience_survey, @project) - #js-mr-experience-survey - -- if current_user&.mr_attention_requests_enabled? - #js-need-attention-sidebar-onboarding +- if Feature.enabled?(:mr_experience_survey, @project) && current_user + #js-mr-experience-survey{ data: { account_age: current_user.account_age_in_days } } = render 'projects/invite_members_modal', project: @project = render 'shared/web_ide_path' diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml index 9b0508d8cb5..0d56bf7793d 100644 --- a/app/views/projects/milestones/_form.html.haml +++ b/app/views/projects/milestones/_form.html.haml @@ -1,4 +1,4 @@ -= form_for [@project, @milestone], += 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-group.row diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 07c38d9845c..56581fe7b18 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -13,7 +13,7 @@ .row{ 'v-cloak': true } #blank-project-pane.tab-pane.active = gitlab_ui_form_for @project, html: { class: 'new_project gl-mt-3' } do |f| - = render 'new_project_fields', f: f, project_name_id: "blank-project-name" + = render 'new_project_fields', f: f, project_name_id: "blank-project-name", include_description: false #create-from-template-pane.tab-pane = render Pajamas::CardComponent.new(card_options: { class: 'gl-my-5' }) do |c| diff --git a/app/views/projects/pages/_access.html.haml b/app/views/projects/pages/_access.html.haml index c5efacb21af..28f04d78861 100644 --- a/app/views/projects/pages/_access.html.haml +++ b/app/views/projects/pages/_access.html.haml @@ -1,8 +1,8 @@ - if @project.pages_deployed? - .card - .card-header + = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5', data: { qa_selector: 'access_page_container' } }, footer_options: { class: 'gl-alert-warning' }) do |c| + - c.header do = s_('GitLabPages|Access pages') - .card-body + - c.body do %p %strong = s_('GitLabPages|Your pages are served under:') @@ -14,7 +14,7 @@ %p = external_link(domain.url, domain.url) - unless @project.public_pages? - .card-footer.gl-alert-warning + - c.footer do - help_page = help_page_path('user/project/pages/pages_access_control') - link_start = '<a href="%{url}" target="_blank" class="gl-alert-link" rel="noopener noreferrer">'.html_safe % { url: help_page } - link_end = '</a>'.html_safe diff --git a/app/views/projects/pages/_header.html.haml b/app/views/projects/pages/_header.html.haml new file mode 100644 index 00000000000..da35f2fdf09 --- /dev/null +++ b/app/views/projects/pages/_header.html.haml @@ -0,0 +1,11 @@ +- can_add_new_domain = can?(current_user, :update_pages, @project) && (Gitlab.config.pages.external_http || Gitlab.config.pages.external_https) + +%h1.page-title.gl-font-size-h-display.with-button + = s_('GitLabPages|Pages') + - if can_add_new_domain + = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { class: 'float-right'}, href: new_project_pages_domain_path(@project)) do + = s_('GitLabPages|New Domain') +%p + - docs_link_start = "<a href='#{help_page_path('user/project/pages/index')}' target='_blank' rel='noopener noreferrer'>".html_safe + - docs_link_end = '</a>'.html_safe + = s_('GitLabPages|With GitLab Pages you can host your static website directly from your GitLab repository. %{docs_link_start}Learn more.%{link_end}').html_safe % { docs_link_start: docs_link_start, link_end: docs_link_end } diff --git a/app/views/projects/pages/_list.html.haml b/app/views/projects/pages/_list.html.haml index 0ddf105ef60..16312da1353 100644 --- a/app/views/projects/pages/_list.html.haml +++ b/app/views/projects/pages/_list.html.haml @@ -1,38 +1,39 @@ - verification_enabled = Gitlab::CurrentSettings.pages_domain_verification_enabled? - if can?(current_user, :update_pages, @project) && @domains.any? - .card - .card-header + = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5'}) do |c| + - c.header do Domains (#{@domains.size}) - %ul.list-group.list-group-flush - - @domains.each do |domain| - %li.list-group-item.gl-display-flex.gl-justify-content-space-between.gl-align-items-center - .gl-display-flex.gl-align-items-center - - if verification_enabled - - tooltip, status = domain.unverified? ? [s_('GitLabPages|Unverified'), 'failed'] : [s_('GitLabPages|Verified'), 'success'] - .domain-status.ci-status-icon.has-tooltip{ class: "gl-mr-5 ci-status-icon-#{status}", title: tooltip } - = sprite_icon("status_#{status}" ) - .domain-name - = external_link(domain.url, domain.url) - - if domain.certificate - %div - = gl_badge_tag(s_('GitLabPages|Certificate: %{subject}') % { subject: domain.pages_domain.subject }) - - if domain.expired? - = gl_badge_tag s_('GitLabPages|Expired'), variant: :danger - %div - = link_to s_('GitLabPages|Edit'), project_pages_domain_path(@project, domain), class: "btn gl-button btn-sm btn-grouped btn-confirm btn-inverted" - = link_to s_('GitLabPages|Remove'), project_pages_domain_path(@project, domain), data: { confirm: s_('GitLabPages|Are you sure?'), 'confirm-btn-variant': 'danger'}, "aria-label": s_("GitLabPages|Remove domain"), method: :delete, class: "btn gl-button btn-danger btn-sm btn-grouped" - - if domain.needs_verification? - %li.list-group-item.bs-callout-warning - - details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe - - details_link_end = '</a>'.html_safe - = s_('GitLabPages|%{domain} is not verified. To learn how to verify ownership, visit your %{link_start}domain details%{link_end}.').html_safe % { domain: domain.domain, - link_start: details_link_start, - link_end: details_link_end } - - if domain.show_auto_ssl_failed_warning? - %li.list-group-item.bs-callout-warning - - details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe - - details_link_end = '</a>'.html_safe - = s_("GitLabPages|Something went wrong while obtaining the Let's Encrypt certificate for %{domain}. To retry visit your %{link_start}domain details%{link_end}.").html_safe % { domain: domain.domain, - link_start: details_link_start, - link_end: details_link_end } + - c.body do + %ul.list-group.list-group-flush + - @domains.each do |domain| + %li.list-group-item.gl-display-flex.gl-justify-content-space-between.gl-align-items-center.gl-p-0 + .gl-display-flex.gl-align-items-center + - if verification_enabled + - tooltip, status = domain.unverified? ? [s_('GitLabPages|Unverified'), 'failed'] : [s_('GitLabPages|Verified'), 'success'] + .domain-status.ci-status-icon.has-tooltip{ class: "gl-mr-5 ci-status-icon-#{status}", title: tooltip } + = sprite_icon("status_#{status}" ) + .domain-name + = external_link(domain.url, domain.url) + - if domain.certificate + %div + = gl_badge_tag(s_('GitLabPages|Certificate: %{subject}') % { subject: domain.pages_domain.subject }) + - if domain.expired? + = gl_badge_tag s_('GitLabPages|Expired'), variant: :danger + %div + = link_to s_('GitLabPages|Edit'), project_pages_domain_path(@project, domain), class: "btn gl-button btn-sm btn-grouped btn-confirm btn-inverted" + = link_to s_('GitLabPages|Remove'), project_pages_domain_path(@project, domain), data: { confirm: s_('GitLabPages|Are you sure?'), 'confirm-btn-variant': 'danger'}, "aria-label": s_("GitLabPages|Remove domain"), method: :delete, class: "btn gl-button btn-danger btn-sm btn-grouped" + - if domain.needs_verification? + %li.list-group-item.bs-callout-warning + - details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe + - details_link_end = '</a>'.html_safe + = s_('GitLabPages|%{domain} is not verified. To learn how to verify ownership, visit your %{link_start}domain details%{link_end}.').html_safe % { domain: domain.domain, + link_start: details_link_start, + link_end: details_link_end } + - if domain.show_auto_ssl_failed_warning? + %li.list-group-item.bs-callout-warning + - details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe + - details_link_end = '</a>'.html_safe + = s_("GitLabPages|Something went wrong while obtaining the Let's Encrypt certificate for %{domain}. To retry visit your %{link_start}domain details%{link_end}.").html_safe % { domain: domain.domain, + link_start: details_link_start, + link_end: details_link_end } diff --git a/app/views/projects/pages/_no_domains.html.haml b/app/views/projects/pages/_no_domains.html.haml index a537bd80d30..eee7d062d00 100644 --- a/app/views/projects/pages/_no_domains.html.haml +++ b/app/views/projects/pages/_no_domains.html.haml @@ -1,6 +1,6 @@ - if can?(current_user, :update_pages, @project) - .card - .card-header + = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5'}, body_options: { class: 'gl-text-center nothing-here-block' }) do |c| + - c.header do = s_('GitLabPages|Domains') - .nothing-here-block + - c.body do = s_("GitLabPages|Support for domains and certificates is disabled. Ask your system's administrator to enable it.") diff --git a/app/views/projects/pages/_use.html.haml b/app/views/projects/pages/_use.html.haml index 20e6338fa76..dccf61c6ec5 100644 --- a/app/views/projects/pages/_use.html.haml +++ b/app/views/projects/pages/_use.html.haml @@ -1,10 +1,9 @@ - unless @project.pages_deployed? - .card.border-info - .card-header.bg-info.text-white + = render Pajamas::CardComponent.new(card_options: { class: 'gl-border-blue-500' }, header_options: { class: 'gl-bg-blue-500 gl-text-white' }) do |c| + - c.header do = s_('GitLabPages|Configure pages') - .card-body - %p.gl-mb-0 - - docs_link_start = "<a href='#{help_page_path('user/project/pages/index')}' target='_blank' rel='noopener noreferrer'>".html_safe - - samples_link_start = "<a href='https://gitlab.com/pages' target='_blank' rel='noopener noreferrer'>".html_safe - - link_end = '</a>'.html_safe - = s_('GitLabPages|Your Pages site is not configured yet. See the %{docs_link_start}GitLab Pages documentation%{link_end} to learn how to upload your static site and have GitLab serve it. You can also take some inspiration from the %{samples_link_start}sample Pages projects%{link_end}.').html_safe % { docs_link_start: docs_link_start, samples_link_start: samples_link_start, link_end: link_end } + - c.body do + - docs_link_start = "<a href='#{help_page_path('user/project/pages/index')}' target='_blank' rel='noopener noreferrer' data-track-action='click_link' data-track-label='pages_docs_link'>".html_safe + - samples_link_start = "<a href='https://gitlab.com/pages' target='_blank' rel='noopener noreferrer' data-track-action='click_link' data-track-label='pages_samples_link'>".html_safe + - link_end = '</a>'.html_safe + = s_('GitLabPages|Your Pages site is not configured yet. See the %{docs_link_start}GitLab Pages documentation%{link_end} to learn how to upload your static site and have GitLab serve it. You can also take some inspiration from the %{samples_link_start}sample Pages projects%{link_end}.').html_safe % { docs_link_start: docs_link_start, samples_link_start: samples_link_start, link_end: link_end } diff --git a/app/views/projects/pages/_waiting.html.haml b/app/views/projects/pages/_waiting.html.haml new file mode 100644 index 00000000000..e8acadbabe3 --- /dev/null +++ b/app/views/projects/pages/_waiting.html.haml @@ -0,0 +1,13 @@ +.empty-state + .row.gl-align-items-center.gl-justify-content-center + .order-md-2 + = image_tag 'illustrations/pipelines_pending.svg' + .row.gl-align-items-center.gl-justify-content-center + .text-content.gl-text-center.order-md-1 + %h4= s_("GitLabPages|Waiting for the Pages Pipeline to complete...") + %p= s_("GitLabPages|Your Project has been configured for Pages. Now we have to wait for the Pipeline to succeed for the first time.") + = render Pajamas::ButtonComponent.new(variant: :confirm, href: project_pipelines_path(@project)) do + = s_("GitLabPages|Check the Pipeline Status") + = render Pajamas::ButtonComponent.new(href: new_namespace_project_pages_path) do + = s_("GitLabPages|Start over") + diff --git a/app/views/projects/pages/disabled.html.haml b/app/views/projects/pages/disabled.html.haml new file mode 100644 index 00000000000..769ecac636b --- /dev/null +++ b/app/views/projects/pages/disabled.html.haml @@ -0,0 +1,4 @@ += render 'header' + +.bs-callout.bs-callout-warning + = html_escape_once(s_('GitLabPages|GitLab Pages are disabled for this project. You can enable them on your project\'s %{strong_start}Settings > General > Visibility%{strong_end} page.')).html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } diff --git a/app/views/projects/pages/new.html.haml b/app/views/projects/pages/new.html.haml new file mode 100644 index 00000000000..cdd52a933e9 --- /dev/null +++ b/app/views/projects/pages/new.html.haml @@ -0,0 +1,7 @@ +- if Feature.enabled?(:use_pipeline_wizard_for_pages, @group) + #js-pages{ data: @pipeline_wizard_data } + +- else + = render 'header' + + = render 'use' diff --git a/app/views/projects/pages/show.html.haml b/app/views/projects/pages/show.html.haml index 3fea9f9ff1b..01477967394 100644 --- a/app/views/projects/pages/show.html.haml +++ b/app/views/projects/pages/show.html.haml @@ -1,30 +1,20 @@ - page_title _('Pages') -- if @project.pages_enabled? - %h1.page-title.gl-font-size-h-display.with-button - = s_('GitLabPages|Pages') +- unless @project.pages_deployed? + = render 'waiting' - - if can?(current_user, :update_pages, @project) && (Gitlab.config.pages.external_http || Gitlab.config.pages.external_https) - = link_to new_project_pages_domain_path(@project), class: 'btn gl-button btn-confirm float-right', title: s_('GitLabPages|New Domain') do - = s_('GitLabPages|New Domain') +- else + = render 'header' - %p.light - - docs_link_start = "<a href='#{help_page_path('user/project/pages/index')}' target='_blank' rel='noopener noreferrer'>".html_safe - - link_end = '</a>'.html_safe - = s_('GitLabPages|With GitLab Pages you can host your static website directly from your GitLab repository. %{docs_link_start}Learn more.%{link_end}').html_safe % { docs_link_start: docs_link_start, link_end: link_end } + %section = render 'pages_settings' %hr.clearfix - - = render 'ssl_limitations_warning' if @project.pages_subdomain.include?(".") - = render 'access' - = render 'use' - - if Gitlab.config.pages.external_http || Gitlab.config.pages.external_https - = render 'list' - - else - = render 'no_domains' - = render 'destroy' -- else - .bs-callout.bs-callout-warning - = html_escape_once(s_('GitLabPages|GitLab Pages are disabled for this project. You can enable them on your project\'s %{strong_start}Settings > General > Visibility%{strong_end} page.')).html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } + = render 'ssl_limitations_warning' if @project.pages_subdomain.include?(".") + = render 'access' + - if Gitlab.config.pages.external_http || Gitlab.config.pages.external_https + = render 'list' + - else + = render 'no_domains' + = render 'destroy' diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml index edcd44563f7..c36c3ae5adf 100644 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml @@ -33,7 +33,7 @@ = link_to play_pipeline_schedule_path(pipeline_schedule), method: :post, title: _('Play'), class: 'btn gl-button btn-default btn-icon' do = sprite_icon('play') - if can?(current_user, :take_ownership_pipeline_schedule, pipeline_schedule) - = link_to take_ownership_pipeline_schedule_path(pipeline_schedule), method: :post, title: s_('PipelineSchedules|Take ownership'), class: 'btn gl-button btn-default' do + = 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_to edit_pipeline_schedule_path(pipeline_schedule), title: _('Edit'), class: 'btn gl-button btn-default btn-icon' do diff --git a/app/views/projects/pipeline_schedules/index.html.haml b/app/views/projects/pipeline_schedules/index.html.haml index a56e8f7f5c7..661cf465081 100644 --- a/app/views/projects/pipeline_schedules/index.html.haml +++ b/app/views/projects/pipeline_schedules/index.html.haml @@ -18,3 +18,5 @@ - else .card.bg-light.gl-mt-3 .nothing-here-block= _("No schedules") + +#pipeline-take-ownership-modal diff --git a/app/views/projects/pipelines/charts.html.haml b/app/views/projects/pipelines/charts.html.haml index 5a655e7e83d..e16a2235e53 100644 --- a/app/views/projects/pipelines/charts.html.haml +++ b/app/views/projects/pipelines/charts.html.haml @@ -6,4 +6,5 @@ failed_pipelines_link: project_pipelines_path(@project, page: '1', scope: 'all', status: 'failed'), coverage_chart_path: charts_project_graph_path(@project, @project.default_branch), test_runs_empty_state_image_path: image_path('illustrations/pipeline.svg'), + project_quality_summary_feedback_image_path: image_path('illustrations/chat-bubble-sm.svg'), default_branch: @project.default_branch } } diff --git a/app/views/projects/project_templates/_template.html.haml b/app/views/projects/project_templates/_template.html.haml index 5e4b1397dd3..d0fdd3a729a 100644 --- a/app/views/projects/project_templates/_template.html.haml +++ b/app/views/projects/project_templates/_template.html.haml @@ -10,7 +10,8 @@ .controls.d-flex.align-items-center %a.btn.gl-button.btn-default.gl-mr-3{ href: template.preview, rel: 'noopener noreferrer', target: '_blank', data: { track_label: "template_preview", track_property: template.name, track_action: "click_button", track_value: "" } } = _("Preview") - %label.btn.gl-button.btn-confirm.template-button.choose-template.gl-mb-0{ for: template.name } + %label.btn.gl-button.btn-confirm.template-button.choose-template.gl-mb-0{ for: template.name, + 'data-testid': "use_template_#{template.name}" } %input{ type: "radio", autocomplete: "off", name: "project[template_name]", id: template.name, value: template.name, data: { track_label: "template_use", track_property: template.name, track_action: "click_button", track_value: "" } } %span{ data: { qa_selector: 'use_template_button' } } = _("Use template") 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 3b8294a1dec..35770c32f9f 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 @@ -1,9 +1,9 @@ = form_for [@project, @protected_branch], html: { class: 'new-protected-branch js-new-protected-branch' } do |f| %input{ type: 'hidden', name: 'update_section', value: 'js-protected-branches-settings' } - .card - .card-header.gl-font-weight-bold + = render Pajamas::CardComponent.new(card_options: { class: "gl-mb-5" }) do |c| + - c.header do = s_("ProtectedBranch|Protect a branch") - .card-body + - c.body do = form_errors(@protected_branch, pajamas_alert: true) .form-group.row = f.label :name, s_('ProtectedBranch|Branch:'), class: 'col-sm-12' @@ -31,5 +31,5 @@ - force_push_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: force_push_docs_url } = (s_("ProtectedBranch|Allow all users with push access to %{tag_start}force push%{tag_end}.") % { tag_start: force_push_link_start, tag_end: '</a>' }).html_safe = render_if_exists 'projects/protected_branches/ee/code_owner_approval_form', f: f - .card-footer + - c.footer do = f.submit s_('ProtectedBranch|Protect'), class: 'gl-button btn btn-confirm', disabled: true, data: { qa_selector: 'protect_button' } diff --git a/app/views/projects/runners/_group_runners.html.haml b/app/views/projects/runners/_group_runners.html.haml index 449b6c25f50..5acd6f95df4 100644 --- a/app/views/projects/runners/_group_runners.html.haml +++ b/app/views/projects/runners/_group_runners.html.haml @@ -28,9 +28,9 @@ = _('This group does not have any group runners yet.') - if can?(current_user, :admin_group_runners, @project.group) - - register_runners_path = group_runners_path(@project.group) - - group_link = link_to _("group's CI/CD settings."), register_runners_path - = _('Group owners can register group runners in the %{link}').html_safe % { link: group_link } + - group_link_start = "<a href='#{group_runners_path(@project.group)}'>".html_safe + - group_link_end = '</a>'.html_safe + = s_("Runners|To register them, go to the %{link_start}group's Runners page%{link_end}.").html_safe % { link_start: group_link_start, link_end: group_link_end } - else = _('Ask your group owner to set up a group runner.') diff --git a/app/views/projects/settings/access_tokens/index.html.haml b/app/views/projects/settings/access_tokens/index.html.haml index 359e34d8918..7ecc8004334 100644 --- a/app/views/projects/settings/access_tokens/index.html.haml +++ b/app/views/projects/settings/access_tokens/index.html.haml @@ -37,7 +37,7 @@ token: @resource_access_token, scopes: @scopes, access_levels: ProjectMember.permissible_access_level_roles(current_user, @project), - default_access_level: Gitlab::Access::MAINTAINER, + default_access_level: Gitlab::Access::GUEST, prefix: :resource_access_token, help_path: help_page_path('user/project/settings/project_access_tokens', anchor: 'scopes-for-a-project-access-token') 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 64f45ec89d1..ea77bda0b0f 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -20,7 +20,7 @@ %fieldset.builds-feature.js-auto-devops-settings .form-group = f.fields_for :auto_devops_attributes, @auto_devops do |form| - .card.auto-devops-card + .card.gl-mb-3 .card-body - autodevops_help_link = link_to _('Learn more.'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer' - auto_devops_badge = auto_devops_enabled ? (gl_badge_tag badge_for_auto_devops_scope(@project), { variant: :info }, { class: 'js-instance-default-badge gl-ml-3 gl-mt-n1'}) : '' diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 09f9ca60b3e..dd9cc296d52 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -41,7 +41,7 @@ = expanded ? _('Collapse') : _('Expand') %p = _("Runners are processes that pick up and execute CI/CD jobs for GitLab.") - = link_to s_('How do I configure runners?'), help_page_path('ci/runners/index'), target: '_blank', rel: 'noopener noreferrer' + = link_to s_('What is GitLab Runner?'), 'https://docs.gitlab.com/runner/', target: '_blank', rel: 'noopener noreferrer' .settings-content = render 'projects/runners/settings' diff --git a/app/views/projects/settings/integrations/edit.html.haml b/app/views/projects/settings/integrations/edit.html.haml index a250daafdbb..46276e6c6c9 100644 --- a/app/views/projects/settings/integrations/edit.html.haml +++ b/app/views/projects/settings/integrations/edit.html.haml @@ -6,4 +6,5 @@ = render 'form', integration: @integration - if @web_hook_logs - = render partial: 'projects/hook_logs/index', locals: { hook: @integration.service_hook, hook_logs: @web_hook_logs, project: @project } + %hr + = render partial: 'shared/hook_logs/index', locals: { hook: @integration.service_hook, hook_logs: @web_hook_logs, project: @project } diff --git a/app/views/projects/settings/operations/show.html.haml b/app/views/projects/settings/operations/show.html.haml index 50bfd3c6976..87e3e03099c 100644 --- a/app/views/projects/settings/operations/show.html.haml +++ b/app/views/projects/settings/operations/show.html.haml @@ -2,22 +2,18 @@ - page_title _('Monitor Settings') - breadcrumb_title _('Monitor Settings') -.gl-alert.gl-alert-danger.gl-mb-5 - - 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 - .gl-alert-container - = sprite_icon('error', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - .gl-alert-content - .gl-alert-title - = s_('Deprecations|Feature deprecation and removal') - .gl-alert-body - %p - = 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 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' 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 new file mode 100644 index 00000000000..795544b75a2 --- /dev/null +++ b/app/views/projects/settings/packages_and_registries/cleanup_tags.html.haml @@ -0,0 +1,6 @@ +- add_to_breadcrumbs _('Packages & Registries'), 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') +- @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 1a7821d3268..d579981ebc0 100644 --- a/app/views/projects/settings/packages_and_registries/show.html.haml +++ b/app/views/projects/settings/packages_and_registries/show.html.haml @@ -2,16 +2,4 @@ - page_title _('Packages & Registries') - @content_class = 'limit-container-width' unless fluid_layout -#js-registry-settings{ data: { project_id: @project.id, - project_path: @project.full_path, - cadence_options: cadence_options.to_json, - keep_n_options: keep_n_options.to_json, - older_than_options: older_than_options.to_json, - is_admin: current_user&.admin.to_s, - show_container_registry_settings: show_container_registry_settings(@project).to_s, - show_package_registry_settings: show_package_registry_settings(@project).to_s, - admin_settings_path: ci_cd_admin_application_settings_path(anchor: 'js-registry-settings'), - enable_historic_entries: container_expiration_policies_historic_entry_enabled?.to_s, - help_page_path: help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'cleanup-policy'), - show_cleanup_policy_link: show_cleanup_policy_link(@project).to_s, - tags_regex_help_page_path: help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'regex-pattern-examples') } } +#js-registry-settings{ data: settings_data } diff --git a/app/views/projects/tags/_edit_release_button.html.haml b/app/views/projects/tags/_edit_release_button.html.haml index 5bdf1c7896c..1c2626e5612 100644 --- a/app/views/projects/tags/_edit_release_button.html.haml +++ b/app/views/projects/tags/_edit_release_button.html.haml @@ -1,11 +1,9 @@ -- if Feature.enabled?(:edit_tag_release_notes_via_release_page, project) - - release_btn_text = s_('TagsPage|Create release') - - release_btn_path = new_project_release_path(project, tag_name: tag.name) - - if release - - release_btn_text = s_('TagsPage|Edit release') - - release_btn_path = edit_project_release_path(project, release) - = link_to release_btn_path, class: 'btn gl-button btn-default btn-icon btn-edit has-tooltip', title: release_btn_text, data: { container: "body" } do - = sprite_icon('pencil', css_class: 'gl-icon') -- else - = link_to edit_project_tag_release_path(project, tag.name), class: 'btn gl-button btn-default btn-icon btn-edit has-tooltip', title: s_('TagsPage|Edit release notes'), data: { container: "body" } do - = sprite_icon('pencil', css_class: 'gl-icon') +- release_btn_text = s_('TagsPage|Create release') +- release_btn_path = new_project_release_path(project, tag_name: tag.name) +- option_css_classes = local_assigns.fetch(:option_css_classes, '') +- css_classes = "btn gl-button btn-default btn-icon btn-edit has-tooltip #{option_css_classes}" +- if release + - release_btn_text = s_('TagsPage|Edit release') + - release_btn_path = edit_project_release_path(project, release) += link_to release_btn_path, class: css_classes, title: release_btn_text, data: { container: "body" } do + = sprite_icon('pencil', css_class: 'gl-icon') diff --git a/app/views/projects/tags/_release_link.html.haml b/app/views/projects/tags/_release_link.html.haml new file mode 100644 index 00000000000..c942d122a58 --- /dev/null +++ b/app/views/projects/tags/_release_link.html.haml @@ -0,0 +1,4 @@ +.gl-text-secondary + = sprite_icon("rocket", size: 12) + = _("Release") + = link_to release.name, project_release_path(project, release), class: "gl-text-blue-600!" diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml index 258f662420b..fcad8509a7d 100644 --- a/app/views/projects/tags/_tag.html.haml +++ b/app/views/projects/tags/_tag.html.haml @@ -18,10 +18,7 @@ = s_("TagsPage|Can't find HEAD commit for this tag") - if release - .text-secondary - = sprite_icon("rocket", size: 12) - = _("Release") - = link_to release.name, project_release_path(@project, release), class: 'gl-text-blue-600!' + = render 'release_link', project: @project, release: release - if tag.message.present? %pre.wrap @@ -40,5 +37,5 @@ = render 'projects/buttons/download', project: @project, ref: tag.name, pipeline: @tags_pipelines[tag.name] - if can?(current_user, :admin_tag, @project) - = render 'edit_release_button', tag: tag, project: @project, release: release + = render 'edit_release_button', tag: tag, project: @project, release: release, option_css_classes: 'gl-mr-3!' = render 'projects/buttons/remove_tag', project: @project, tag: tag diff --git a/app/views/projects/tags/releases/edit.html.haml b/app/views/projects/tags/releases/edit.html.haml deleted file mode 100644 index c99f146ea7a..00000000000 --- a/app/views/projects/tags/releases/edit.html.haml +++ /dev/null @@ -1,19 +0,0 @@ -- add_to_breadcrumbs _("Tags"), project_tags_path(@project) -- breadcrumb_title @tag.name -- page_title _("Edit"), @tag.name, _("Tags") - -.sub-header-block.no-bottom-space - .oneline - .title - Release notes for tag - %strong= @tag.name - -= form_for(@release, method: :put, url: project_tag_release_path(@project, @tag.name), - html: { class: 'common-note-form release-form js-quick-submit' }) do |f| - = render layout: 'shared/md_preview', locals: { url: preview_markdown_path(@project), referenced_users: true } do - = render 'shared/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: "Write your release notes or drag files hereā¦" - = render 'shared/notes/hints' - .error-alert - .gl-mt-5.gl-display-flex - = f.submit _('Save changes'), class: 'btn gl-button btn-confirm gl-mr-3' - = link_to _('Cancel'), project_tag_path(@project, @tag.name), class: "btn gl-button btn-default btn-cancel" diff --git a/app/views/projects/tags/show.html.haml b/app/views/projects/tags/show.html.haml index 24da8e2db87..cb7751ecf2e 100644 --- a/app/views/projects/tags/show.html.haml +++ b/app/views/projects/tags/show.html.haml @@ -37,20 +37,21 @@ - else = s_("TagsPage|Can't find HEAD commit for this tag") + - if @release + = render 'release_link', project: @project, release: @release + .nav-controls - if @tag.has_signature? = render partial: 'projects/commit/signature', object: @tag.signature - if can?(current_user, :admin_tag, @project) = render 'edit_release_button', tag: @tag, project: @project, release: @release - = link_to project_tree_path(@project, @tag.name), class: 'btn btn-icon gl-button btn-default controls-item has-tooltip', title: s_('TagsPage|Browse files') do + = link_to project_tree_path(@project, @tag.name), class: 'btn btn-icon gl-button btn-default has-tooltip', title: s_('TagsPage|Browse files') do = sprite_icon('folder-open', css_class: 'gl-icon') - = link_to project_commits_path(@project, @tag.name), class: 'btn btn-icon gl-button btn-default controls-item has-tooltip', title: s_('TagsPage|Browse commits') do + = link_to project_commits_path(@project, @tag.name), class: 'btn btn-icon gl-button btn-default has-tooltip', title: s_('TagsPage|Browse commits') do = sprite_icon('history', css_class: 'gl-icon') - .controls-item - = render 'projects/buttons/download', project: @project, ref: @tag.name + = render 'projects/buttons/download', project: @project, ref: @tag.name - if can?(current_user, :admin_tag, @project) - .btn-container.controls-item-full - = render 'projects/buttons/remove_tag', project: @project, tag: @tag + = render 'projects/buttons/remove_tag', project: @project, tag: @tag - if @tag.message.present? %pre.wrap{ data: { qa_selector: 'tag_message_content' } } diff --git a/app/views/projects/triggers/_index.html.haml b/app/views/projects/triggers/_index.html.haml index 8b3d0ef17a4..0c53ed48210 100644 --- a/app/views/projects/triggers/_index.html.haml +++ b/app/views/projects/triggers/_index.html.haml @@ -1,4 +1,4 @@ -.row.gl-mt-3.gl-mb-3.triggers-container +.row.gl-mt-3.gl-mb-3 .col-lg-12 .card .card-header diff --git a/app/views/projects/triggers/_trigger.html.haml b/app/views/projects/triggers/_trigger.html.haml index ce036606a1c..bce7dc8a94b 100644 --- a/app/views/projects/triggers/_trigger.html.haml +++ b/app/views/projects/triggers/_trigger.html.haml @@ -6,7 +6,7 @@ - else %span= trigger.short_token - .label-container + .gl-display-inline-block.gl-ml-3 - unless trigger.can_access_project? = gl_badge_tag s_('Trigger|invalid'), { variant: :danger }, { title: s_('Trigger|Trigger user has insufficient permissions to project'), data: { toggle: 'tooltip', container: 'body' } } @@ -27,7 +27,7 @@ - else Never - %td.text-right.trigger-actions + %td.text-right.gl-white-space-nowrap - revoke_trigger_confirmation = "By revoking a trigger you will break any processes making use of it. Are you sure?" - if can?(current_user, :admin_trigger, trigger) = link_to edit_project_trigger_path(@project, trigger), method: :get, title: "Edit", class: "gl-button btn btn-default btn-icon" do |