From 48aff82709769b098321c738f3444b9bdaa694c6 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 21 Oct 2020 07:08:36 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-5-stable-ee --- app/views/projects/_export.html.haml | 5 +- app/views/projects/_files.html.haml | 2 +- app/views/projects/_home_panel.html.haml | 12 ++-- app/views/projects/_import_project_pane.html.haml | 17 +++-- app/views/projects/_project_templates.html.haml | 18 +++++- app/views/projects/_stat_anchor_list.html.haml | 3 +- app/views/projects/_visibility_modal.html.haml | 2 +- app/views/projects/artifacts/_artifact.html.haml | 8 +-- app/views/projects/blob/_content.html.haml | 4 +- app/views/projects/blob/_editor.html.haml | 5 +- app/views/projects/blob/_header.html.haml | 7 ++- app/views/projects/blob/_new_dir.html.haml | 4 +- app/views/projects/blob/_remove.html.haml | 4 +- app/views/projects/blob/_upload.html.haml | 6 +- app/views/projects/blob/_viewer_switcher.html.haml | 4 +- app/views/projects/blob/edit.html.haml | 3 - app/views/projects/blob/new.html.haml | 3 +- app/views/projects/blob/viewers/_markup.html.haml | 3 +- app/views/projects/branches/_branch.html.haml | 8 +-- app/views/projects/branches/index.html.haml | 2 +- app/views/projects/buttons/_fork.html.haml | 4 +- app/views/projects/buttons/_remove_tag.html.haml | 6 ++ app/views/projects/buttons/_star.html.haml | 6 +- app/views/projects/ci/builds/_build.html.haml | 22 ++++--- app/views/projects/ci/lints/show.html.haml | 14 ++--- app/views/projects/cleanup/_show.html.haml | 3 +- app/views/projects/commit/_commit_box.html.haml | 12 ++-- app/views/projects/commit/pipelines.html.haml | 1 + app/views/projects/commit/show.html.haml | 1 + app/views/projects/commits/_commits.html.haml | 3 +- app/views/projects/commits/show.html.haml | 6 +- app/views/projects/compare/_form.html.haml | 8 +-- app/views/projects/confluences/show.html.haml | 1 + app/views/projects/cycle_analytics/show.html.haml | 1 + app/views/projects/default_branch/_show.html.haml | 3 +- app/views/projects/deployments/_actions.haml | 2 +- app/views/projects/deployments/_commit.html.haml | 2 +- .../deployments/_confirm_rollback_modal.html.haml | 4 +- app/views/projects/deployments/_rollback.haml | 2 +- app/views/projects/diffs/_diffs.html.haml | 2 +- app/views/projects/diffs/_file_header.html.haml | 2 +- app/views/projects/diffs/_line.html.haml | 3 - app/views/projects/diffs/_parallel_view.html.haml | 6 -- app/views/projects/diffs/_stats.html.haml | 4 +- app/views/projects/diffs/_text_file.html.haml | 2 +- app/views/projects/diffs/_warning.html.haml | 23 ++++--- app/views/projects/edit.html.haml | 23 +++---- app/views/projects/empty.html.haml | 10 +-- app/views/projects/environments/edit.html.haml | 1 + app/views/projects/environments/folder.html.haml | 1 + app/views/projects/environments/index.html.haml | 1 + app/views/projects/environments/new.html.haml | 1 + app/views/projects/environments/show.html.haml | 7 +-- app/views/projects/environments/terminal.html.haml | 4 +- .../projects/error_tracking/details.html.haml | 1 + app/views/projects/error_tracking/index.html.haml | 1 + app/views/projects/feature_flags/_errors.html.haml | 4 -- app/views/projects/feature_flags/edit.html.haml | 4 +- app/views/projects/feature_flags/index.html.haml | 2 + app/views/projects/feature_flags/new.html.haml | 2 +- app/views/projects/forks/_fork_button.html.haml | 4 +- app/views/projects/forks/index.html.haml | 4 +- .../_generic_commit_status.html.haml | 2 +- app/views/projects/group_links/update.js.haml | 4 -- app/views/projects/hook_logs/show.html.haml | 2 +- app/views/projects/hooks/edit.html.haml | 4 +- app/views/projects/hooks/index.html.haml | 3 +- app/views/projects/incidents/_new_branch.html.haml | 1 + app/views/projects/incidents/index.html.haml | 2 +- app/views/projects/incidents/show.html.haml | 1 + app/views/projects/issues/_discussion.html.haml | 1 + app/views/projects/issues/_issue.html.haml | 4 +- app/views/projects/issues/_issues.html.haml | 8 ++- app/views/projects/issues/_new_branch.html.haml | 2 +- .../projects/issues/export_csv/_button.html.haml | 2 +- .../projects/issues/export_csv/_modal.html.haml | 13 ++-- app/views/projects/issues/index.html.haml | 1 + app/views/projects/issues/service_desk.html.haml | 2 +- app/views/projects/issues/show.html.haml | 14 +++-- app/views/projects/jobs/show.html.haml | 4 +- app/views/projects/jobs/terminal.html.haml | 5 +- app/views/projects/labels/index.html.haml | 4 +- .../projects/merge_requests/_description.html.haml | 3 +- .../projects/merge_requests/_discussion.html.haml | 11 ---- .../merge_requests/_merge_request.html.haml | 5 +- .../merge_requests/_merge_requests.html.haml | 2 +- .../projects/merge_requests/_mr_title.html.haml | 9 ++- .../merge_requests/conflicts/show.html.haml | 1 + .../merge_requests/creations/new.html.haml | 1 + .../merge_requests/diffs/_commit_widget.html.haml | 11 ---- .../merge_requests/diffs/_different_base.html.haml | 11 ---- .../projects/merge_requests/diffs/_diffs.html.haml | 21 ------- .../diffs/_not_all_comments_displayed.html.haml | 17 ----- .../diffs/_version_controls.html.haml | 73 ---------------------- .../projects/merge_requests/invalid.html.haml | 15 +++-- app/views/projects/merge_requests/show.html.haml | 8 ++- app/views/projects/milestones/index.html.haml | 3 +- app/views/projects/milestones/show.html.haml | 15 +++-- app/views/projects/milestones/update.js.haml | 2 - app/views/projects/mirrors/_mirror_repos.html.haml | 6 +- ...generate_public_ssh_key_confirm_modal.html.haml | 4 +- .../projects/mirrors/_ssh_host_keys.html.haml | 4 +- app/views/projects/network/show.html.haml | 8 +-- app/views/projects/no_repo.html.haml | 2 +- app/views/projects/notes/_actions.html.haml | 2 +- .../projects/packages/packages/show.html.haml | 3 +- app/views/projects/pages/_destroy.haml | 2 +- app/views/projects/pages/_list.html.haml | 4 +- app/views/projects/pages/_pages_settings.html.haml | 7 ++- app/views/projects/pages/show.html.haml | 2 +- .../projects/pages_domains/_certificate.html.haml | 2 +- app/views/projects/pages_domains/_form.html.haml | 3 +- .../_pipeline_schedule.html.haml | 2 +- .../projects/pipeline_schedules/index.html.haml | 2 +- app/views/projects/pipelines/_info.html.haml | 6 +- app/views/projects/pipelines/_with_tabs.html.haml | 2 +- app/views/projects/pipelines/index.html.haml | 1 + app/views/projects/pipelines/new.html.haml | 12 +++- app/views/projects/pipelines/show.html.haml | 5 +- app/views/projects/project_members/_team.html.haml | 2 +- .../projects/project_members/import.html.haml | 4 +- .../_built_in_templates.html.haml | 17 ----- .../projects/project_templates/_template.html.haml | 16 +++++ .../_create_protected_branch.html.haml | 4 +- .../shared/_create_protected_tag.html.haml | 2 +- .../projects/registry/repositories/index.html.haml | 3 + app/views/projects/registry/settings/_index.haml | 3 +- app/views/projects/releases/show.html.haml | 3 +- .../projects/runners/_shared_runners.html.haml | 25 ++++---- .../_installation_info.html.haml | 2 +- .../prometheus/_configuration_banner.html.haml | 4 +- .../services/prometheus/_custom_metrics.html.haml | 2 +- app/views/projects/settings/_archive.html.haml | 7 +-- app/views/projects/settings/_general.html.haml | 3 +- app/views/projects/settings/ci_cd/_badge.html.haml | 6 +- app/views/projects/settings/ci_cd/_form.html.haml | 13 ++-- .../operations/_alert_management.html.haml | 2 +- .../settings/operations/_tracing.html.haml | 33 ++++++++++ .../projects/settings/operations/show.html.haml | 2 +- app/views/projects/snippets/_actions.html.haml | 36 ----------- app/views/projects/snippets/show.html.haml | 8 +-- app/views/projects/starrers/index.html.haml | 2 +- app/views/projects/tags/_tag.html.haml | 8 +-- app/views/projects/tags/destroy.js.haml | 4 -- app/views/projects/tags/show.html.haml | 3 +- .../projects/tracings/_tracing_button.html.haml | 2 + app/views/projects/tracings/show.html.haml | 33 ++++++++++ app/views/projects/tree/_tree_header.html.haml | 12 +--- app/views/projects/tree/show.html.haml | 2 + app/views/projects/triggers/_index.html.haml | 35 ++++++----- app/views/projects/triggers/_trigger.html.haml | 4 +- app/views/projects/wikis/git_access.html.haml | 1 + 152 files changed, 461 insertions(+), 541 deletions(-) create mode 100644 app/views/projects/buttons/_remove_tag.html.haml delete mode 100644 app/views/projects/feature_flags/_errors.html.haml delete mode 100644 app/views/projects/group_links/update.js.haml create mode 100644 app/views/projects/incidents/_new_branch.html.haml create mode 100644 app/views/projects/incidents/show.html.haml delete mode 100644 app/views/projects/merge_requests/_discussion.html.haml delete mode 100644 app/views/projects/merge_requests/diffs/_commit_widget.html.haml delete mode 100644 app/views/projects/merge_requests/diffs/_different_base.html.haml delete mode 100644 app/views/projects/merge_requests/diffs/_diffs.html.haml delete mode 100644 app/views/projects/merge_requests/diffs/_not_all_comments_displayed.html.haml delete mode 100644 app/views/projects/merge_requests/diffs/_version_controls.html.haml delete mode 100644 app/views/projects/milestones/update.js.haml delete mode 100644 app/views/projects/project_templates/_built_in_templates.html.haml create mode 100644 app/views/projects/project_templates/_template.html.haml create mode 100644 app/views/projects/settings/operations/_tracing.html.haml delete mode 100644 app/views/projects/snippets/_actions.html.haml delete mode 100644 app/views/projects/tags/destroy.js.haml create mode 100644 app/views/projects/tracings/_tracing_button.html.haml create mode 100644 app/views/projects/tracings/show.html.haml (limited to 'app/views/projects') diff --git a/app/views/projects/_export.html.haml b/app/views/projects/_export.html.haml index 41e13464b1e..5ec2dc57f96 100644 --- a/app/views/projects/_export.html.haml +++ b/app/views/projects/_export.html.haml @@ -26,6 +26,5 @@ = link_to _('Generate new export'), generate_new_export_project_path(project), method: :post, class: "btn btn-default" - else - .gl-display-flex.gl-justify-content-end - = link_to _('Export project'), export_project_path(project), - method: :post, class: "btn btn-default", data: { qa_selector: 'export_project_link' } + = link_to _('Export project'), export_project_path(project), + method: :post, class: "btn btn-default", data: { qa_selector: 'export_project_link' } diff --git a/app/views/projects/_files.html.haml b/app/views/projects/_files.html.haml index 1562cc065f1..81c42de13f0 100644 --- a/app/views/projects/_files.html.haml +++ b/app/views/projects/_files.html.haml @@ -14,7 +14,7 @@ - if is_project_overview .project-buttons.gl-mb-3.js-show-on-project-root - = render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout) + = render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout), project_buttons: true #js-tree-list{ data: vue_file_list_data(project, ref) } - if can_edit_tree? diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index 94a2bdb3bcb..9f4496e7a13 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -3,19 +3,19 @@ - max_project_topic_length = 15 - emails_disabled = @project.emails_disabled? -.project-home-panel.js-show-on-project-root{ class: [("empty-project" if empty_repo)] } +.project-home-panel.js-show-on-project-root.gl-my-5{ class: [("empty-project" if empty_repo)] } .row.gl-mb-3 .home-panel-title-row.col-md-12.col-lg-6.d-flex - .avatar-container.rect-avatar.s64.home-panel-avatar.gl-mr-3.float-none + .avatar-container.rect-avatar.s64.home-panel-avatar.gl-flex-shrink-0.gl-w-11.gl-h-11.gl-mr-3.float-none = project_icon(@project, alt: @project.name, class: 'avatar avatar-tile s64', width: 64, height: 64) .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{ data: { qa_selector: 'project_name_content' } } + %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' } } = @project.name %span.visibility-icon.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.d-flex.flex-wrap.text-secondary + .home-panel-metadata.d-flex.flex-wrap.text-secondary.gl-font-base.gl-font-weight-normal.gl-line-height-normal - if can?(current_user, :read_project, @project) %span.text-secondary = s_('ProjectPage|Project ID: %{project_id}') % { project_id: @project.id } @@ -23,8 +23,8 @@ %span.access-request-links.gl-ml-3 = render 'shared/members/access_request_links', source: @project - if @project.tag_list.present? - %span.home-panel-topic-list.mt-2.w-100.d-inline-flex - = sprite_icon('tag', css_class: 'icon gl-mr-2') + %span.home-panel-topic-list.mt-2.w-100.d-inline-flex.gl-font-base.gl-font-weight-normal + = sprite_icon('tag', css_class: 'icon gl-relative gl-mr-2') - @project.topics_to_show.each do |topic| - project_topics_classes = "badge badge-pill badge-secondary gl-mr-2" diff --git a/app/views/projects/_import_project_pane.html.haml b/app/views/projects/_import_project_pane.html.haml index fe3354aefbb..8b94133fd8a 100644 --- a/app/views/projects/_import_project_pane.html.haml +++ b/app/views/projects/_import_project_pane.html.haml @@ -4,7 +4,7 @@ .project-import .form-group.import-btn-container.clearfix %h5 - Import project from + = _("Import project from") .import-buttons - if gitlab_project_import_enabled? .import_gitlab_project.has-tooltip{ data: { container: 'body' } } @@ -15,19 +15,22 @@ - if github_import_enabled? %div = link_to new_import_github_path, class: 'btn js-import-github', **tracking_attrs(track_label, 'click_button', 'github') do - = icon('github', text: 'GitHub') + = sprite_icon('github') + GitHub - if bitbucket_import_enabled? %div = link_to status_import_bitbucket_path, class: "btn import_bitbucket #{'how_to_import_link' unless bitbucket_import_configured?}", **tracking_attrs(track_label, 'click_button', 'bitbucket_cloud') do - = icon('bitbucket', text: 'Bitbucket Cloud') + = sprite_icon('bitbucket') + Bitbucket Cloud - unless bitbucket_import_configured? = render 'projects/bitbucket_import_modal' - if bitbucket_server_import_enabled? %div = link_to status_import_bitbucket_server_path, class: "btn import_bitbucket", **tracking_attrs(track_label, 'click_button', 'bitbucket_server') do - = icon('bitbucket-square', text: 'Bitbucket Server') + = sprite_icon('bitbucket') + Bitbucket Server %div - if gitlab_import_enabled? %div @@ -41,7 +44,8 @@ - if google_code_import_enabled? %div = link_to new_import_google_code_path, class: 'btn import_google_code', **tracking_attrs(track_label, 'click_button', 'google_code') do - = icon('google', text: 'Google Code') + = sprite_icon('google') + Google Code - if fogbugz_import_enabled? %div @@ -64,7 +68,8 @@ - if manifest_import_enabled? %div = link_to new_import_manifest_path, class: 'btn import_manifest', **tracking_attrs(track_label, 'click_button', 'manifest_file') do - = icon('file-text-o', text: 'Manifest file') + = sprite_icon('doc-text') + Manifest file - if phabricator_import_enabled? %div diff --git a/app/views/projects/_project_templates.html.haml b/app/views/projects/_project_templates.html.haml index 98fdb1d7a0b..79221c59ae4 100644 --- a/app/views/projects/_project_templates.html.haml +++ b/app/views/projects/_project_templates.html.haml @@ -1,7 +1,21 @@ - f ||= local_assigns[:f] -.project-templates-buttons.import-buttons.col-sm-12 - = render 'projects/project_templates/built_in_templates' +.project-templates-buttons.col-sm-12 + %ul.nav-tabs.nav-links.nav.scrolling-tabs + %li.built-in-tab + %a.nav-link.active{ href: "#built-in", data: { toggle: 'tab'} } + = _('Built-in') + %span.badge.badge-pill= Gitlab::ProjectTemplate.all.count + %li.sample-data-templates-tab + %a.nav-link{ href: "#sample-data-templates", data: { toggle: 'tab'} } + = _('Sample Data') + %span.badge.badge-pill= Gitlab::SampleDataTemplate.all.count + +.tab-content + .project-templates-buttons.import-buttons.tab-pane.active#built-in + = render partial: 'projects/project_templates/template', collection: Gitlab::ProjectTemplate.all + .project-templates-buttons.import-buttons.tab-pane#sample-data-templates + = render partial: 'projects/project_templates/template', collection: Gitlab::SampleDataTemplate.all .project-fields-form = render 'projects/project_templates/project_fields_form' diff --git a/app/views/projects/_stat_anchor_list.html.haml b/app/views/projects/_stat_anchor_list.html.haml index 8e3d759b683..516790fb6d9 100644 --- a/app/views/projects/_stat_anchor_list.html.haml +++ b/app/views/projects/_stat_anchor_list.html.haml @@ -1,8 +1,9 @@ - anchors = local_assigns.fetch(:anchors, []) +- project_buttons = local_assigns.fetch(:project_buttons, false) - return unless anchors.any? %ul.nav - anchors.each do |anchor| %li.nav-item = link_to_if anchor.link, anchor.label, anchor.link, class: anchor.is_link ? 'nav-link stat-link d-flex align-items-center' : "nav-link btn btn-#{anchor.class_modifier || 'missing'} d-flex align-items-center" do - .stat-text.d-flex.align-items-center= anchor.label + .stat-text.d-flex.align-items-center{ class: ('btn btn-default disabled' if project_buttons) }= anchor.label diff --git a/app/views/projects/_visibility_modal.html.haml b/app/views/projects/_visibility_modal.html.haml index 144f726572b..314211057f9 100644 --- a/app/views/projects/_visibility_modal.html.haml +++ b/app/views/projects/_visibility_modal.html.haml @@ -23,7 +23,7 @@ = ("To confirm, type %{phrase_code}").html_safe % { phrase_code: '%{phrase_name}'.html_safe % { phrase_name: @project.full_path } } .form-group = text_field_tag 'confirm_path_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input' - .form-actions.gl-display-flex.gl-justify-content-end + .form-actions %button.btn.btn-default.gl-mr-4{ type: "button", "data-dismiss": "modal" } = _('Cancel') = submit_tag _('Reduce project visibility'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button", disabled: true diff --git a/app/views/projects/artifacts/_artifact.html.haml b/app/views/projects/artifacts/_artifact.html.haml index 36e149556e0..30f30fe922f 100644 --- a/app/views/projects/artifacts/_artifact.html.haml +++ b/app/views/projects/artifacts/_artifact.html.haml @@ -10,7 +10,7 @@ %span.build-link ##{artifact.job_id} - if artifact.job.ref - .icon-container{ "aria-label" => artifact.job.tag? ? _('Tag') : _('Branch') } + .icon-container.gl-display-inline-block{ "aria-label" => artifact.job.tag? ? _('Tag') : _('Branch') } = artifact.job.tag? ? sprite_icon('tag', css_class: 'sprite') : sprite_icon('branch', css_class: 'sprite') = link_to artifact.job.ref, project_ref_path(@project, artifact.job.ref), class: 'ref-name' - else @@ -30,7 +30,7 @@ .table-mobile-header{ role: 'rowheader' }= _('Creation date') .table-mobile-content %p.finished-at - = icon("calendar") + = sprite_icon("calendar") %span= time_ago_with_tooltip(artifact.created_at) .table-section.section-20 @@ -38,7 +38,7 @@ .table-mobile-content - if artifact.expire_at %p.finished-at - = icon("calendar") + = sprite_icon("calendar") %span= time_ago_with_tooltip(artifact.expire_at) .table-section.section-10 @@ -57,5 +57,5 @@ = sprite_icon('folder-open') - if can?(current_user, :destroy_artifacts, @project) - = link_to project_artifact_path(@project, artifact), data: { placement: 'top', container: 'body', confirm: _('Are you sure you want to delete these artifacts?') }, method: :delete, title: _('Delete artifacts'), ref: 'tooltip', aria: { label: _('Delete artifacts') }, class: 'btn btn-remove has-tooltip' do + = link_to project_artifact_path(@project, artifact), data: { placement: 'top', container: 'body', confirm: _('Are you sure you want to delete these artifacts?') }, method: :delete, title: _('Delete artifacts'), ref: 'tooltip', aria: { label: _('Delete artifacts') }, class: 'gl-button btn btn-danger has-tooltip' do = sprite_icon('remove') diff --git a/app/views/projects/blob/_content.html.haml b/app/views/projects/blob/_content.html.haml index 11946f22811..5b77e31eb00 100644 --- a/app/views/projects/blob/_content.html.haml +++ b/app/views/projects/blob/_content.html.haml @@ -2,9 +2,9 @@ - rich_viewer = blob.rich_viewer - rich_viewer_active = rich_viewer && params[:viewer] != 'simple' - blob_data = defined?(@blob) ? @blob.data : {} -- filename = defined?(@blob) ? @blob.name : '' +- is_ci_config_file = defined?(@blob) && defined?(@project) ? editing_ci_config?.to_s : 'false' -#js-blob-toggle-graph-preview{ data: { blob_data: blob_data, filename: filename } } +#js-blob-toggle-graph-preview{ data: { blob_data: blob_data, is_ci_config_file: is_ci_config_file } } = render 'projects/blob/viewer', viewer: simple_viewer, hidden: rich_viewer_active diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index cea65bf9b4e..b0317d84cdc 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -20,8 +20,7 @@ required: true, class: 'form-control new-file-name js-file-path-name-input', value: params[:file_name] || (should_suggest_gitlab_ci_yml? ? '.gitlab-ci.yml' : '') = render 'template_selectors' - if should_suggest_gitlab_ci_yml? - .js-suggest-gitlab-ci-yml{ data: { toggle: 'popover', - target: '#gitlab-ci-yml-selector', + .js-suggest-gitlab-ci-yml{ data: { target: '#gitlab-ci-yml-selector', track_label: 'suggest_gitlab_ci_yml', merge_request_path: params[:mr_path], dismiss_key: @project.id, @@ -30,7 +29,7 @@ .file-buttons - if is_markdown = render 'shared/blob/markdown_buttons', show_fullscreen_button: false - = button_tag class: 'soft-wrap-toggle btn', type: 'button', tabindex: '-1' do + = button_tag class: 'soft-wrap-toggle btn gl-button', type: 'button', tabindex: '-1' do %span.no-wrap = custom_icon('icon_no_wrap') No wrap diff --git a/app/views/projects/blob/_header.html.haml b/app/views/projects/blob/_header.html.haml index 2a1545e7db7..55ae9cded1c 100644 --- a/app/views/projects/blob/_header.html.haml +++ b/app/views/projects/blob/_header.html.haml @@ -4,8 +4,11 @@ .file-actions< = render 'projects/blob/viewer_switcher', blob: blob unless blame - = edit_blob_button(@project, @ref, @path, blob: blob) - = ide_edit_button(@project, @ref, @path, blob: blob) + - if Feature.enabled?(:consolidated_edit_button) + = render 'shared/web_ide_button', blob: blob + - else + = edit_blob_button(@project, @ref, @path, blob: blob) + = ide_edit_button(@project, @ref, @path, blob: blob) .btn-group.ml-2{ role: "group" }> = render_if_exists 'projects/blob/header_file_locks_link' - if current_user diff --git a/app/views/projects/blob/_new_dir.html.haml b/app/views/projects/blob/_new_dir.html.haml index e9010dc63fc..ca60827863a 100644 --- a/app/views/projects/blob/_new_dir.html.haml +++ b/app/views/projects/blob/_new_dir.html.haml @@ -15,7 +15,7 @@ = render 'shared/new_commit_form', placeholder: _("Add new directory") .form-actions - = submit_tag _("Create directory"), class: 'btn btn-success' - = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal" + = submit_tag _("Create directory"), class: 'btn gl-button btn-success' + = link_to "Cancel", '#', class: "btn gl-button btn-cancel", "data-dismiss" => "modal" = render 'shared/projects/edit_information' diff --git a/app/views/projects/blob/_remove.html.haml b/app/views/projects/blob/_remove.html.haml index f80bae5c88c..d3440ee41b5 100644 --- a/app/views/projects/blob/_remove.html.haml +++ b/app/views/projects/blob/_remove.html.haml @@ -12,5 +12,5 @@ .form-group.row .offset-sm-2.col-sm-10 - = button_tag 'Delete file', class: 'btn btn-remove btn-remove-file' - = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal" + = button_tag 'Delete file', class: 'btn gl-button btn-danger btn-remove-file' + = link_to "Cancel", '#', class: "btn gl-button btn-cancel", "data-dismiss" => "modal" diff --git a/app/views/projects/blob/_upload.html.haml b/app/views/projects/blob/_upload.html.haml index d2b3c8ef96b..4dbfa2b1e3c 100644 --- a/app/views/projects/blob/_upload.html.haml +++ b/app/views/projects/blob/_upload.html.haml @@ -15,14 +15,14 @@ #{ dropzone_text.html_safe } %br - .dropzone-alerts.alert.alert-danger.data{ style: "display:none" } + .dropzone-alerts.gl-alert.gl-alert-danger.gl-mb-5.data{ style: "display:none" } = render 'shared/new_commit_form', placeholder: placeholder .form-actions - = button_tag class: 'btn btn-success btn-upload-file', id: 'submit-all', type: 'button' do + = button_tag class: 'btn gl-button btn-success btn-upload-file', id: 'submit-all', type: 'button' do = icon('spin spinner', class: 'js-loading-icon hidden' ) = button_title - = link_to _("Cancel"), '#', class: "btn btn-cancel", "data-dismiss" => "modal" + = link_to _("Cancel"), '#', class: "btn gl-button btn-cancel", "data-dismiss" => "modal" = render 'shared/projects/edit_information' diff --git a/app/views/projects/blob/_viewer_switcher.html.haml b/app/views/projects/blob/_viewer_switcher.html.haml index df81e509c85..8e3cf607bbf 100644 --- a/app/views/projects/blob/_viewer_switcher.html.haml +++ b/app/views/projects/blob/_viewer_switcher.html.haml @@ -4,9 +4,9 @@ .btn-group.js-blob-viewer-switcher.ml-2{ role: "group" }> - simple_label = "Display #{simple_viewer.switcher_title}" - %button.btn.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => simple_label, title: simple_label, data: { viewer: 'simple', container: 'body' } }> + %button.btn.gl-button.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => simple_label, title: simple_label, data: { viewer: 'simple', container: 'body' } }> = sprite_icon(simple_viewer.switcher_icon) - rich_label = "Display #{rich_viewer.switcher_title}" - %button.btn.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => rich_label, title: rich_label, data: { viewer: 'rich', container: 'body' } }> + %button.btn.gl-button.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => rich_label, title: rich_label, data: { viewer: 'rich', container: 'body' } }> = sprite_icon(rich_viewer.switcher_icon) diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml index 9bb4342ffb4..54c47e7af38 100644 --- a/app/views/projects/blob/edit.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -9,9 +9,6 @@ = link_to "the file", project_blob_path(@project, tree_join(@branch_name, @file_path)), target: "_blank", rel: 'noopener noreferrer', class: 'gl-link' and make sure your changes will not unintentionally remove theirs. -- if editing_ci_config? && show_web_ide_alert? - #js-suggest-web-ide-ci{ data: { dismiss_endpoint: user_callouts_path, feature_id: UserCalloutsHelper::WEB_IDE_ALERT_DISMISSED, edit_path: ide_edit_path } } - .editor-title-row %h3.page-title.blob-edit-page-title Edit file diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml index a939f43d5e2..2a33afabb7c 100644 --- a/app/views/projects/blob/new.html.haml +++ b/app/views/projects/blob/new.html.haml @@ -13,8 +13,7 @@ = render 'projects/commit_button', ref: @ref, cancel_path: project_tree_path(@project, @id) - if should_suggest_gitlab_ci_yml? - .js-suggest-gitlab-ci-yml-commit-changes{ data: { toggle: 'popover', - target: '#commit-changes', + .js-suggest-gitlab-ci-yml-commit-changes{ data: { target: '#commit-changes', merge_request_path: params[:mr_path], track_label: 'suggest_commit_first_project_gitlab_ci_yml', dismiss_key: @project.id, diff --git a/app/views/projects/blob/viewers/_markup.html.haml b/app/views/projects/blob/viewers/_markup.html.haml index 8134adcbc32..703ffa8896e 100644 --- a/app/views/projects/blob/viewers/_markup.html.haml +++ b/app/views/projects/blob/viewers/_markup.html.haml @@ -1,4 +1,3 @@ - blob = viewer.blob -- context = blob.respond_to?(:rendered_markup) ? { rendered: blob.rendered_markup } : {} .file-content.md - = markup(blob.name, blob.data, context) + = markup(blob.name, blob.data, viewer.banzai_render_context) diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 020a4361203..30e710ead7f 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -50,13 +50,13 @@ - if can?(current_user, :push_code, @project) - if branch.name == @project.repository.root_ref - %button{ class: "btn btn-remove remove-row has-tooltip disabled", + %button{ class: "gl-button btn btn-danger remove-row has-tooltip disabled", disabled: true, title: s_('Branches|The default branch cannot be deleted') } = sprite_icon("remove") - elsif protected_branch?(@project, branch) - if can?(current_user, :push_to_delete_protected_branch, @project) - %button{ class: "btn btn-remove remove-row has-tooltip", + %button{ class: "gl-button btn btn-danger remove-row has-tooltip", title: s_('Branches|Delete protected branch'), data: { toggle: "modal", target: "#modal-delete-branch", @@ -65,13 +65,13 @@ is_merged: ("true" if merged) } } = sprite_icon("remove") - else - %button{ class: "btn btn-remove remove-row has-tooltip disabled", + %button{ class: "gl-button btn btn-danger remove-row has-tooltip disabled", disabled: true, title: s_('Branches|Only a project maintainer or owner can delete a protected branch') } = sprite_icon("remove") - else = link_to project_branch_path(@project, branch.name), - class: "btn btn-remove remove-row qa-remove-btn js-ajax-loading-spinner has-tooltip", + class: "gl-button btn btn-danger remove-row qa-remove-btn js-ajax-loading-spinner has-tooltip", title: s_('Branches|Delete branch'), method: :delete, data: { confirm: s_("Branches|Deleting the '%{branch_name}' branch cannot be undone. Are you sure?") % { branch_name: branch.name } }, diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml index ba42f43088f..f3561ed5078 100644 --- a/app/views/projects/branches/index.html.haml +++ b/app/views/projects/branches/index.html.haml @@ -34,7 +34,7 @@ - if can? current_user, :push_code, @project = link_to project_merged_branches_path(@project), - class: 'btn btn-inverted btn-remove has-tooltip qa-delete-merged-branches', + class: 'gl-button btn btn-danger btn-danger-secondary has-tooltip qa-delete-merged-branches', title: s_("Branches|Delete all branches that are merged into '%{default_branch}'") % { default_branch: @project.repository.root_ref }, method: :delete, data: { confirm: s_('Branches|Deleting the merged branches cannot be undone. Are you sure?'), diff --git a/app/views/projects/buttons/_fork.html.haml b/app/views/projects/buttons/_fork.html.haml index 2d9c7f9848f..dbe0bf35b98 100644 --- a/app/views/projects/buttons/_fork.html.haml +++ b/app/views/projects/buttons/_fork.html.haml @@ -3,14 +3,14 @@ .count-badge.d-inline-flex.align-item-stretch.gl-mr-3 - if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2 = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: s_('ProjectOverview|Go to your fork'), class: 'btn btn-default has-tooltip count-badge-button d-flex align-items-center fork-btn' do - = sprite_icon('fork', { css_class: 'icon' }) + = sprite_icon('fork', css_class: 'icon') %span= s_('ProjectOverview|Fork') - else - can_create_fork = current_user.can?(:create_fork) = link_to new_project_fork_path(@project), class: "btn btn-default btn-xs has-tooltip count-badge-button d-flex align-items-center fork-btn #{'has-tooltip disabled' unless can_create_fork}", title: (s_('ProjectOverview|You have reached your project limit') unless can_create_fork) do - = sprite_icon('fork', { css_class: 'icon' }) + = sprite_icon('fork', css_class: 'icon') %span= s_('ProjectOverview|Fork') %span.fork-count.count-badge-count.d-flex.align-items-center = link_to project_forks_path(@project), title: n_(s_('ProjectOverview|Fork'), s_('ProjectOverview|Forks'), @project.forks_count), class: 'count' do diff --git a/app/views/projects/buttons/_remove_tag.html.haml b/app/views/projects/buttons/_remove_tag.html.haml new file mode 100644 index 00000000000..ae776e93203 --- /dev/null +++ b/app/views/projects/buttons/_remove_tag.html.haml @@ -0,0 +1,6 @@ +- project = local_assigns.fetch(:project, nil) +- tag = local_assigns.fetch(:tag, nil) +- return unless project && tag + +%button{ type: "button", class: "js-remove-tag js-confirm-modal-button gl-button btn btn-danger remove-row has-tooltip gl-ml-3 #{protected_tag?(project, tag) ? 'disabled' : ''}", title: s_('TagsPage|Delete tag'), data: { container: 'body', path: project_tag_path(@project, tag.name), modal_attributes: delete_tag_modal_attributes(tag.name) } } + = sprite_icon("remove") diff --git a/app/views/projects/buttons/_star.html.haml b/app/views/projects/buttons/_star.html.haml index 3dac38d1356..690f0fe10f7 100644 --- a/app/views/projects/buttons/_star.html.haml +++ b/app/views/projects/buttons/_star.html.haml @@ -2,10 +2,10 @@ .count-badge.d-inline-flex.align-item-stretch.gl-mr-3 %button.count-badge-button.btn.btn-default.btn-xs.d-flex.align-items-center.star-btn.toggle-star{ type: "button", data: { endpoint: toggle_star_project_path(@project, :json) } } - if current_user.starred?(@project) - = sprite_icon('star', { css_class: 'icon' }) + = sprite_icon('star', css_class: 'icon') %span.starred= s_('ProjectOverview|Unstar') - else - = sprite_icon('star-o', { css_class: 'icon' }) + = sprite_icon('star-o', css_class: 'icon') %span= s_('ProjectOverview|Star') %span.star-count.count-badge-count.d-flex.align-items-center = link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'count' do @@ -14,7 +14,7 @@ - else .count-badge.d-inline-flex.align-item-stretch.gl-mr-3 = link_to new_user_session_path, class: 'btn btn-default btn-xs has-tooltip count-badge-button d-flex align-items-center star-btn', title: s_('ProjectOverview|You must sign in to star a project') do - = sprite_icon('star-o', { css_class: 'icon' }) + = sprite_icon('star-o', css_class: 'icon') %span= s_('ProjectOverview|Star') %span.star-count.count-badge-count.d-flex.align-items-center = link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'count' do diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index c7ab01a4ef7..138f5569218 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -21,8 +21,8 @@ - if ref - if job.ref - .icon-container - = job.tag? ? icon('tag') : sprite_icon('fork', css_class: 'sprite') + .icon-container.gl-display-inline-block + = job.tag? ? sprite_icon('label', css_class: 'sprite') : sprite_icon('fork', css_class: 'sprite') = link_to job.ref, project_ref_path(job.project, job.ref), class: "ref-name" - else .light= _('none') @@ -33,10 +33,12 @@ = link_to job.short_sha, project_commit_path(job.project, job.sha), class: "commit-sha mr-0" - if job.stuck? - = icon('warning', class: 'text-warning has-tooltip', title: _('Job is stuck. Check runners.')) + %span.has-tooltip{ title: _('Job is stuck. Check runners.') } + = sprite_icon('warning', css_class: 'text-warning!') - if retried - = icon('refresh', class: 'text-warning has-tooltip', title: _('Job was retried')) + %span.has-tooltip{ title: _('Job was retried') } + = sprite_icon('retry', css_class: 'text-warning') .label-container - if job.tags.any? @@ -87,7 +89,7 @@ - if job.finished_at %p.finished-at - = icon("calendar") + = sprite_icon("calendar") %span= time_ago_with_tooltip(job.finished_at) %td.coverage @@ -101,11 +103,11 @@ = sprite_icon('download') - if can?(current_user, :update_build, job) - if job.active? - = link_to cancel_project_job_path(job.project, job, continue: { to: request.fullpath }), method: :post, title: _('Cancel'), class: 'btn btn-build' do + = link_to cancel_project_job_path(job.project, job, continue: { to: request.fullpath }), method: :post, title: _('Cancel'), class: 'btn gl-button btn-build' do = sprite_icon('close') - elsif job.scheduled? .btn-group - .btn.btn-default{ disabled: true } + .btn.gl-button.btn-default{ disabled: true } = sprite_icon('planning') %time.js-remaining-time{ datetime: job.scheduled_at.utc.iso8601 } = duration_in_numbers(job.execute_in) @@ -113,17 +115,17 @@ = link_to play_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: s_('DelayedJobs|Start now'), - class: 'btn btn-default btn-build has-tooltip', + class: 'btn gl-button btn-default btn-build has-tooltip', data: { confirm: confirmation_message } do = sprite_icon('play') = link_to unschedule_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: s_('DelayedJobs|Unschedule'), - class: 'btn btn-default btn-build has-tooltip' do + class: 'btn gl-button btn-default btn-build has-tooltip' do = sprite_icon('time-out') - elsif allow_retry - if job.playable? && !admin && can?(current_user, :update_build, job) - = link_to play_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: _('Play'), class: 'btn btn-build' do + = link_to play_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: _('Play'), class: 'btn gl-button btn-build' do = custom_icon('icon_play') - elsif job.retryable? = link_to retry_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: _('Retry'), class: 'btn btn-build gl-button btn-icon btn-default' do diff --git a/app/views/projects/ci/lints/show.html.haml b/app/views/projects/ci/lints/show.html.haml index 2e79852f4c9..64f250bd607 100644 --- a/app/views/projects/ci/lints/show.html.haml +++ b/app/views/projects/ci/lints/show.html.haml @@ -1,13 +1,10 @@ - page_title _("CI Lint") - page_description _("Validate your GitLab CI configuration file") -- unless Feature.enabled?(:monaco_ci) - - content_for :library_javascripts do - = page_specific_javascript_tag('lib/ace.js') %h2.pt-3.pb-3= _("Validate your GitLab CI configuration") - if Feature.enabled?(:ci_lint_vue, @project) - #js-ci-lint{ data: { endpoint: project_ci_lint_path(@project) } } + #js-ci-lint{ data: { endpoint: project_ci_lint_path(@project), help_page_path: help_page_path('ci/lint', anchor: 'pipeline-simulation') } } - else .project-ci-linter @@ -17,12 +14,9 @@ .file-holder .js-file-title.file-title.clearfix = _("Contents of .gitlab-ci.yml") - - if Feature.enabled?(:monaco_ci) - .file-editor.code - .js-edit-mode-pane.qa-editor#editor{ data: { 'editor-loading': true } }< - %pre.editor-loading-content= params[:content] - - else - #ci-editor.ci-editor= @content + .file-editor.code + .js-edit-mode-pane.qa-editor#editor{ data: { 'editor-loading': true } }< + %pre.editor-loading-content= params[:content] = text_area_tag(:content, @content, class: 'hidden form-control span1', rows: 7, require: true) .col-sm-12 .float-left.gl-mt-3 diff --git a/app/views/projects/cleanup/_show.html.haml b/app/views/projects/cleanup/_show.html.haml index 019894ddbb4..02d35e690ca 100644 --- a/app/views/projects/cleanup/_show.html.haml +++ b/app/views/projects/cleanup/_show.html.haml @@ -26,5 +26,4 @@ .form-text.text-muted = _("The maximum file size allowed is %{size}.") % { size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes) } - .gl-display-flex.gl-justify-content-end - = f.submit _('Start cleanup'), class: 'btn btn-success' + = f.submit _('Start cleanup'), class: 'btn btn-success' diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 29ee4a69e83..86c80f1a8ae 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -1,6 +1,6 @@ - can_collaborate = can_collaborate_with_project?(@project) -.page-content-header.js-commit-box{ 'data-commit-path' => branches_project_commit_path(@project, @commit.id) } +.page-content-header .header-main-content = render partial: 'signature', object: @commit.signature %strong @@ -22,17 +22,17 @@ .header-action-buttons - if defined?(@notes_count) && @notes_count > 0 - %span.btn.disabled.btn-grouped.d-none.d-sm-block.gl-mr-3.has-tooltip{ title: n_("%d comment on this commit", "%d comments on this commit", @notes_count) % @notes_count } + %span.btn.disabled.gl-button.btn-icon.d-none.d-sm-inline.gl-mr-3.has-tooltip{ title: n_("%d comment on this commit", "%d comments on this commit", @notes_count) % @notes_count } = sprite_icon('comment') = @notes_count - = link_to project_tree_path(@project, @commit), class: "btn btn-default gl-mr-3 d-none d-sm-none d-md-inline" do + = link_to project_tree_path(@project, @commit), class: "btn gl-button gl-mr-3 d-none d-md-inline" do #{ _('Browse files') } .dropdown.inline - %a.btn.btn-default.dropdown-toggle.qa-options-button.d-md-inline{ data: { toggle: "dropdown" } } + %a.btn.gl-button.dropdown-toggle.qa-options-button.d-md-inline{ data: { toggle: "dropdown" } } %span= _('Options') = icon('caret-down') %ul.dropdown-menu.dropdown-menu-right - %li.d-block.d-sm-none.d-md-none + %li.d-block.d-sm-none = link_to project_tree_path(@project, @commit) do #{ _('Browse Files') } - if can_collaborate && !@commit.has_been_reverted?(current_user) @@ -58,7 +58,7 @@ %pre.commit-description< = preserve(markdown_field(@commit, :description)) -.info-well +.info-well.js-commit-box-info{ 'data-commit-path' => branches_project_commit_path(@project, @commit.id) } .well-segment.branch-info .icon-container.commit-icon = custom_icon("icon_commit") diff --git a/app/views/projects/commit/pipelines.html.haml b/app/views/projects/commit/pipelines.html.haml index f8c27f4c026..0dbd6e53212 100644 --- a/app/views/projects/commit/pipelines.html.haml +++ b/app/views/projects/commit/pipelines.html.haml @@ -1,4 +1,5 @@ - page_title _('Pipelines'), "#{@commit.title} (#{@commit.short_id})", _('Commits') +- add_page_specific_style 'page_bundles/pipelines' = render 'commit_box' = render 'ci_menu' diff --git a/app/views/projects/commit/show.html.haml b/app/views/projects/commit/show.html.haml index 40b96ca477e..003a27f4c9a 100644 --- a/app/views/projects/commit/show.html.haml +++ b/app/views/projects/commit/show.html.haml @@ -7,6 +7,7 @@ - @content_class = limited_container_width - page_title "#{@commit.title} (#{@commit.short_id})", _('Commits') - page_description @commit.description +- add_page_specific_style 'page_bundles/pipelines' .container-fluid{ class: [limited_container_width, container_class] } = render "commit_box" diff --git a/app/views/projects/commits/_commits.html.haml b/app/views/projects/commits/_commits.html.haml index 293500a6c31..63cc96c2c05 100644 --- a/app/views/projects/commits/_commits.html.haml +++ b/app/views/projects/commits/_commits.html.haml @@ -28,7 +28,8 @@ = render partial: 'projects/commits/commit', collection: context_commits, locals: { project: project, ref: ref, merge_request: merge_request } - if hidden > 0 - %li.alert.alert-warning + %li.gl-alert.gl-alert-warning + = sprite_icon('warning', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') = 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 project.context_commits_enabled? && can_update_merge_request && context_commits&.empty? diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index 28b5dc0cc67..40dd3a685d4 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -17,16 +17,16 @@ .tree-controls - 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' + = link_to _("View open merge request"), project_merge_request_path(@project, @merge_request), class: 'btn gl-button' - elsif create_mr_button?(@repository.root_ref, @ref) .control.d-none.d-md-block - = link_to _("Create merge request"), create_mr_path(@repository.root_ref, @ref), class: 'btn btn-success' + = link_to _("Create merge request"), create_mr_path(@repository.root_ref, @ref), class: 'btn gl-button btn-success' .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 = search_field_tag :search, params[:search], { placeholder: _('Search by message'), id: 'commits-search', class: 'form-control search-text-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, @ref, rss_url_options), title: _("Commits feed"), class: 'btn btn-svg' do + = link_to project_commits_path(@project, @ref, rss_url_options), title: _("Commits feed"), class: 'btn gl-button btn-svg' do = sprite_icon('rss', css_class: 'qa-rss-icon') = render_if_exists 'projects/commits/mirror_status' diff --git a/app/views/projects/compare/_form.html.haml b/app/views/projects/compare/_form.html.haml index 768acac96c0..a257f2e9433 100644 --- a/app/views/projects/compare/_form.html.haml +++ b/app/views/projects/compare/_form.html.haml @@ -1,14 +1,14 @@ = form_tag project_compare_index_path(@project), method: :post, class: 'form-inline js-requires-input js-signature-container', data: { 'signatures-path' => signatures_namespace_project_compare_index_path } do - if params[:to] && params[:from] .compare-switch-container - = link_to sprite_icon('substitute'), { from: params[:to], to: params[:from] }, class: 'commits-compare-switch has-tooltip btn btn-white', title: 'Swap revisions' + = link_to sprite_icon('substitute'), { from: params[:to], to: params[:from] }, class: 'commits-compare-switch has-tooltip btn gl-button btn-white', title: 'Swap revisions' .form-group.dropdown.compare-form-group.to.js-compare-to-dropdown .input-group.inline-input-group %span.input-group-prepend .input-group-text = s_("CompareBranches|Source") = hidden_field_tag :to, params[:to] - = button_tag type: 'button', title: params[:to], class: "btn form-control compare-dropdown-toggle js-compare-dropdown has-tooltip", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-to-dropdown", selected: params[:to], field_name: :to } do + = button_tag type: 'button', title: params[:to], class: "btn gl-button form-control compare-dropdown-toggle js-compare-dropdown has-tooltip", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-to-dropdown", selected: params[:to], field_name: :to } do .dropdown-toggle-text.str-truncated.monospace.float-left= params[:to] || _("Select branch/tag") = sprite_icon('chevron-down', css_class: 'float-right') = render 'shared/ref_dropdown' @@ -19,12 +19,12 @@ .input-group-text = s_("CompareBranches|Target") = hidden_field_tag :from, params[:from] - = button_tag type: 'button', title: params[:from], class: "btn form-control compare-dropdown-toggle js-compare-dropdown has-tooltip", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-from-dropdown", selected: params[:from], field_name: :from } do + = button_tag type: 'button', title: params[:from], class: "btn gl-button form-control compare-dropdown-toggle js-compare-dropdown has-tooltip", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-from-dropdown", selected: params[:from], field_name: :from } do .dropdown-toggle-text.str-truncated.monospace.float-left= params[:from] || _("Select branch/tag") = sprite_icon('chevron-down', css_class: 'float-right') = render 'shared/ref_dropdown'   - = button_tag s_("CompareBranches|Compare"), class: "btn btn-success commits-compare-btn" + = button_tag s_("CompareBranches|Compare"), class: "btn gl-button btn-success commits-compare-btn" - if @merge_request.present? = link_to _("View open merge request"), project_merge_request_path(@project, @merge_request), class: 'gl-ml-3 btn' - elsif create_mr_button? diff --git a/app/views/projects/confluences/show.html.haml b/app/views/projects/confluences/show.html.haml index b87780db4cd..5814b7a00f5 100644 --- a/app/views/projects/confluences/show.html.haml +++ b/app/views/projects/confluences/show.html.haml @@ -1,5 +1,6 @@ - breadcrumb_title _('Confluence') - page_title _('Confluence') +- add_page_specific_style 'page_bundles/wiki' = render layout: 'shared/empty_states/wikis_layout', locals: { image_path: 'illustrations/wiki_login_empty.svg' } do %h4 = s_('WikiEmpty|Confluence is enabled') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index d7e10efc3b1..d99579c25c0 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -1,4 +1,5 @@ - page_title _("Value Stream Analytics") +- add_page_specific_style 'page_bundles/cycle_analytics' #cycle-analytics{ "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) } } - if @cycle_analytics_no_data diff --git a/app/views/projects/default_branch/_show.html.haml b/app/views/projects/default_branch/_show.html.haml index 46ee60949db..2ba12601c79 100644 --- a/app/views/projects/default_branch/_show.html.haml +++ b/app/views/projects/default_branch/_show.html.haml @@ -28,5 +28,4 @@ = _("Issues referenced by merge requests and commits within the default branch will be closed automatically") = link_to sprite_icon('question-o'), help_page_path('user/project/issues/managing_issues.md', anchor: 'disabling-automatic-issue-closing'), target: '_blank' - .gl-display-flex.gl-justify-content-end - = f.submit _('Save changes'), class: "btn btn-success" + = f.submit _('Save changes'), class: "btn btn-success" diff --git a/app/views/projects/deployments/_actions.haml b/app/views/projects/deployments/_actions.haml index 5127d8b77d5..7f4b99f1a3f 100644 --- a/app/views/projects/deployments/_actions.haml +++ b/app/views/projects/deployments/_actions.haml @@ -3,7 +3,7 @@ - if actions.present? .btn-group .dropdown - %button.dropdown.dropdown-new.btn.btn-default.has-tooltip{ type: 'button', 'data-toggle' => 'dropdown', title: s_('Environments|Deploy to...') } + %button.dropdown.dropdown-new.btn.gl-button.btn-default.has-tooltip{ type: 'button', 'data-toggle' => 'dropdown', title: s_('Environments|Deploy to...') } = sprite_icon('play') = icon('caret-down') %ul.dropdown-menu.dropdown-menu-right diff --git a/app/views/projects/deployments/_commit.html.haml b/app/views/projects/deployments/_commit.html.haml index 743aa60b3ba..52e3e0fd997 100644 --- a/app/views/projects/deployments/_commit.html.haml +++ b/app/views/projects/deployments/_commit.html.haml @@ -1,7 +1,7 @@ .table-mobile-content .branch-commit.cgray - if deployment.ref - %span.icon-container + %span.icon-container.gl-display-inline-block = deployment.tag? ? icon('tag') : sprite_icon('fork', css_class: 'sprite') = link_to deployment.ref, project_ref_path(@project, deployment.ref), class: "ref-name" .icon-container.commit-icon diff --git a/app/views/projects/deployments/_confirm_rollback_modal.html.haml b/app/views/projects/deployments/_confirm_rollback_modal.html.haml index 3735ead1559..23729d6ebf9 100644 --- a/app/views/projects/deployments/_confirm_rollback_modal.html.haml +++ b/app/views/projects/deployments/_confirm_rollback_modal.html.haml @@ -15,8 +15,8 @@ %p = s_('Environments|This action will run the job defined by %{environment_name} for commit %{commit_id}, putting the environment in a previous version. You can revert it by re-deploying the latest version of your application. Are you sure you want to continue?').html_safe % {commit_id: commit_sha, environment_name: @environment.name} .modal-footer - = button_tag _('Cancel'), type: 'button', class: 'btn btn-cancel', data: { dismiss: 'modal' } - = link_to [:retry, @project, deployment.deployable], method: :post, class: 'btn btn-danger' do + = button_tag _('Cancel'), type: 'button', class: 'btn gl-button btn-danger', data: { dismiss: 'modal' } + = link_to [:retry, @project, deployment.deployable], method: :post, class: 'btn gl-button btn-danger' do - if deployment.last? = s_('Environments|Re-deploy') - else diff --git a/app/views/projects/deployments/_rollback.haml b/app/views/projects/deployments/_rollback.haml index dffa5e4ba40..c5e884473ff 100644 --- a/app/views/projects/deployments/_rollback.haml +++ b/app/views/projects/deployments/_rollback.haml @@ -1,6 +1,6 @@ - if deployment.deployable && can?(current_user, :create_deployment, deployment) - tooltip = deployment.last? ? s_('Environments|Re-deploy to environment') : s_('Environments|Rollback environment') - = button_tag class: 'btn btn-default btn-build has-tooltip', type: 'button', data: { toggle: 'modal', target: "#confirm-rollback-modal-#{deployment.id}" }, title: tooltip do + = button_tag class: 'btn gl-button btn-default btn-build has-tooltip', type: 'button', data: { toggle: 'modal', target: "#confirm-rollback-modal-#{deployment.id}" }, title: tooltip do - if deployment.last? = sprite_icon('repeat') - else diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index 6ba363e6555..43aaa7cb405 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -7,7 +7,7 @@ .content-block.oneline-block.files-changed.diff-files-changed.js-diff-files-changed .files-changed-inner - .inline-parallel-buttons.d-none.d-sm-none.d-md-block + .inline-parallel-buttons.d-none.d-md-block - if !diffs_expanded? && diff_files.any? { |diff_file| diff_file.collapsed? } = link_to _('Expand all'), url_for(safe_params.merge(expanded: 1, format: nil)), class: 'btn btn-default' - if show_whitespace_toggle diff --git a/app/views/projects/diffs/_file_header.html.haml b/app/views/projects/diffs/_file_header.html.haml index f954b09abee..e9dfda4e927 100644 --- a/app/views/projects/diffs/_file_header.html.haml +++ b/app/views/projects/diffs/_file_header.html.haml @@ -6,7 +6,7 @@ - if diff_file.submodule? - blob = diff_file.blob %span - = icon('archive fw') + = sprite_icon('archive') %strong.file-title-name = submodule_link(blob, diff_file.content_sha, diff_file.repository) diff --git a/app/views/projects/diffs/_line.html.haml b/app/views/projects/diffs/_line.html.haml index d35443cca1e..4d40071e07c 100644 --- a/app/views/projects/diffs/_line.html.haml +++ b/app/views/projects/diffs/_line.html.haml @@ -21,9 +21,6 @@ - else = add_diff_note_button(line_code, diff_file.position(line), type) %a{ href: "##{line_code}", data: { linenumber: link_text } } - - discussion = line_discussions.try(:first) - - if discussion && discussion.resolvable? && !plain - %diff-note-avatars{ "discussion-id" => discussion.id } %td.new_line.diff-line-num{ class: type, data: { linenumber: line.new_pos } } - link_text = type == "old" ? " " : line.new_pos - if plain diff --git a/app/views/projects/diffs/_parallel_view.html.haml b/app/views/projects/diffs/_parallel_view.html.haml index 9587ea4696b..ebe3aad064a 100644 --- a/app/views/projects/diffs/_parallel_view.html.haml +++ b/app/views/projects/diffs/_parallel_view.html.haml @@ -20,9 +20,6 @@ %td.old_line.diff-line-num.js-avatar-container{ class: left.type, data: { linenumber: left.old_pos } } = add_diff_note_button(left_line_code, left_position, 'old') %a{ href: "##{left_line_code}", data: { linenumber: left.old_pos } } - - discussion_left = discussions_left.try(:first) - - if discussion_left && discussion_left.resolvable? - %diff-note-avatars{ "discussion-id" => discussion_left.id } %td.line_content.parallel.left-side{ id: left_line_code, class: left.type }= diff_line_content(left.rich_text) - else %td.old_line.diff-line-num.empty-cell @@ -41,9 +38,6 @@ %td.new_line.diff-line-num.js-avatar-container{ class: right.type, data: { linenumber: right.new_pos } } = add_diff_note_button(right_line_code, right_position, 'new') %a{ href: "##{right_line_code}", data: { linenumber: right.new_pos } } - - discussion_right = discussions_right.try(:first) - - if discussion_right && discussion_right.resolvable? - %diff-note-avatars{ "discussion-id" => discussion_right.id } %td.line_content.parallel.right-side{ id: right_line_code, class: right.type }= diff_line_content(right.rich_text) - else %td.old_line.diff-line-num.empty-cell diff --git a/app/views/projects/diffs/_stats.html.haml b/app/views/projects/diffs/_stats.html.haml index b438fbbf446..cee479aab0a 100644 --- a/app/views/projects/diffs/_stats.html.haml +++ b/app/views/projects/diffs/_stats.html.haml @@ -1,5 +1,5 @@ -- sum_added_lines = diff_files.sum(&:added_lines) # rubocop: disable CodeReuse/ActiveRecord -- sum_removed_lines = diff_files.sum(&:removed_lines) # rubocop: disable CodeReuse/ActiveRecord +- sum_added_lines = diff_files.sum(&:added_lines) +- sum_removed_lines = diff_files.sum(&:removed_lines) .commit-stat-summary.dropdown Showing %button.diff-stats-summary-toggler.js-diff-stats-dropdown{ type: "button", data: { toggle: "dropdown", display: "static" } }< diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml index 641a0689c26..5a7830e306a 100644 --- a/app/views/projects/diffs/_text_file.html.haml +++ b/app/views/projects/diffs/_text_file.html.haml @@ -1,4 +1,4 @@ -- too_big = diff_file.diff_lines.count > Commit::DIFF_SAFE_LINES +- too_big = diff_file.diff_lines.count > Commit.diff_safe_lines(project: @project) - if too_big .suppressed-container %a.show-suppressed-diff.cursor-pointer.js-show-suppressed-diff= _("Changes suppressed. Click to show.") diff --git a/app/views/projects/diffs/_warning.html.haml b/app/views/projects/diffs/_warning.html.haml index 643d111fedd..30b0631b465 100644 --- a/app/views/projects/diffs/_warning.html.haml +++ b/app/views/projects/diffs/_warning.html.haml @@ -1,12 +1,15 @@ -.alert.alert-warning - %h4 +.gl-alert.gl-alert-warning.gl-mb-5 + %button.js-close.gl-alert-dismiss{ type: 'button', 'aria-label' => _('Dismiss') } + = sprite_icon('close', size: 16, css_class: 'gl-icon') + = sprite_icon('warning', size: 16, css_class: 'gl-icon gl-alert-icon') + %h4.gl-alert-title = _("Too many changes to show.") - .float-right - - if current_controller?(:commit) - = link_to _("Plain diff"), project_commit_path(@project, @commit, format: :diff), class: "btn btn-sm" - = link_to _("Email patch"), project_commit_path(@project, @commit, format: :patch), class: "btn btn-sm" - - elsif current_controller?('projects/merge_requests/diffs') && @merge_request&.persisted? - = link_to _("Plain diff"), merge_request_path(@merge_request, format: :diff), class: "btn btn-sm" - = link_to _("Email patch"), merge_request_path(@merge_request, format: :patch), class: "btn btn-sm" - %p + .gl-alert-body = html_escape(_("To preserve performance only %{strong_open}%{display_size} of %{real_size}%{strong_close} files are displayed.")) % { display_size: diff_files.size, real_size: diff_files.real_size, strong_open: ''.html_safe, strong_close: ''.html_safe } + .gl-alert-actions + - if current_controller?(:commit) + = link_to _("Plain diff"), project_commit_path(@project, @commit, format: :diff), class: "btn gl-alert-action btn-default gl-button btn-default-secondary" + = link_to _("Email patch"), project_commit_path(@project, @commit, format: :patch), class: "btn gl-alert-action btn-default gl-button btn-default-secondary" + - elsif current_controller?('projects/merge_requests/diffs') && @merge_request&.persisted? + = link_to _("Plain diff"), merge_request_path(@merge_request, format: :diff), class: "btn gl-alert-action btn-default gl-button btn-default-secondary" + = link_to _("Email patch"), merge_request_path(@merge_request, format: :patch), class: "btn gl-alert-action btn-default gl-button btn-default-secondary" diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index e5c4cfcbd72..63d571e718e 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -21,10 +21,9 @@ %input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' } %template.js-project-permissions-form-data{ type: "application/json" }= project_permissions_panel_data_json(@project) .js-project-permissions-form - .gl-display-flex.gl-justify-content-end - - if show_visibility_confirm_modal?(@project) - = render "visibility_modal" - = f.submit _('Save changes'), class: "btn btn-success #{('js-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level } + - if show_visibility_confirm_modal?(@project) + = render "visibility_modal" + = f.submit _('Save changes'), class: "btn btn-success #{('js-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level } %section.qa-merge-request-settings.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)] } .settings-header @@ -38,8 +37,7 @@ = form_for @project, remote: true, 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 - .gl-display-flex.gl-justify-content-end - = f.submit _('Save changes'), class: "btn btn-success qa-save-merge-request-changes rspec-save-merge-request-changes" + = f.submit _('Save changes'), class: "btn btn-succes qa-save-merge-request-changes rspec-save-merge-request-changes" = render_if_exists 'projects/merge_request_approvals_settings', expanded: expanded @@ -70,9 +68,8 @@ .sub-section %h4= _('Housekeeping') %p= _('Runs a number of housekeeping tasks within the current repository, such as compressing file revisions and removing unreachable objects.') - .gl-display-flex.gl-justify-content-end - = link_to _('Run housekeeping'), housekeeping_project_path(@project), - method: :post, class: "btn btn-default" + = link_to _('Run housekeeping'), housekeeping_project_path(@project), + method: :post, class: "btn btn-default" = render 'export', project: @project @@ -94,8 +91,7 @@ %li= _('You will need to update your local repositories to point to the new location.') - if @project.deployment_platform.present? %li= _('Your deployment services will be broken, you will need to manually fix the services after renaming.') - .gl-display-flex.gl-justify-content-end - = f.submit _('Change path'), class: "btn btn-warning qa-change-path-button" + = f.submit _('Change path'), class: "btn btn-warning qa-change-path-button" - if can?(current_user, :change_namespace, @project) .sub-section @@ -111,8 +107,7 @@ %li= _('You can only transfer the project to namespaces you manage.') %li= _('You will need to update your local repositories to point to the new location.') %li= _('Project visibility level will be changed to match namespace rules when transferring to a group.') - .gl-display-flex.gl-justify-content-end - = f.submit 'Transfer project', class: "btn btn-remove js-confirm-danger qa-transfer-button", data: { "confirm-danger-message" => transfer_project_message(@project) } + = f.submit 'Transfer project', class: "gl-button btn btn-danger js-confirm-danger qa-transfer-button", data: { "confirm-danger-message" => transfer_project_message(@project) } - if @project.forked? && can?(current_user, :remove_fork_project, @project) .sub-section @@ -122,7 +117,7 @@ = form_for @project, url: remove_fork_project_path(@project), method: :delete, remote: true, html: { class: 'transfer-project' } do |f| %p %strong= _('Once removed, the fork relationship cannot be restored and you will no longer be able to send merge requests to the source.') - = button_to _('Remove fork relationship'), '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_fork_project_warning_message(@project) } + = button_to _('Remove fork relationship'), '#', class: "gl-button btn btn-danger js-confirm-danger", data: { "confirm-danger-message" => remove_fork_project_warning_message(@project) } = render 'remove', project: @project diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index c9edc3c12ec..c6d39f5bba0 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -1,5 +1,5 @@ - @content_class = "limit-container-width" unless fluid_layout -- default_branch_name = Gitlab::CurrentSettings.default_branch_name.presence || "master" +- default_branch_name = @project.default_branch || "master" - breadcrumb_title _("Details") - page_title _("Details") @@ -11,19 +11,19 @@ = _('The repository for this project is empty') - if @project.can_current_user_push_code? - %p.gl-mb-0 + %p = _('You can get started by cloning the repository or start adding files to it with one of the following options.') .project-buttons.qa-quick-actions .project-clone-holder.d-block.d-md-none.mt-2.mr-2 = render "shared/mobile_clone_panel" - .project-clone-holder.d-none.d-md-inline-block.mt-2.mr-2.float-left + .project-clone-holder.d-none.d-md-inline-block.mb-2.mr-2.float-left = render "projects/buttons/clone" - = render 'stat_anchor_list', anchors: @project.empty_repo_statistics_buttons + = render 'stat_anchor_list', anchors: @project.empty_repo_statistics_buttons, project_buttons: true - if can?(current_user, :push_code, @project) - .empty-wrapper.gl-mt-7 + .empty-wrapper.gl-mt-4 %h3#repo-command-line-instructions.page-title-empty = _('Command line instructions') %p diff --git a/app/views/projects/environments/edit.html.haml b/app/views/projects/environments/edit.html.haml index 56af252d785..c4e2c1eb63d 100644 --- a/app/views/projects/environments/edit.html.haml +++ b/app/views/projects/environments/edit.html.haml @@ -1,4 +1,5 @@ - page_title _("Edit"), @environment.name, _("Environments") +- add_page_specific_style 'page_bundles/environments' %h3.page-title = _('Edit environment') diff --git a/app/views/projects/environments/folder.html.haml b/app/views/projects/environments/folder.html.haml index 554cb4323f7..2b4d19a0e1d 100644 --- a/app/views/projects/environments/folder.html.haml +++ b/app/views/projects/environments/folder.html.haml @@ -1,5 +1,6 @@ - add_to_breadcrumbs _("Environments"), project_environments_path(@project) - breadcrumb_title _("Folder/%{name}") % { name: @folder } - page_title _("Environments in %{name}") % { name: @folder } +- add_page_specific_style 'page_bundles/environments' #environments-folder-list-view{ data: { environments_data: environments_folder_list_view_data, project_path: @project.full_path } } diff --git a/app/views/projects/environments/index.html.haml b/app/views/projects/environments/index.html.haml index 9abc1a5a925..067c987e721 100644 --- a/app/views/projects/environments/index.html.haml +++ b/app/views/projects/environments/index.html.haml @@ -1,4 +1,5 @@ - page_title _("Environments") +- add_page_specific_style 'page_bundles/environments' #environments-list-view{ data: { environments_data: environments_list_data, "can-read-environment" => can?(current_user, :read_environment, @project).to_s, diff --git a/app/views/projects/environments/new.html.haml b/app/views/projects/environments/new.html.haml index 96edd3f0bd7..6b0ccc1dcc7 100644 --- a/app/views/projects/environments/new.html.haml +++ b/app/views/projects/environments/new.html.haml @@ -1,5 +1,6 @@ - breadcrumb_title _("Environments") - page_title _("New Environment") +- add_page_specific_style 'page_bundles/environments' %h3.page-title = _("New environment") diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml index 929015023d2..5b1556c9f52 100644 --- a/app/views/projects/environments/show.html.haml +++ b/app/views/projects/environments/show.html.haml @@ -1,9 +1,8 @@ - add_to_breadcrumbs _("Environments"), project_environments_path(@project) - breadcrumb_title @environment.name - page_title _("Environments") - -- content_for :page_specific_javascripts do - = stylesheet_link_tag 'page_bundles/xterm' +- add_page_specific_style 'page_bundles/xterm' +- add_page_specific_style 'page_bundles/environments' #environments-detail-view{ data: { name: @environment.name, id: @environment.id, delete_path: environment_delete_path(@environment)} } - if @environment.available? && can?(current_user, :stop_environment, @environment) @@ -67,7 +66,7 @@ %p.blank-state-text = html_escape(_("Define environments in the deploy stage(s) in %{code_open}.gitlab-ci.yml%{code_close} to track deployments here.")) % { code_open: ''.html_safe, code_close: ''.html_safe } .text-center - = link_to _("Read more"), help_page_path("ci/environments"), class: "btn btn-success" + = link_to _("Read more"), help_page_path("ci/environments/index.md"), class: "btn btn-success" - else .table-holder.gl-overflow-visible .ci-table.environments{ role: 'grid' } diff --git a/app/views/projects/environments/terminal.html.haml b/app/views/projects/environments/terminal.html.haml index 3a705d736f3..ed0bc0680d7 100644 --- a/app/views/projects/environments/terminal.html.haml +++ b/app/views/projects/environments/terminal.html.haml @@ -1,5 +1,5 @@ - page_title _("Terminal for environment"), @environment.name - +- add_page_specific_style 'page_bundles/terminal' - content_for :page_specific_javascripts do = stylesheet_link_tag "xterm.css" @@ -18,4 +18,4 @@ = render 'projects/deployments/actions', deployment: @environment.last_deployment .terminal-container{ class: container_class } - #terminal{ data: { project_path: "#{terminal_project_environment_path(@project, @environment)}.ws" } } + #terminal.gl-mt-4{ data: { project_path: "#{terminal_project_environment_path(@project, @environment)}.ws" } } diff --git a/app/views/projects/error_tracking/details.html.haml b/app/views/projects/error_tracking/details.html.haml index 7015dcdcb05..4a14e34cbf1 100644 --- a/app/views/projects/error_tracking/details.html.haml +++ b/app/views/projects/error_tracking/details.html.haml @@ -1,4 +1,5 @@ - page_title _('Error Details') - add_to_breadcrumbs 'Errors', project_error_tracking_index_path(@project) +- add_page_specific_style 'page_bundles/error_tracking_details' #js-error_details{ data: error_details_data(@project, @issue_id) } diff --git a/app/views/projects/error_tracking/index.html.haml b/app/views/projects/error_tracking/index.html.haml index 96f61584a99..ffe0785d327 100644 --- a/app/views/projects/error_tracking/index.html.haml +++ b/app/views/projects/error_tracking/index.html.haml @@ -1,3 +1,4 @@ - page_title _('Errors') +- add_page_specific_style 'page_bundles/error_tracking_index' #js-error_tracking{ data: error_tracking_data(@current_user, @project) } diff --git a/app/views/projects/feature_flags/_errors.html.haml b/app/views/projects/feature_flags/_errors.html.haml deleted file mode 100644 index a32245640be..00000000000 --- a/app/views/projects/feature_flags/_errors.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -#error_explanation - .alert.alert-danger - - @feature_flag.errors.full_messages.each do |message| - %p= message diff --git a/app/views/projects/feature_flags/edit.html.haml b/app/views/projects/feature_flags/edit.html.haml index 4de41ca4080..028595aba0b 100644 --- a/app/views/projects/feature_flags/edit.html.haml +++ b/app/views/projects/feature_flags/edit.html.haml @@ -1,4 +1,4 @@ -- @gfm_form = Feature.enabled?(:feature_flags_issue_links, @project, default_enabled: true) +- @gfm_form = true - add_to_breadcrumbs s_('FeatureFlags|Feature Flags'), project_feature_flags_path(@project) - breadcrumb_title @feature_flag.name @@ -9,7 +9,7 @@ feature_flags_path: project_feature_flags_path(@project), environments_endpoint: search_project_environments_path(@project, format: :json), user_callouts_path: user_callouts_path, - user_callout_id: UserCalloutsHelper::FEATURE_FLAGS_NEW_VERISION, + user_callout_id: UserCalloutsHelper::FEATURE_FLAGS_NEW_VERSION, show_user_callout: show_feature_flags_new_version?.to_s, strategy_type_docs_page_path: help_page_path('operations/feature_flags', anchor: 'feature-flag-strategies'), environments_scope_docs_path: help_page_path('ci/environments', anchor: 'scoping-environments-with-specs'), diff --git a/app/views/projects/feature_flags/index.html.haml b/app/views/projects/feature_flags/index.html.haml index f425de91d12..7d48cba74d0 100644 --- a/app/views/projects/feature_flags/index.html.haml +++ b/app/views/projects/feature_flags/index.html.haml @@ -7,6 +7,8 @@ "feature-flags-help-page-path" => help_page_path("operations/feature_flags"), "feature-flags-client-libraries-help-page-path" => help_page_path("operations/feature_flags", anchor: "choose-a-client-library"), "feature-flags-client-example-help-page-path" => help_page_path("operations/feature_flags", anchor: "golang-application-example"), + "feature-flags-limit-exceeded" => @project.actual_limits.exceeded?(:project_feature_flags, @project.operations_feature_flags.count), + "feature-flags-limit" => @project.actual_limits.project_feature_flags, "unleash-api-url" => (unleash_api_url(@project) if can?(current_user, :admin_feature_flag, @project)), "unleash-api-instance-id" => (unleash_api_instance_id(@project) if can?(current_user, :admin_feature_flag, @project)), "can-user-admin-feature-flag" => can?(current_user, :admin_feature_flag, @project), diff --git a/app/views/projects/feature_flags/new.html.haml b/app/views/projects/feature_flags/new.html.haml index a7388361da5..3bad1d9773c 100644 --- a/app/views/projects/feature_flags/new.html.haml +++ b/app/views/projects/feature_flags/new.html.haml @@ -7,7 +7,7 @@ feature_flags_path: project_feature_flags_path(@project), environments_endpoint: search_project_environments_path(@project, format: :json), user_callouts_path: user_callouts_path, - user_callout_id: UserCalloutsHelper::FEATURE_FLAGS_NEW_VERISION, + user_callout_id: UserCalloutsHelper::FEATURE_FLAGS_NEW_VERSION, show_user_callout: show_feature_flags_new_version?.to_s, strategy_type_docs_page_path: help_page_path('operations/feature_flags', anchor: 'feature-flag-strategies'), environments_scope_docs_path: help_page_path('ci/environments', anchor: 'scoping-environments-with-specs'), diff --git a/app/views/projects/forks/_fork_button.html.haml b/app/views/projects/forks/_fork_button.html.haml index dd49e8bdb4b..cfef2a19420 100644 --- a/app/views/projects/forks/_fork_button.html.haml +++ b/app/views/projects/forks/_fork_button.html.haml @@ -10,11 +10,11 @@ %h5.gl-mt-3 = namespace.human_name - if forked_project = namespace.find_fork_of(@project) - = link_to _("Go to project"), project_path(forked_project), class: "btn" + = link_to _("Go to project"), project_path(forked_project), class: "btn gl-button btn-default" - else %div{ class: ('has-tooltip' unless can_create_project), title: (_('You have reached your project limit') unless can_create_project) } = link_to _("Select"), project_forks_path(@project, namespace_key: namespace.id), data: { qa_selector: 'fork_namespace_button', qa_name: namespace.human_name }, method: "POST", - class: ["btn btn-success", ("disabled" unless can_create_project)] + class: ["btn gl-button btn-success", ("disabled" unless can_create_project)] diff --git a/app/views/projects/forks/index.html.haml b/app/views/projects/forks/index.html.haml index 8384561891a..67dc07fb785 100644 --- a/app/views/projects/forks/index.html.haml +++ b/app/views/projects/forks/index.html.haml @@ -30,11 +30,11 @@ - if current_user && can?(current_user, :fork_project, @project) - if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2 - = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: _('Go to your fork'), class: 'btn btn-success' do + = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: _('Go to your fork'), class: 'btn gl-button btn-success' do = sprite_icon('fork', size: 12) %span= _('Fork') - else - = link_to new_project_fork_path(@project), title: _("Fork project"), class: 'btn btn-success' do + = link_to new_project_fork_path(@project), title: _("Fork project"), class: 'btn gl-button btn-success' do = sprite_icon('fork', size: 12) %span= _('Fork') diff --git a/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml b/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml index 1118b44d7a2..e341831e17d 100644 --- a/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml +++ b/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml @@ -75,7 +75,7 @@ - if generic_commit_status.finished_at %p.finished-at - = icon("calendar") + = sprite_icon("calendar") %span= time_ago_with_tooltip(generic_commit_status.finished_at) %td.coverage diff --git a/app/views/projects/group_links/update.js.haml b/app/views/projects/group_links/update.js.haml deleted file mode 100644 index 55520fda494..00000000000 --- a/app/views/projects/group_links/update.js.haml +++ /dev/null @@ -1,4 +0,0 @@ -:plain - var $listItem = $('#{escape_javascript(render('shared/members/group', group_link: @group_link))}'); - $("#group_member_#{@group_link.id} .list-item-name").replaceWith($listItem.find('.list-item-name')); - gl.utils.localTimeAgo($('.js-timeago'), $("#group_member_#{@group_link.id}")); diff --git a/app/views/projects/hook_logs/show.html.haml b/app/views/projects/hook_logs/show.html.haml index 8a8c396a9e4..ebe179c3454 100644 --- a/app/views/projects/hook_logs/show.html.haml +++ b/app/views/projects/hook_logs/show.html.haml @@ -7,6 +7,6 @@ %h4.gl-mt-0 Request details .col-lg-9 - = link_to 'Resend Request', @hook_log.present.retry_path, method: :post, class: "btn btn-default float-right gl-ml-3" + = link_to 'Resend Request', @hook_log.present.retry_path, method: :post, class: "btn gl-button btn-default float-right gl-ml-3" = render partial: 'shared/hook_logs/content', locals: { hook_log: @hook_log } diff --git a/app/views/projects/hooks/edit.html.haml b/app/views/projects/hooks/edit.html.haml index f728ef5ac1a..fb19b251d41 100644 --- a/app/views/projects/hooks/edit.html.haml +++ b/app/views/projects/hooks/edit.html.haml @@ -10,9 +10,9 @@ = form_for [@project, @hook], as: :hook, url: project_hook_path(@project, @hook) do |f| = render partial: 'shared/web_hooks/form', locals: { form: f, hook: @hook } - %span>= f.submit 'Save changes', class: 'btn btn-success gl-mr-3' + = f.submit 'Save changes', class: 'btn gl-button btn-success gl-mr-3' = render 'shared/web_hooks/test_button', hook: @hook - = link_to _('Delete'), project_hook_path(@project, @hook), method: :delete, class: 'btn btn-remove float-right', data: { confirm: _('Are you sure?') } + = link_to _('Delete'), project_hook_path(@project, @hook), method: :delete, class: 'btn gl-button btn-danger float-right', data: { confirm: _('Are you sure?') } %hr diff --git a/app/views/projects/hooks/index.html.haml b/app/views/projects/hooks/index.html.haml index 5c6a87ddb26..e40c36da29d 100644 --- a/app/views/projects/hooks/index.html.haml +++ b/app/views/projects/hooks/index.html.haml @@ -9,7 +9,6 @@ .col-lg-8.gl-mb-3 = form_for @hook, as: :hook, url: polymorphic_path([@project, :hooks]) do |f| = render partial: 'shared/web_hooks/form', locals: { form: f, hook: @hook } - .gl-display-flex.gl-justify-content-end - = f.submit 'Add webhook', class: 'btn btn-success' + = f.submit 'Add webhook', class: 'btn btn-success' = render 'shared/web_hooks/index', hooks: @hooks, hook_class: @hook.class diff --git a/app/views/projects/incidents/_new_branch.html.haml b/app/views/projects/incidents/_new_branch.html.haml new file mode 100644 index 00000000000..f250fbc4b8b --- /dev/null +++ b/app/views/projects/incidents/_new_branch.html.haml @@ -0,0 +1 @@ += render 'projects/issues/new_branch' diff --git a/app/views/projects/incidents/index.html.haml b/app/views/projects/incidents/index.html.haml index 3d66c254601..a89e93618bc 100644 --- a/app/views/projects/incidents/index.html.haml +++ b/app/views/projects/incidents/index.html.haml @@ -1,3 +1,3 @@ - page_title _('Incidents') -#js-incidents{ data: incidents_data(@project) } +#js-incidents{ data: incidents_data(@project, params) } diff --git a/app/views/projects/incidents/show.html.haml b/app/views/projects/incidents/show.html.haml new file mode 100644 index 00000000000..b0ddc85df5d --- /dev/null +++ b/app/views/projects/incidents/show.html.haml @@ -0,0 +1 @@ += render template: 'projects/issues/show' diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index 4273130bbc2..e1f1d8bb8f7 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -1,4 +1,5 @@ - add_page_startup_api_call discussions_path(@issue) +- add_page_startup_api_call notes_url - @gfm_form = true diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml index ba9ab50cb3a..4f188ae273c 100644 --- a/app/views/projects/issues/_issue.html.haml +++ b/app/views/projects/issues/_issue.html.haml @@ -35,7 +35,7 @@ - if issue.due_date %span.issuable-due-date.d-none.d-sm-inline-block.has-tooltip{ class: "#{'cred' if issue.overdue?}", title: _('Due date') }   - = icon('calendar') + = sprite_icon('calendar') = issue.due_date.to_s(:medium) - if issue.labels.any?   @@ -54,7 +54,7 @@ %li.issuable-status = _('CLOSED') - if issue.assignees.any? - %li + %li.gl-display-flex = render 'shared/issuable/assignees', project: @project, issuable: issue = render 'shared/issuable_meta_data', issuable: issue diff --git a/app/views/projects/issues/_issues.html.haml b/app/views/projects/issues/_issues.html.haml index 1a557cce33c..fa08c39e407 100644 --- a/app/views/projects/issues/_issues.html.haml +++ b/app/views/projects/issues/_issues.html.haml @@ -4,12 +4,14 @@ - data_endpoint = local_assigns.fetch(:data_endpoint, expose_path(api_v4_projects_issues_path(id: @project.id))) - default_empty_state_meta = { create_issue_path: new_project_issue_path(@project), svg_path: image_path('illustrations/issues.svg') } - data_empty_state_meta = local_assigns.fetch(:data_empty_state_meta, default_empty_state_meta) - - type = local_assigns.fetch(:type, '') + - type = local_assigns.fetch(:type, 'issues') + - if type == 'issues' && use_startup_call? + - add_page_startup_api_call(api_v4_projects_issues_path(id: @project.id, params: startup_call_params)) .js-issuables-list{ data: { endpoint: data_endpoint, 'empty-state-meta': data_empty_state_meta.to_json, 'can-bulk-edit': @can_bulk_update.to_json, 'sort-key': @sort, - 'type': type } } + type: type } } - else - empty_state_path = local_assigns.fetch(:empty_state_path, 'shared/empty_states/issues') %ul.content-list.issues-list.issuable-list{ class: ("manual-ordering" if @sort == 'relative_position') } @@ -18,4 +20,4 @@ = render empty_state_path - if @issues.present? - = paginate @issues, theme: "gitlab", total_pages: @total_pages + = paginate_collection @issues, total_pages: @total_pages diff --git a/app/views/projects/issues/_new_branch.html.haml b/app/views/projects/issues/_new_branch.html.haml index 9bbab925f6a..aa95cecb5fe 100644 --- a/app/views/projects/issues/_new_branch.html.haml +++ b/app/views/projects/issues/_new_branch.html.haml @@ -43,7 +43,7 @@ %li.droplab-item-ignore.gl-ml-3.gl-mr-3.gl-mt-5 - if can_create_confidential_merge_request? - #js-forked-project{ data: { namespace_path: @project.namespace.full_path, project_path: @project.full_path, new_fork_path: new_project_fork_path(@project), help_page_path: help_page_path('user/project/merge_requests') } } + #js-forked-project{ data: { namespace_path: @project.namespace.full_path, project_path: @project.full_path, new_fork_path: new_project_fork_path(@project), help_page_path: help_page_path('user/project/merge_requests/index.md') } } .form-group %label{ for: 'new-branch-name' } = _('Branch name') diff --git a/app/views/projects/issues/export_csv/_button.html.haml b/app/views/projects/issues/export_csv/_button.html.haml index ef3fb438641..e5710fcdb60 100644 --- a/app/views/projects/issues/export_csv/_button.html.haml +++ b/app/views/projects/issues/export_csv/_button.html.haml @@ -1,4 +1,4 @@ - if current_user - %button.csv_download_link.btn.has-tooltip{ title: _('Export as CSV'), + %button.csv_download_link.btn.gl-button.has-tooltip{ title: _('Export as CSV'), data: { toggle: 'modal', target: '.issues-export-modal', qa_selector: 'export_as_csv_button' } } = sprite_icon('export') diff --git a/app/views/projects/issues/export_csv/_modal.html.haml b/app/views/projects/issues/export_csv/_modal.html.haml index 793e43da935..6610af63445 100644 --- a/app/views/projects/issues/export_csv/_modal.html.haml +++ b/app/views/projects/issues/export_csv/_modal.html.haml @@ -10,12 +10,13 @@ %a.close{ href: '#', 'data-dismiss' => 'modal' } = sprite_icon('close', css_class: 'gl-icon') .modal-body - .modal-subheader - = icon('check', { class: 'checkmark' }) - %strong.gl-ml-3 - - issues_count = issuables_count_for_state(:issues, params[:state]) - = n_('%d issue selected', '%d issues selected', issues_count) % issues_count + - issues_count = issuables_count_for_state(:issues, params[:state]) + - unless issues_count == -1 # The count timed out + .modal-subheader + = icon('check', { class: 'checkmark' }) + %strong.gl-ml-3 + = n_('%d issue selected', '%d issues selected', issues_count) % issues_count .modal-text = html_escape(_('The CSV export will be created in the background. Once finished, it will be sent to %{strong_open}%{email}%{strong_close} in an attachment.')) % { email: @current_user.notification_email, strong_open: ''.html_safe, strong_close: ''.html_safe } .modal-footer - = link_to _('Export issues'), export_csv_project_issues_path(@project, request.query_parameters), method: :post, class: 'btn btn-success float-left', title: _('Export issues'), data: { track_label: "export_issues_csv", track_event: "click_button", track_value: "", qa_selector: "export_issues_button" } + = link_to _('Export issues'), export_csv_project_issues_path(@project, request.query_parameters), method: :post, class: 'btn gl-button btn-success float-left', title: _('Export issues'), data: { track_label: "export_issues_csv", track_event: "click_button", track_value: "", qa_selector: "export_issues_button" } diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml index cfc423da57a..842b3432991 100644 --- a/app/views/projects/issues/index.html.haml +++ b/app/views/projects/issues/index.html.haml @@ -2,6 +2,7 @@ - page_title _("Issues") - new_issue_email = @project.new_issuable_address(current_user, 'issue') +- add_page_specific_style 'page_bundles/issues_list' = content_for :meta_tags do = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{@project.name} issues") diff --git a/app/views/projects/issues/service_desk.html.haml b/app/views/projects/issues/service_desk.html.haml index 65580a94cd0..b0d8791c566 100644 --- a/app/views/projects/issues/service_desk.html.haml +++ b/app/views/projects/issues/service_desk.html.haml @@ -1,7 +1,7 @@ - @can_bulk_update = false - page_title _("Service Desk") - +- add_page_specific_style 'page_bundles/issues_list' - content_for :breadcrumbs_extra do = render "projects/issues/nav_btns", show_export_button: false, show_rss_button: false diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index c762b044c3e..7785093466b 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -2,8 +2,12 @@ - add_to_breadcrumbs _("Issues"), project_issues_path(@project) - breadcrumb_title @issue.to_reference - page_title "#{@issue.title} (#{@issue.to_reference})", _("Issues") -- page_description @issue.description +- page_description @issue.description_html - page_card_attributes @issue.card_attributes +- if @issue.relocation_target + - page_canonical_link @issue.relocation_target.present(current_user: current_user).web_url +- if @issue.sentry_issue.present? + - add_page_specific_style 'page_bundles/error_tracking_details' - can_update_issue = can?(current_user, :update_issue, @issue) - can_reopen_issue = can?(current_user, :reopen_issue, @issue) @@ -61,15 +65,12 @@ .issue-details.issuable-details .detail-page-description.content-block - -# haml-lint:disable InlineJavaScript - %script#js-issuable-app-initial-data{ type: "application/json" }= issuable_initial_data(@issue).to_json - #js-issuable-app + #js-issuable-app{ data: { initial: issuable_initial_data(@issue).to_json} } .title-container %h2.title= markdown_field(@issue, :title) - if @issue.description.present? - .description{ class: can?(current_user, :update_issue, @issue) ? 'js-task-list-container' : '' } + .description .md= markdown_field(@issue, :description) - %textarea.hidden.js-task-list-field= @issue.description = edited_time_ago_with_tooltip(@issue, placement: 'bottom', html_class: 'issue-edited-ago js-issue-edited-ago') @@ -92,6 +93,7 @@ .js-noteable-awards = render 'award_emoji/awards_block', awardable: @issue, inline: true .new-branch-col + = render_if_exists "projects/issues/timeline_toggle", issue: @issue #js-vue-sort-issue-discussions #js-vue-discussion-filter{ data: { default_filter: current_user&.notes_filter_for(@issue), notes_filters: UserPreference.notes_filters.to_json } } = render 'new_branch' if show_new_branch_button? diff --git a/app/views/projects/jobs/show.html.haml b/app/views/projects/jobs/show.html.haml index df98a1c7cce..d7a778088ee 100644 --- a/app/views/projects/jobs/show.html.haml +++ b/app/views/projects/jobs/show.html.haml @@ -1,9 +1,7 @@ - add_to_breadcrumbs _("Jobs"), project_jobs_path(@project) - breadcrumb_title "##{@build.id}" - page_title "#{@build.name} (##{@build.id})", _("Jobs") - -- content_for :page_specific_javascripts do - = stylesheet_link_tag 'page_bundles/xterm' +- add_page_specific_style 'page_bundles/xterm' = render_if_exists "shared/shared_runners_minutes_limit_flash_message" diff --git a/app/views/projects/jobs/terminal.html.haml b/app/views/projects/jobs/terminal.html.haml index 01f40543926..95acbcae6d9 100644 --- a/app/views/projects/jobs/terminal.html.haml +++ b/app/views/projects/jobs/terminal.html.haml @@ -2,9 +2,10 @@ - add_to_breadcrumbs "##{@build.id}", project_job_path(@project, @build) - breadcrumb_title _('Terminal') - page_title _('Terminal'), "#{@build.name} (##{@build.id})", _('Jobs') - +- add_page_specific_style 'page_bundles/terminal' - content_for :page_specific_javascripts do = stylesheet_link_tag "xterm.css" + .terminal-container - #terminal{ data: { project_path: terminal_project_job_path(@project, @build, format: :ws) } } + #terminal.gl-mt-4{ data: { project_path: terminal_project_job_path(@project, @build, format: :ws) } } diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml index 8d8270847a3..2699192adc9 100644 --- a/app/views/projects/labels/index.html.haml +++ b/app/views/projects/labels/index.html.haml @@ -52,5 +52,5 @@ = render 'shared/empty_states/labels' %template#js-badge-item-template - %li.label-link-item.js-priority-badge.inline.gl-ml-3 - .label-badge.label-badge-blue= _('Prioritized label') + %li.js-priority-badge.inline.gl-ml-3 + .label-badge.gl-bg-blue-50= _('Prioritized label') diff --git a/app/views/projects/merge_requests/_description.html.haml b/app/views/projects/merge_requests/_description.html.haml index 354a384b647..c20479662dd 100644 --- a/app/views/projects/merge_requests/_description.html.haml +++ b/app/views/projects/merge_requests/_description.html.haml @@ -3,7 +3,6 @@ .description.qa-description{ class: can?(current_user, :update_merge_request, @merge_request) ? 'js-task-list-container' : '' } .md = markdown_field(@merge_request, :description) - %textarea.hidden.js-task-list-field - = @merge_request.description + %textarea.hidden.js-task-list-field{ data: { value: @merge_request.description } } = edited_time_ago_with_tooltip(@merge_request, placement: 'bottom') diff --git a/app/views/projects/merge_requests/_discussion.html.haml b/app/views/projects/merge_requests/_discussion.html.haml deleted file mode 100644 index ecb51aca847..00000000000 --- a/app/views/projects/merge_requests/_discussion.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -- content_for :note_actions do - - if can?(current_user, :update_merge_request, @merge_request) - - if @merge_request.open? - = link_to 'Close merge request', merge_request_path(@merge_request, merge_request: { state_event: :close }), method: :put, class: "btn btn-nr btn-comment btn-close close-mr-link js-note-target-close", title: "Close merge request", data: { original_text: "Close merge request", alternative_text: "Comment & close merge request"} - - if @merge_request.reopenable? - = link_to 'Reopen merge request', merge_request_path(@merge_request, merge_request: { state_event: :reopen }), method: :put, class: "btn btn-nr btn-comment btn-reopen reopen-mr-link js-note-target-close js-note-target-reopen", title: "Reopen merge request", data: { original_text: "Reopen merge request", alternative_text: "Comment & reopen merge request"} - %comment-and-resolve-btn{ "inline-template" => true } - %button.btn.btn-nr.btn-default.gl-mr-3.js-comment-resolve-button{ "v-if" => "showButton", type: "submit", data: { project_path: "#{project_path(@merge_request.project)}" } } - {{ buttonText }} - -#notes= render "shared/notes/notes_with_form", :autocomplete => true diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml index ad0f4d03f9a..092055a5f85 100644 --- a/app/views/projects/merge_requests/_merge_request.html.haml +++ b/app/views/projects/merge_requests/_merge_request.html.haml @@ -53,8 +53,11 @@ = link_to merge_request_path(merge_request), class: "has-tooltip", title: _('Cannot be merged automatically') do = sprite_icon('warning-solid') - if merge_request.assignees.any? - %li.d-flex + %li.gl-display-flex.gl-align-items-center = render 'shared/issuable/assignees', project: merge_request.project, issuable: merge_request + - if Feature.enabled?(:merge_request_reviewers, @project) && merge_request.reviewers.any? + %li.gl-display-flex.issuable-reviewers + = render 'shared/issuable/reviewers', project: merge_request.project, issuable: merge_request = render 'projects/merge_requests/approvals_count', merge_request: merge_request = render 'shared/issuable_meta_data', issuable: merge_request diff --git a/app/views/projects/merge_requests/_merge_requests.html.haml b/app/views/projects/merge_requests/_merge_requests.html.haml index 57fbd360d46..e2123e36e67 100644 --- a/app/views/projects/merge_requests/_merge_requests.html.haml +++ b/app/views/projects/merge_requests/_merge_requests.html.haml @@ -5,4 +5,4 @@ = render 'shared/empty_states/merge_requests' - if @merge_requests.present? - = paginate @merge_requests, theme: "gitlab", total_pages: @total_pages + = paginate_collection @merge_requests, total_pages: @total_pages diff --git a/app/views/projects/merge_requests/_mr_title.html.haml b/app/views/projects/merge_requests/_mr_title.html.haml index 454a0694355..b56e2c3f985 100644 --- a/app/views/projects/merge_requests/_mr_title.html.haml +++ b/app/views/projects/merge_requests/_mr_title.html.haml @@ -32,16 +32,19 @@ %ul - if can_update_merge_request %li= link_to 'Edit', edit_namespace_project_merge_request_path(@project.namespace, @project, @merge_request) - - unless current_user == @merge_request.author - %li= link_to 'Report abuse', new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request)) - if can_update_merge_request + - unless @merge_request.closed? + %li + = link_to @merge_request.work_in_progress? ? _('Mark as ready') : _('Mark as draft'), toggle_draft_issuable_path(@merge_request), method: :put, class: "js-draft-toggle-button" %li{ class: [merge_request_button_visibility(@merge_request, true), 'js-close-item'] } = link_to 'Close', merge_request_path(@merge_request, merge_request: { state_event: :close }), method: :put, title: 'Close merge request' - if can_reopen_merge_request %li{ class: merge_request_button_visibility(@merge_request, false) } = link_to 'Reopen', merge_request_path(@merge_request, merge_request: { state_event: :reopen }), method: :put, class: 'reopen-mr-link', title: 'Reopen merge request' + - unless current_user == @merge_request.author + %li= link_to 'Report abuse', new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request)) - if can_update_merge_request - = link_to 'Edit', edit_project_merge_request_path(@project, @merge_request), class: "d-none d-sm-none d-md-block btn btn-grouped js-issuable-edit qa-edit-button" + = link_to 'Edit', edit_project_merge_request_path(@project, @merge_request), class: "d-none d-sm-none d-md-block btn gl-button btn-grouped js-issuable-edit qa-edit-button" = render 'shared/issuable/close_reopen_button', issuable: @merge_request, can_update: can_update_merge_request, can_reopen: can_reopen_merge_request diff --git a/app/views/projects/merge_requests/conflicts/show.html.haml b/app/views/projects/merge_requests/conflicts/show.html.haml index 28ba2b6ac75..a7ffe825139 100644 --- a/app/views/projects/merge_requests/conflicts/show.html.haml +++ b/app/views/projects/merge_requests/conflicts/show.html.haml @@ -1,4 +1,5 @@ - page_title _("Merge Conflicts"), "#{@merge_request.title} (#{@merge_request.to_reference}", _("Merge Requests") +- add_page_specific_style 'page_bundles/merge_conflicts' - content_for :page_specific_javascripts do = page_specific_javascript_tag('lib/ace.js') = render "projects/merge_requests/mr_title" diff --git a/app/views/projects/merge_requests/creations/new.html.haml b/app/views/projects/merge_requests/creations/new.html.haml index ad4980fa57f..4c968c8e8eb 100644 --- a/app/views/projects/merge_requests/creations/new.html.haml +++ b/app/views/projects/merge_requests/creations/new.html.haml @@ -1,6 +1,7 @@ - add_to_breadcrumbs _("Merge Requests"), project_merge_requests_path(@project) - breadcrumb_title _("New") - page_title _("New Merge Request") +- add_page_specific_style 'page_bundles/pipelines' - if @merge_request.can_be_created && !params[:change_branches] = render 'new_submit' diff --git a/app/views/projects/merge_requests/diffs/_commit_widget.html.haml b/app/views/projects/merge_requests/diffs/_commit_widget.html.haml deleted file mode 100644 index c022d2c70d8..00000000000 --- a/app/views/projects/merge_requests/diffs/_commit_widget.html.haml +++ /dev/null @@ -1,11 +0,0 @@ --#----------------------------------------------------------------- - WARNING: Please keep changes up-to-date with the following files: - - `assets/javascripts/diffs/components/commit_widget.vue` --#----------------------------------------------------------------- -- collapsible = local_assigns.fetch(:collapsible, true) - -- if @commit - .info-well.mw-100.mx-0 - .well-segment - %ul.blob-commit-info - = render 'projects/commits/commit', commit: @commit, merge_request: @merge_request, view_details: true, collapsible: collapsible diff --git a/app/views/projects/merge_requests/diffs/_different_base.html.haml b/app/views/projects/merge_requests/diffs/_different_base.html.haml deleted file mode 100644 index 06a15b96653..00000000000 --- a/app/views/projects/merge_requests/diffs/_different_base.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -- if @merge_request_diff && different_base?(@start_version, @merge_request_diff) - .mr-version-controls - .content-block - = sprite_icon('information-o') - Selected versions have different base commits. - Changes will include - = link_to project_compare_path(@project, from: @start_version.base_commit_sha, to: @merge_request_diff.base_commit_sha) do - new commits - from - = succeed '.' do - %code.ref-name= @merge_request.target_branch diff --git a/app/views/projects/merge_requests/diffs/_diffs.html.haml b/app/views/projects/merge_requests/diffs/_diffs.html.haml deleted file mode 100644 index 9ebd91dea0b..00000000000 --- a/app/views/projects/merge_requests/diffs/_diffs.html.haml +++ /dev/null @@ -1,21 +0,0 @@ -= render 'projects/merge_requests/diffs/version_controls' -= render 'projects/merge_requests/diffs/different_base' -= render 'projects/merge_requests/diffs/not_all_comments_displayed' -= render 'projects/merge_requests/diffs/commit_widget' - -- if @merge_request_diff&.empty? - .row.empty-state.nothing-here-block - .col-12 - .svg-content= image_tag 'illustrations/merge_request_changes_empty.svg' - .col-12 - .text-content.text-center - %p - No changes between - %span.ref-name= @merge_request.source_branch - and - %span.ref-name= @merge_request.target_branch - .text-center= link_to 'Create commit', project_new_blob_path(@project, @merge_request.source_branch), class: 'btn btn-success' -- else - - diff_viewable = @merge_request_diff ? @merge_request_diff.viewable? : true - - if diff_viewable - = render "projects/diffs/diffs", diffs: @diffs, environment: @environment, merge_request: true diff --git a/app/views/projects/merge_requests/diffs/_not_all_comments_displayed.html.haml b/app/views/projects/merge_requests/diffs/_not_all_comments_displayed.html.haml deleted file mode 100644 index b9dc37c9b54..00000000000 --- a/app/views/projects/merge_requests/diffs/_not_all_comments_displayed.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -- if @commit || @start_version || (@merge_request_diff && !@merge_request_diff.latest?) - .mr-version-controls - .content-block.comments-disabled-notif.clearfix - = sprite_icon('information-o') - = succeed '.' do - - if @commit - Only comments from the following commit are shown below - - else - Not all comments are displayed because you're - - if @start_version - comparing two versions of the diff - - else - viewing an old version of the diff - .float-right - = link_to diffs_project_merge_request_path(@merge_request.project, @merge_request), class: 'btn btn-sm' do - Show latest version - = "of the diff" if @commit diff --git a/app/views/projects/merge_requests/diffs/_version_controls.html.haml b/app/views/projects/merge_requests/diffs/_version_controls.html.haml deleted file mode 100644 index 52bf584d550..00000000000 --- a/app/views/projects/merge_requests/diffs/_version_controls.html.haml +++ /dev/null @@ -1,73 +0,0 @@ -- if @merge_request_diff && @merge_request_diffs.size > 1 - .mr-version-controls - .mr-version-menus-container.content-block - Changes between - %span.dropdown.inline.mr-version-dropdown - %a.dropdown-toggle.btn.btn-default{ data: { toggle: :dropdown, display: 'static' } } - %span - - if @merge_request_diff.latest? - latest version - - else - version #{version_index(@merge_request_diff)} - = icon('caret-down') - .dropdown-menu.dropdown-select.dropdown-menu-selectable - .dropdown-title - %span Version: - %button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } } - = icon('times', class: 'dropdown-menu-close-icon') - .dropdown-content - %ul - - @merge_request_diffs.each do |merge_request_diff| - %li - = link_to merge_request_version_path(@project, @merge_request, merge_request_diff, @start_sha), class: ('is-active' if merge_request_diff == @merge_request_diff) do - %div - %strong - - if merge_request_diff.latest? - latest version - - else - version #{version_index(merge_request_diff)} - %div - %small.commit-sha= short_sha(merge_request_diff.head_commit_sha) - %div - %small - #{number_with_delimiter(merge_request_diff.commits_count)} #{'commit'.pluralize(merge_request_diff.commits_count)}, - = time_ago_with_tooltip(merge_request_diff.created_at) - - - if @merge_request_diff.base_commit_sha - and - %span.dropdown.inline.mr-version-compare-dropdown - %a.btn.btn-default.dropdown-toggle{ data: { toggle: :dropdown, display: 'static' } } - - if @start_version - version #{version_index(@start_version)} - - else - %span.ref-name= @merge_request.target_branch - = icon('caret-down') - .dropdown-menu.dropdown-select.dropdown-menu-selectable - .dropdown-title - %span Compared with: - %button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } } - = icon('times', class: 'dropdown-menu-close-icon') - .dropdown-content - %ul - - @comparable_diffs.each do |merge_request_diff| - %li - = link_to merge_request_version_path(@project, @merge_request, @merge_request_diff, merge_request_diff.head_commit_sha), class: ('is-active' if merge_request_diff == @start_version) do - %div - %strong - - if merge_request_diff.latest? - latest version - - else - version #{version_index(merge_request_diff)} - %div - %small.commit-sha= short_sha(merge_request_diff.head_commit_sha) - %div - %small - = time_ago_with_tooltip(merge_request_diff.created_at) - %li - = link_to merge_request_version_path(@project, @merge_request, @merge_request_diff), class: ('is-active' unless @start_version) do - %div - %strong - %span.ref-name= @merge_request.target_branch - (base) - %div - %strong.commit-sha= short_sha(@merge_request_diff.base_commit_sha) diff --git a/app/views/projects/merge_requests/invalid.html.haml b/app/views/projects/merge_requests/invalid.html.haml index 7b831aa2d01..df942c11883 100644 --- a/app/views/projects/merge_requests/invalid.html.haml +++ b/app/views/projects/merge_requests/invalid.html.haml @@ -1,25 +1,28 @@ - page_title "#{@merge_request.title} (#{@merge_request.to_reference}", _("Merge Requests") +- badge_css_classes = "badge gl-text-white" +- badge_info_css_classes = "#{badge_css_classes} badge-info" +- badge_inverse_css_classes = "#{badge_css_classes} badge-inverse" .merge-request = render "projects/merge_requests/mr_title" = render "projects/merge_requests/mr_box" - .alert.alert-danger + .gl-alert.gl-alert-danger + = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') %p We cannot render this merge request properly because - if @merge_request.for_fork? && !@merge_request.source_project fork project was removed - elsif !@merge_request.source_branch_exists? - %span.badge.badge-inverse= @merge_request.source_branch + %span{ class: badge_inverse_css_classes }= @merge_request.source_branch does not exist in - %span.badge.badge-info= @merge_request.source_project_path + %span{ class: badge_info_css_classes }= @merge_request.source_project_path - elsif !@merge_request.target_branch_exists? - %span.badge.badge-inverse= @merge_request.target_branch + %span{ class: badge_inverse_css_classes }= @merge_request.target_branch does not exist in - %span.badge.badge-info= @merge_request.target_project_path + %span{ class: badge_info_css_classes }= @merge_request.target_project_path - else of internal error %strong Please close Merge Request or change branches with existing one - diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index b579f7510f9..1dbcd613ceb 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -3,11 +3,14 @@ - add_to_breadcrumbs _("Merge Requests"), project_merge_requests_path(@project) - breadcrumb_title @merge_request.to_reference - page_title "#{@merge_request.title} (#{@merge_request.to_reference})", _("Merge Requests") -- page_description @merge_request.description +- page_description @merge_request.description_html - page_card_attributes @merge_request.card_attributes - suggest_changes_help_path = help_page_path('user/discussions/index.md', anchor: 'suggest-changes') - number_of_pipelines = @pipelines.size - mr_action = j(params[:tab].presence || 'show') +- add_page_specific_style 'page_bundles/merge_requests' +- add_page_specific_style 'page_bundles/pipelines' +- add_page_specific_style 'page_bundles/reports' .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 } } = render "projects/merge_requests/mr_title" @@ -43,7 +46,6 @@ .tab-content#diff-notes-app #js-diff-file-finder - - if native_code_navigation_enabled?(@project) #js-code-navigation = render "projects/merge_requests/tabs/pane", id: "notes", class: "notes voting_notes" do .row @@ -92,7 +94,7 @@ .loading.hide .spinner.spinner-md -= render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees, source_branch: @merge_request.source_branch += render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees, reviewers: @merge_request.reviewers, source_branch: @merge_request.source_branch - if @merge_request.can_be_reverted?(current_user) = render "projects/commit/change", type: 'revert', commit: @merge_request.merge_commit, title: @merge_request.title diff --git a/app/views/projects/milestones/index.html.haml b/app/views/projects/milestones/index.html.haml index 2bab2a0fb03..2c52d2a5fbc 100644 --- a/app/views/projects/milestones/index.html.haml +++ b/app/views/projects/milestones/index.html.haml @@ -1,4 +1,5 @@ - page_title _('Milestones') +- add_page_specific_style 'page_bundles/milestone' .top-area = render 'shared/milestones_filter', counts: milestone_counts(@project.milestones) @@ -11,7 +12,7 @@ = _('New milestone') .milestones - #delete-milestone-modal + #js-delete-milestone-modal #promote-milestone-modal %ul.content-list diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index 99e626161c4..2185df3a994 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -1,7 +1,8 @@ - add_to_breadcrumbs _('Milestones'), project_milestones_path(@project) - breadcrumb_title @milestone.title - page_title @milestone.title, _('Milestones') -- page_description @milestone.description +- page_description @milestone.description_html +- add_page_specific_style 'page_bundles/milestone' = render 'shared/milestones/header', milestone: @milestone = render 'shared/milestones/description', milestone: @milestone @@ -9,11 +10,15 @@ = render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project - if can?(current_user, :read_issue, @project) && @milestone.total_issues_count == 0 - .alert.alert-success.gl-mt-3 - %span= _('Assign some issues to this milestone.') + .gl-alert.gl-alert-info.gl-mt-3.gl-mb-5{ data: { testid: 'no-issues-alert' } } + = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-body + %span= _('Assign some issues to this milestone.') - elsif @milestone.complete? && @milestone.active? - .alert.alert-success.gl-mt-3 - %span= _('All issues for this milestone are closed. You may close this milestone now.') + .gl-alert.gl-alert-success.gl-mt-3.gl-mb-5{ data: { testid: 'all-issues-closed-alert' } } + = sprite_icon('check-circle', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-body + %span= _('All issues for this milestone are closed. You may close this milestone now.') = render 'shared/milestones/tabs', milestone: @milestone = render 'shared/milestones/sidebar', milestone: @milestone, project: @project, affix_offset: 153 diff --git a/app/views/projects/milestones/update.js.haml b/app/views/projects/milestones/update.js.haml deleted file mode 100644 index 3ff84915e97..00000000000 --- a/app/views/projects/milestones/update.js.haml +++ /dev/null @@ -1,2 +0,0 @@ -:plain - $('##{dom_id(@milestone)}').fadeOut(); diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml index d7098bbb69d..d2847de6ece 100644 --- a/app/views/projects/mirrors/_mirror_repos.html.haml +++ b/app/views/projects/mirrors/_mirror_repos.html.haml @@ -6,7 +6,7 @@ %section.settings.project-mirror-settings.no-animate#js-push-remote-settings{ class: mirror_settings_class, data: { qa_selector: 'mirroring_repositories_settings_content' } } .settings-header %h4= _('Mirroring repositories') - %button.btn.js-settings-toggle + %button.btn.gl-button.js-settings-toggle = expanded ? _('Collapse') : _('Expand') %p = _('Set up your project to automatically push and/or pull changes to/from another repository. Branches, tags, and commits will be synced automatically.') @@ -32,7 +32,7 @@ = label_tag :only_protected_branches, _('Only mirror protected branches'), class: 'form-check-label' = link_to sprite_icon('question-o'), help_page_path('user/project/protected_branches'), target: '_blank' - .panel-footer.gl-display-flex.gl-justify-content-end + .panel-footer = f.submit _('Mirror repository'), class: 'btn btn-success js-mirror-submit qa-mirror-repository-button', name: :update_remote_mirror - else .gl-alert.gl-alert-info{ role: 'alert' } @@ -74,4 +74,4 @@ - if mirror.ssh_key_auth? = clipboard_button(text: mirror.ssh_public_key, class: 'btn btn-default', title: _('Copy SSH public key'), qa_selector: 'copy_public_key_button') = render 'shared/remote_mirror_update_button', remote_mirror: mirror - %button.js-delete-mirror.qa-delete-mirror.rspec-delete-mirror.btn.btn-danger{ type: 'button', data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' }, title: _('Remove') }= sprite_icon('remove') + %button.js-delete-mirror.qa-delete-mirror.rspec-delete-mirror.btn.gl-button.btn-danger{ type: 'button', data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' }, title: _('Remove') }= sprite_icon('remove') diff --git a/app/views/projects/mirrors/_regenerate_public_ssh_key_confirm_modal.html.haml b/app/views/projects/mirrors/_regenerate_public_ssh_key_confirm_modal.html.haml index 327552c9b2c..e6f3060af3e 100644 --- a/app/views/projects/mirrors/_regenerate_public_ssh_key_confirm_modal.html.haml +++ b/app/views/projects/mirrors/_regenerate_public_ssh_key_confirm_modal.html.haml @@ -9,5 +9,5 @@ .modal-body %p= _('Are you sure you want to regenerate the public key? You will have to update the public key on the remote server before mirroring will work again.') .form-actions.modal-footer - = button_tag _('Cancel'), type: 'button', class: 'btn js-cancel' - = button_tag _('Regenerate key'), type: 'button', class: 'btn btn-inverted btn-warning js-confirm' + = button_tag _('Cancel'), type: 'button', class: 'btn gl-button js-cancel' + = button_tag _('Regenerate key'), type: 'button', class: 'btn gl-button btn-inverted btn-warning js-confirm' diff --git a/app/views/projects/mirrors/_ssh_host_keys.html.haml b/app/views/projects/mirrors/_ssh_host_keys.html.haml index 786918c4970..1690188f07a 100644 --- a/app/views/projects/mirrors/_ssh_host_keys.html.haml +++ b/app/views/projects/mirrors/_ssh_host_keys.html.haml @@ -3,7 +3,7 @@ - verified_at = mirror.ssh_known_hosts_verified_at .form-group.js-ssh-host-keys-section{ class: ('collapse' unless mirror.ssh_mirror_url?) } - %button.btn.btn-inverted.btn-secondary.inline.js-detect-host-keys.gl-mr-3{ type: 'button', data: { qa_selector: 'detect_host_keys' } } + %button.btn.gl-button.btn-inverted.btn-secondary.inline.js-detect-host-keys.gl-mr-3{ type: 'button', data: { qa_selector: 'detect_host_keys' } } .js-spinner.d-none.spinner.mr-1 = _('Detect host keys') .fingerprint-ssh-info.js-fingerprint-ssh-info.gl-mt-3.gl-mb-3{ class: ('collapse' unless mirror.ssh_mirror_url?) } @@ -23,7 +23,7 @@ #{time_ago_in_words(verified_at)} ago .js-ssh-hosts-advanced.inline - %button.btn.btn-default.btn-show-advanced.show-advanced{ type: 'button' } + %button.btn.gl-button.btn-default.btn-show-advanced.show-advanced{ type: 'button' } %span.label-show = _('Input host keys manually') %span.label-hide diff --git a/app/views/projects/network/show.html.haml b/app/views/projects/network/show.html.haml index d134bfb488e..4366676bd45 100644 --- a/app/views/projects/network/show.html.haml +++ b/app/views/projects/network/show.html.haml @@ -2,12 +2,12 @@ - page_title _("Graph"), @ref = render "head" %div{ class: container_class } - .project-network - .controls + .project-network.gl-border-1.gl-border-solid.gl-border-gray-300 + .controls.gl-bg-gray-50.gl-p-2.gl-font-base.gl-text-gray-400.gl-border-b-1.gl-border-b-solid.gl-border-b-gray-300 = form_tag project_network_path(@project, @id), method: :get, class: 'form-inline network-form' do |f| = text_field_tag :extended_sha1, @options[:extended_sha1], placeholder: _("Git revision"), class: 'search-input form-control input-mx-250 search-sha' = button_tag class: 'btn btn-success' do - = icon('search') + = sprite_icon('search') .inline.prepend-left-20 .form-check.light = check_box_tag :filter_ref, 1, @options[:filter_ref], class: 'form-check-input' @@ -15,6 +15,6 @@ %span= _("Begin with the selected commit") - if @commit - .network-graph{ data: { url: @url, commit_url: @commit_url, ref: @ref, commit_id: @commit.id } } + .network-graph.gl-bg-white.gl-overflow-scroll.gl-overflow-x-hidden{ data: { url: @url, commit_url: @commit_url, ref: @ref, commit_id: @commit.id } } .text-center.gl-mt-3 .spinner.spinner-md diff --git a/app/views/projects/no_repo.html.haml b/app/views/projects/no_repo.html.haml index 0ab9d9c4005..c44d3da23bb 100644 --- a/app/views/projects/no_repo.html.haml +++ b/app/views/projects/no_repo.html.haml @@ -22,4 +22,4 @@ - if can? current_user, :remove_project, @project .prepend-top-20 - = link_to _('Delete project'), project_path(@project), data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-inverted btn-remove float-right" + = link_to _('Delete project'), project_path(@project), data: { confirm: remove_project_message(@project)}, method: :delete, class: "gl-button btn btn-danger btn-danger-secondary float-right" diff --git a/app/views/projects/notes/_actions.html.haml b/app/views/projects/notes/_actions.html.haml index 058366eb75d..a785e36fad5 100644 --- a/app/views/projects/notes/_actions.html.haml +++ b/app/views/projects/notes/_actions.html.haml @@ -2,7 +2,7 @@ - if note.noteable_author?(@noteable) %span{ class: 'note-role user-access-role has-tooltip d-none d-md-inline-block', title: _("This user is the author of this %{noteable}.") % { noteable: @noteable.human_class_name } }= _("Author") - if access - %span{ class: 'note-role user-access-role has-tooltip', title: _("This user is a %{access} of the %{name} project.") % { access: access.downcase, name: note.project_name } }= access + %span{ class: 'note-role user-access-role has-tooltip', title: _("This user has the %{access} role in the %{name} project.") % { access: access.downcase, name: note.project_name } }= access - elsif note.contributor? %span{ class: 'note-role user-access-role has-tooltip', title: _("This user has previously committed to the %{name} project.") % { name: note.project_name } }= _("Contributor") diff --git a/app/views/projects/packages/packages/show.html.haml b/app/views/projects/packages/packages/show.html.haml index 97a3c6e7092..aeca3f5b3e3 100644 --- a/app/views/projects/packages/packages/show.html.haml +++ b/app/views/projects/packages/packages/show.html.haml @@ -24,4 +24,5 @@ composer_help_path: help_page_path('user/packages/composer_repository/index'), project_name: @project.name, project_list_url: project_packages_path(@project), - group_list_url: @project.group ? group_packages_path(@project.group) : ''} } + group_list_url: @project.group ? group_packages_path(@project.group) : '', + composer_config_repository_name: composer_config_repository_name(@project.group&.id)} } diff --git a/app/views/projects/pages/_destroy.haml b/app/views/projects/pages/_destroy.haml index 58dbbb5bcfc..2714b5f221a 100644 --- a/app/views/projects/pages/_destroy.haml +++ b/app/views/projects/pages/_destroy.haml @@ -8,7 +8,7 @@ %p = s_('GitLabPages|Removing pages will prevent them from being exposed to the outside world.') .form-actions - = link_to s_('GitLabPages|Remove pages'), project_pages_path(@project), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn btn-remove" + = link_to s_('GitLabPages|Remove pages'), project_pages_path(@project), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn gl-button btn-danger" - else .nothing-here-block = s_('GitLabPages|Only project maintainers can remove pages') diff --git a/app/views/projects/pages/_list.html.haml b/app/views/projects/pages/_list.html.haml index af6de10b2a0..84c8ab0ceba 100644 --- a/app/views/projects/pages/_list.html.haml +++ b/app/views/projects/pages/_list.html.haml @@ -21,8 +21,8 @@ %span.badge.badge-danger = s_('GitLabPages|Expired') %div - = link_to s_('GitLabPages|Edit'), project_pages_domain_path(@project, domain), class: "btn btn-sm btn-grouped btn-success btn-inverted" - = link_to s_('GitLabPages|Remove'), project_pages_domain_path(@project, domain), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn btn-remove btn-sm btn-grouped" + = link_to s_('GitLabPages|Edit'), project_pages_domain_path(@project, domain), class: "btn gl-button btn-sm btn-grouped btn-success btn-inverted" + = link_to s_('GitLabPages|Remove'), project_pages_domain_path(@project, domain), data: { confirm: s_('GitLabPages|Are you sure?')}, 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 = "".html_safe diff --git a/app/views/projects/pages/_pages_settings.html.haml b/app/views/projects/pages/_pages_settings.html.haml index 8aa02074205..51483176d6f 100644 --- a/app/views/projects/pages/_pages_settings.html.haml +++ b/app/views/projects/pages/_pages_settings.html.haml @@ -1,6 +1,7 @@ = form_for @project, url: project_pages_path(@project), html: { class: 'inline', title: pages_https_only_title } do |f| + = render_if_exists 'shared/pages/max_pages_size_input', form: f + - if Gitlab.config.pages.external_http || Gitlab.config.pages.external_https - = render_if_exists 'shared/pages/max_pages_size_input', form: f .form-group .form-check @@ -9,5 +10,5 @@ %strong = s_('GitLabPages|Force HTTPS (requires valid certificates)') - .gl-mt-3 - = f.submit s_('GitLabPages|Save'), class: 'btn btn-success' + .gl-mt-3 + = f.submit s_('GitLabPages|Save'), class: 'btn btn-success gl-button' diff --git a/app/views/projects/pages/show.html.haml b/app/views/projects/pages/show.html.haml index 8a01945ffac..4347cbdbd9b 100644 --- a/app/views/projects/pages/show.html.haml +++ b/app/views/projects/pages/show.html.haml @@ -5,7 +5,7 @@ = s_('GitLabPages|Pages') - 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 btn-success float-right', title: s_('GitLabPages|New Domain') do + = link_to new_project_pages_domain_path(@project), class: 'btn gl-button btn-success float-right', title: s_('GitLabPages|New Domain') do = s_('GitLabPages|New Domain') %p.light diff --git a/app/views/projects/pages_domains/_certificate.html.haml b/app/views/projects/pages_domains/_certificate.html.haml index 16d949c416b..33db7896065 100644 --- a/app/views/projects/pages_domains/_certificate.html.haml +++ b/app/views/projects/pages_domains/_certificate.html.haml @@ -40,7 +40,7 @@ = link_to _('Remove'), clean_certificate_project_pages_domain_path(@project, domain_presenter), data: { confirm: _('Are you sure?') }, - class: 'btn btn-remove btn-sm', + class: 'gl-button btn btn-danger btn-sm', method: :delete - else .row diff --git a/app/views/projects/pages_domains/_form.html.haml b/app/views/projects/pages_domains/_form.html.haml index 9e9f60a6f09..453134ce5ab 100644 --- a/app/views/projects/pages_domains/_form.html.haml +++ b/app/views/projects/pages_domains/_form.html.haml @@ -1,5 +1,6 @@ - if domain_presenter.errors.any? - .alert.alert-danger + .gl-alert.gl-alert-danger + = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - domain_presenter.errors.full_messages.each do |msg| = msg diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml index ca71aa8a24d..45aaf2b64bf 100644 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml @@ -36,5 +36,5 @@ = link_to edit_pipeline_schedule_path(pipeline_schedule), title: _('Edit'), class: 'btn gl-display-flex' do = sprite_icon('pencil') - if can?(current_user, :admin_pipeline_schedule, pipeline_schedule) - = link_to pipeline_schedule_path(pipeline_schedule), title: _('Delete'), method: :delete, class: 'btn btn-remove', data: { confirm: _("Are you sure you want to delete this pipeline schedule?") } do + = link_to pipeline_schedule_path(pipeline_schedule), title: _('Delete'), method: :delete, class: 'gl-button btn btn-danger', data: { confirm: _("Are you sure you want to delete this pipeline schedule?") } do = sprite_icon('remove') diff --git a/app/views/projects/pipeline_schedules/index.html.haml b/app/views/projects/pipeline_schedules/index.html.haml index 2b2b79d886b..91083cc0768 100644 --- a/app/views/projects/pipeline_schedules/index.html.haml +++ b/app/views/projects/pipeline_schedules/index.html.haml @@ -2,7 +2,7 @@ - page_title _("Pipeline Schedules") -#pipeline-schedules-callout{ data: { docs_url: help_page_path('ci/pipelines/schedules') } } +#pipeline-schedules-callout{ data: { docs_url: help_page_path('ci/pipelines/schedules'), image_url: image_path('illustrations/pipeline_schedule_callout.svg') } } .top-area - schedule_path_proc = ->(scope) { pipeline_schedules_path(@project, scope: scope) } = render "tabs", schedule_path_proc: schedule_path_proc, all_schedules: @all_schedules, scope: @scope diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml index c54a19b8f61..6d3b3f815e4 100644 --- a/app/views/projects/pipelines/_info.html.haml +++ b/app/views/projects/pipelines/_info.html.haml @@ -43,8 +43,8 @@ placement: "top", html: "true", trigger: "focus", - title: "
#{popover_title_text}
", - content: "
#{popover_content_text}", + title: "
#{popover_title_text}
", + content: "#{popover_content_text}", } } Auto DevOps - if @pipeline.detached_merge_request_pipeline? @@ -58,7 +58,7 @@ .icon-container.commit-icon = custom_icon("icon_commit") = link_to commit.short_id, project_commit_path(@project, @pipeline.sha), class: "commit-sha js-details-short" - = link_to("#", class: "js-details-expand d-none d-sm-none d-md-inline") do + = link_to("#", class: "js-details-expand d-none d-md-inline") do %span.text-expander = sprite_icon('ellipsis_h', size: 12) %span.js-details-content.hide diff --git a/app/views/projects/pipelines/_with_tabs.html.haml b/app/views/projects/pipelines/_with_tabs.html.haml index f1ed67f8f82..40a52f76641 100644 --- a/app/views/projects/pipelines/_with_tabs.html.haml +++ b/app/views/projects/pipelines/_with_tabs.html.haml @@ -68,7 +68,7 @@ %td.responsive-table-cell.build-failure{ data: { column: _('Failure')} } = build.present.callout_failure_message %td.responsive-table-cell.build-actions - - if can?(current_user, :update_build, job) + - if can?(current_user, :update_build, job) && job.retryable? = link_to retry_project_job_path(build.project, build, return_to: request.original_url), method: :post, title: _('Retry'), class: 'btn btn-build gl-button btn-icon btn-default' do = sprite_icon('repeat', css_class: 'gl-icon') - if can?(current_user, :read_build, job) diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 05f8a126a02..ca07f33136b 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -1,4 +1,5 @@ - page_title _('Pipelines') +- add_page_specific_style 'page_bundles/pipelines' = render_if_exists "shared/shared_runners_minutes_limit_flash_message" diff --git a/app/views/projects/pipelines/new.html.haml b/app/views/projects/pipelines/new.html.haml index 2be75106000..cb5401cd329 100644 --- a/app/views/projects/pipelines/new.html.haml +++ b/app/views/projects/pipelines/new.html.haml @@ -6,8 +6,16 @@ = s_('Pipeline|Run Pipeline') %hr -- if Feature.enabled?(:new_pipeline_form) - #js-new-pipeline{ data: { project_id: @project.id, pipelines_path: project_pipelines_path(@project), ref_param: params[:ref] || @project.default_branch, var_param: params[:var].to_json, file_param: params[:file_var].to_json, ref_names: @project.repository.ref_names.to_json.html_safe, settings_link: project_settings_ci_cd_path(@project), max_warnings: ::Gitlab::Ci::Warnings::MAX_LIMIT } } +- if Feature.enabled?(:new_pipeline_form, @project) + #js-new-pipeline{ data: { project_id: @project.id, + pipelines_path: project_pipelines_path(@project), + config_variables_path: config_variables_namespace_project_pipelines_path(@project.namespace, @project), + ref_param: params[:ref] || @project.default_branch, + var_param: params[:var].to_json, + file_param: params[:file_var].to_json, + ref_names: @project.repository.ref_names.to_json.html_safe, + settings_link: project_settings_ci_cd_path(@project), + max_warnings: ::Gitlab::Ci::Warnings::MAX_LIMIT } } - else = form_for @pipeline, as: :pipeline, url: project_pipelines_path(@project), html: { id: "new-pipeline-form", class: "js-new-pipeline-form js-requires-input" } do |f| diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml index a9c140aee5f..34f7744f825 100644 --- a/app/views/projects/pipelines/show.html.haml +++ b/app/views/projects/pipelines/show.html.haml @@ -2,10 +2,11 @@ - breadcrumb_title "##{@pipeline.id}" - page_title _('Pipeline') - pipeline_has_errors = @pipeline.builds.empty? && @pipeline.yaml_errors.present? +- add_page_specific_style 'page_bundles/pipeline' +- add_page_specific_style 'page_bundles/reports' .js-pipeline-container{ data: { controller_action: "#{controller.action_name}" } } - #js-pipeline-header-vue.pipeline-header-container - + #js-pipeline-header-vue.pipeline-header-container{ data: {full_path: @project.full_path, retry_path: retry_project_pipeline_path(@pipeline.project, @pipeline), cancel_path: cancel_project_pipeline_path(@pipeline.project, @pipeline), delete_path: project_pipeline_path(@pipeline.project, @pipeline), pipeline_iid: @pipeline.iid, pipeline_id: @pipeline.id} } - if @pipeline.commit.present? = render "projects/pipelines/info", commit: @pipeline.commit diff --git a/app/views/projects/project_members/_team.html.haml b/app/views/projects/project_members/_team.html.haml index 4b3fdf8d0b1..4d4705c4ed5 100644 --- a/app/views/projects/project_members/_team.html.haml +++ b/app/views/projects/project_members/_team.html.haml @@ -11,7 +11,7 @@ .position-relative = search_field_tag :search, params[:search], { placeholder: _('Find existing members by name'), class: 'form-control', spellcheck: false } %button.user-search-btn{ type: "submit", "aria-label" => _("Submit search") } - = icon("search") + = sprite_icon('search', css_class: 'gl-vertical-align-middle!') = label_tag :sort_by, _('Sort by'), class: 'col-form-label label-bold px-2' = render 'shared/members/sort_dropdown' %ul.content-list.members-list{ data: { qa_selector: 'members_list' } } diff --git a/app/views/projects/project_members/import.html.haml b/app/views/projects/project_members/import.html.haml index bcca943de6a..2f953db0d65 100644 --- a/app/views/projects/project_members/import.html.haml +++ b/app/views/projects/project_members/import.html.haml @@ -11,5 +11,5 @@ .col-sm-10= select_tag(:source_project_id, options_from_collection_for_select(@projects, :id, :name_with_namespace), prompt: "Select project", class: "select2 lg", required: true) .form-actions - = button_tag _('Import project members'), class: "btn btn-success" - = link_to _("Cancel"), project_project_members_path(@project), class: "btn btn-cancel" + = button_tag _('Import project members'), class: "btn gl-button btn-success" + = link_to _("Cancel"), project_project_members_path(@project), class: "btn gl-button btn-cancel" diff --git a/app/views/projects/project_templates/_built_in_templates.html.haml b/app/views/projects/project_templates/_built_in_templates.html.haml deleted file mode 100644 index 43352952b37..00000000000 --- a/app/views/projects/project_templates/_built_in_templates.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -- Gitlab::ProjectTemplate.all.each do |template| - .template-option.d-flex.align-items-center{ data: { qa_selector: 'template_option_row' } } - .logo.gl-mr-3.px-1 - = image_tag template.logo, size: 32, class: "btn-template-icon icon-#{template.name}" - .description - %strong - = template.title - %br - .text-muted - = template.description - .controls.d-flex.align-items-center - %a.btn.btn-default.gl-mr-3{ href: template.preview, rel: 'noopener noreferrer', target: '_blank', data: { track_label: "template_preview", track_property: template.name, track_event: "click_button", track_value: "" } } - = _("Preview") - %label.btn.btn-success.template-button.choose-template.gl-mb-0{ for: 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_event: "click_button", track_value: "" } } - %span{ data: { qa_selector: 'use_template_button' } } - = _("Use template") diff --git a/app/views/projects/project_templates/_template.html.haml b/app/views/projects/project_templates/_template.html.haml new file mode 100644 index 00000000000..e2bfd0881b5 --- /dev/null +++ b/app/views/projects/project_templates/_template.html.haml @@ -0,0 +1,16 @@ +.template-option.d-flex.align-items-center{ data: { qa_selector: 'template_option_row' } } + .logo.gl-mr-3.px-1 + = image_tag template.logo, size: 32, class: "btn-template-icon icon-#{template.name}" + .description + %strong + = template.title + %br + .text-muted + = template.description + .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_event: "click_button", track_value: "" } } + = _("Preview") + %label.btn.gl-button.btn-success.template-button.choose-template.gl-mb-0{ for: 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_event: "click_button", track_value: "" } } + %span{ data: { qa_selector: 'use_template_button' } } + = _("Use template") 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 ee359a01e74..33be875d9a6 100644 --- a/app/views/projects/protected_branches/_create_protected_branch.html.haml +++ b/app/views/projects/protected_branches/_create_protected_branch.html.haml @@ -1,3 +1,5 @@ +- select_mode_for_dropdown = Feature.enabled?(:deploy_keys_on_protected_branches, @project) ? 'js-multiselect' : '' + - content_for :merge_access_levels do .merge_access_levels-container = dropdown_tag('Select', @@ -7,7 +9,7 @@ - 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 wide', + options: { toggle_class: "js-allowed-to-push qa-allowed-to-push-select #{select_mode_for_dropdown} 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' }}) 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 dc7514badb6..c4bf2d20ecf 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 @@ -24,5 +24,5 @@ .create_access_levels-container = yield :create_access_levels - .card-footer.gl-display-flex.gl-justify-content-end + .card-footer = f.submit _('Protect'), class: 'btn-success btn', disabled: true, data: { qa_selector: 'protect_tag_button' } diff --git a/app/views/projects/registry/repositories/index.html.haml b/app/views/projects/registry/repositories/index.html.haml index 8540ce30060..9ac1fda169f 100644 --- a/app/views/projects/registry/repositories/index.html.haml +++ b/app/views/projects/registry/repositories/index.html.haml @@ -15,5 +15,8 @@ "registry_host_url_with_port" => escape_once(registry_config.host_port), "expiration_policy_help_page_path" => help_page_path('user/packages/container_registry/index', anchor: 'expiration-policy'), "garbage_collection_help_page_path" => help_page_path('administration/packages/container_registry', anchor: 'container-registry-garbage-collection'), + "run_cleanup_policies_help_page_path" => help_page_path('administration/packages/container_registry', anchor: 'run-the-cleanup-policy-now'), + "cleanup_policies_help_page_path" => help_page_path('user/packages/container_registry/index', anchor: 'how-the-cleanup-policy-works'), + "is_admin": current_user&.admin.to_s, character_error: @character_error.to_s } } diff --git a/app/views/projects/registry/settings/_index.haml b/app/views/projects/registry/settings/_index.haml index c0cef8503e0..c6fae2cc7a1 100644 --- a/app/views/projects/registry/settings/_index.haml +++ b/app/views/projects/registry/settings/_index.haml @@ -1,7 +1,8 @@ #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, admin_settings_path: ci_cd_admin_application_settings_path(anchor: 'js-registry-settings'), - enable_historic_entries: Gitlab::CurrentSettings.try(:container_expiration_policies_enable_historic_entries).to_s} } + enable_historic_entries: container_expiration_policies_historic_entry_enabled?(@project).to_s} } diff --git a/app/views/projects/releases/show.html.haml b/app/views/projects/releases/show.html.haml index 188262fb34c..91ee9ad70a3 100644 --- a/app/views/projects/releases/show.html.haml +++ b/app/views/projects/releases/show.html.haml @@ -1,4 +1,5 @@ - add_to_breadcrumbs _("Releases"), project_releases_path(@project) - page_title @release.name +- page_description @release.description_html -#js-show-release-page{ data: { project_id: @project.id, tag_name: @release.tag } } +#js-show-release-page{ data: data_for_show_page } diff --git a/app/views/projects/runners/_shared_runners.html.haml b/app/views/projects/runners/_shared_runners.html.haml index 8a17ca3c670..c567b453bf2 100644 --- a/app/views/projects/runners/_shared_runners.html.haml +++ b/app/views/projects/runners/_shared_runners.html.haml @@ -1,19 +1,16 @@ -%h3 - = _('Shared Runners') - -.bs-callout.shared-runners-description - - if Gitlab::CurrentSettings.shared_runners_text.present? - = markdown_field(Gitlab::CurrentSettings.current_application_settings, :shared_runners_text) - - else - = _('GitLab Shared Runners execute code of different projects on the same Runner unless you configure GitLab Runner Autoscale with MaxBuilds 1 (which it is on GitLab.com).') += render layout: 'shared/runners/shared_runners_description' do %hr - - if @project.shared_runners_enabled? - = link_to toggle_shared_runners_project_runners_path(@project), class: 'btn btn-close', method: :post do - = _('Disable shared Runners') + - if @project.group&.shared_runners_setting == 'disabled_and_unoverridable' + %h5.gl-text-red-500 + = _('Shared runners disabled on group level') - else - = link_to toggle_shared_runners_project_runners_path(@project), class: 'btn btn-success', method: :post do - = _('Enable shared Runners') -   for this project + - if @project.shared_runners_enabled? + = link_to toggle_shared_runners_project_runners_path(@project), class: 'btn btn-close', method: :post do + = _('Disable shared runners') + - else + = link_to toggle_shared_runners_project_runners_path(@project), class: 'btn btn-success', method: :post do + = _('Enable shared runners') +   for this project - if @shared_runners_count == 0 = _('This GitLab instance does not provide any shared Runners yet. Instance administrators can register shared Runners in the admin area.') diff --git a/app/views/projects/services/mattermost_slash_commands/_installation_info.html.haml b/app/views/projects/services/mattermost_slash_commands/_installation_info.html.haml index aee81ea744a..53ee363de53 100644 --- a/app/views/projects/services/mattermost_slash_commands/_installation_info.html.haml +++ b/app/views/projects/services/mattermost_slash_commands/_installation_info.html.haml @@ -2,6 +2,6 @@ - unless @service.activated? .row .col-sm-9.offset-sm-3 - = link_to new_project_mattermost_path(@project), class: 'btn btn-lg' do + = link_to new_project_mattermost_path(@project), class: 'btn gl-button btn-lg' do = custom_icon('mattermost_logo', size: 15) = s_("MattermostService|Add to Mattermost") diff --git a/app/views/projects/services/prometheus/_configuration_banner.html.haml b/app/views/projects/services/prometheus/_configuration_banner.html.haml index b4e8458d8b9..717df405fa7 100644 --- a/app/views/projects/services/prometheus/_configuration_banner.html.haml +++ b/app/views/projects/services/prometheus/_configuration_banner.html.haml @@ -14,13 +14,13 @@ .col-sm-10 %p.text-success.gl-mt-3 = s_('PrometheusService|Prometheus is being automatically managed on your clusters') - = link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn' + = link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn gl-button' - else .col-sm-2 = image_tag 'illustrations/monitoring/loading.svg' .col-sm-10 %p.gl-mt-3 = s_('PrometheusService|Automatically deploy and configure Prometheus on your clusters to monitor your project’s environments') - = link_to s_('PrometheusService|Install Prometheus on clusters'), project_clusters_path(project), class: 'btn btn-success' + = link_to s_('PrometheusService|Install Prometheus on clusters'), project_clusters_path(project), class: 'btn gl-button btn-success' %hr diff --git a/app/views/projects/services/prometheus/_custom_metrics.html.haml b/app/views/projects/services/prometheus/_custom_metrics.html.haml index 57100282c34..70685a8a9eb 100644 --- a/app/views/projects/services/prometheus/_custom_metrics.html.haml +++ b/app/views/projects/services/prometheus/_custom_metrics.html.haml @@ -13,7 +13,7 @@ -# haml-lint:disable NoPlainNodes %span.badge.badge-pill.js-custom-monitored-count 0 -# haml-lint:enable NoPlainNodes - = link_to s_('PrometheusService|New metric'), new_project_prometheus_metric_path(project), class: 'btn btn-success js-new-metric-button hidden', data: { qa_selector: 'new_metric_button' } + = link_to s_('PrometheusService|New metric'), new_project_prometheus_metric_path(project), class: 'btn gl-button btn-success js-new-metric-button hidden', data: { qa_selector: 'new_metric_button' } .card-body .flash-container.hidden .flash-warning diff --git a/app/views/projects/settings/_archive.html.haml b/app/views/projects/settings/_archive.html.haml index cbeedbd080c..4133129fde2 100644 --- a/app/views/projects/settings/_archive.html.haml +++ b/app/views/projects/settings/_archive.html.haml @@ -13,7 +13,6 @@ method: :post, class: "btn btn-success" - else %p= _("Archiving the project will make it entirely read only. It is hidden from the dashboard and doesn't show up in searches. %{strong_start}The repository cannot be committed to, and no issues, comments, or other entities can be created.%{strong_end}").html_safe % { strong_start: ''.html_safe, strong_end: ''.html_safe } - .gl-display-flex.gl-justify-content-end - = link_to _('Archive project'), archive_project_path(@project), - data: { confirm: _("Are you sure that you want to archive this project?"), qa_selector: 'archive_project_link' }, - method: :post, class: "btn btn-warning" + = link_to _('Archive project'), archive_project_path(@project), + data: { confirm: _("Are you sure that you want to archive this project?"), qa_selector: 'archive_project_link' }, + method: :post, class: "btn btn-warning" diff --git a/app/views/projects/settings/_general.html.haml b/app/views/projects/settings/_general.html.haml index 50f80fd1e2f..5d5f1d54439 100644 --- a/app/views/projects/settings/_general.html.haml +++ b/app/views/projects/settings/_general.html.haml @@ -40,5 +40,4 @@ %hr = link_to _('Remove avatar'), project_avatar_path(@project), data: { confirm: _('Avatar will be removed. Are you sure?')}, method: :delete, class: 'btn btn-link' - .gl-display-flex.gl-justify-content-end - = f.submit _('Save changes'), class: "btn btn-success mt-4 qa-save-naming-topics-avatar-button" + = f.submit _('Save changes'), class: "btn btn-success mt-4 qa-save-naming-topics-avatar-button" diff --git a/app/views/projects/settings/ci_cd/_badge.html.haml b/app/views/projects/settings/ci_cd/_badge.html.haml index 82c8ec088e5..2c3e6387972 100644 --- a/app/views/projects/settings/ci_cd/_badge.html.haml +++ b/app/views/projects/settings/ci_cd/_badge.html.haml @@ -15,18 +15,18 @@ .col-md-2.text-center Markdown .col-md-10.code.js-syntax-highlight - = highlight('.md', badge.to_markdown, language: 'markdown') + = highlight_badge('.md', badge.to_markdown, language: 'markdown') .row %hr .row .col-md-2.text-center HTML .col-md-10.code.js-syntax-highlight - = highlight('.html', badge.to_html, language: 'html') + = highlight_badge('.html', badge.to_html, language: 'html') .row %hr .row .col-md-2.text-center AsciiDoc .col-md-10.code.js-syntax-highlight - = highlight('.adoc', badge.to_asciidoc) + = highlight_badge('.adoc', badge.to_asciidoc) diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index 414a5f264bd..4793e685163 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -90,12 +90,13 @@ .form-group .form-check - = f.check_box :forward_deployment_enabled, { class: 'form-check-input' } - = f.label :forward_deployment_enabled, class: 'form-check-label' do - %strong= _("Skip outdated deployment jobs") - .form-text.text-muted - = _("When a deployment job is successful, skip older deployment jobs that are still pending") - = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'skip-outdated-deployment-jobs'), target: '_blank' + = f.fields_for :ci_cd_settings_attributes, @project.ci_cd_settings do |form| + = form.check_box :forward_deployment_enabled, { class: 'form-check-input' } + = form.label :forward_deployment_enabled, class: 'form-check-label' do + %strong= _("Skip outdated deployment jobs") + .form-text.text-muted + = _("When a deployment job is successful, skip older deployment jobs that are still pending") + = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'skip-outdated-deployment-jobs'), target: '_blank' %hr .form-group diff --git a/app/views/projects/settings/operations/_alert_management.html.haml b/app/views/projects/settings/operations/_alert_management.html.haml index f8f3ecb6273..5c16a5e2758 100644 --- a/app/views/projects/settings/operations/_alert_management.html.haml +++ b/app/views/projects/settings/operations/_alert_management.html.haml @@ -9,6 +9,6 @@ = _('Expand') %p = _('Display alerts from all your monitoring tools directly within GitLab.') - = link_to _('More information'), help_page_path('user/project/operations/alert_management'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('More information'), help_page_path('operations/incident_management/index.md'), target: '_blank', rel: 'noopener noreferrer' .settings-content .js-alerts-settings{ data: alerts_settings_data } diff --git a/app/views/projects/settings/operations/_tracing.html.haml b/app/views/projects/settings/operations/_tracing.html.haml new file mode 100644 index 00000000000..f654c723e36 --- /dev/null +++ b/app/views/projects/settings/operations/_tracing.html.haml @@ -0,0 +1,33 @@ +- setting = tracing_setting +- has_jaeger_url = setting.external_url.present? + +%section.settings.border-0.no-animate + .settings-header{ :class => "border-top" } + %h3{ :class => "h4" } + = _("Jaeger tracing") + %button.btn.gl-button.js-settings-toggle{ type: 'button' } + = _('Expand') + %p + - if has_jaeger_url + - tracing_link = link_to sanitize(setting.external_url, scrubber: Rails::Html::TextOnlyScrubber.new), target: "_blank", rel: 'noopener noreferrer' do + %span + = _('Tracing') + = sprite_icon('external-link', css_class: 'ml-1 vertical-align-middle') + - else + - tracing_link = link_to project_tracing_path(@project) do + %span + = _('Tracing') + = _("To open Jaeger and easily view tracing from GitLab, link the %{link} page to your server").html_safe % { link: tracing_link } + .settings-content + = form_for @project, url: project_settings_operations_path(@project), method: :patch do |f| + = form_errors(@project) + .form-group + = f.fields_for :tracing_setting_attributes, setting do |form| + = form.label :external_url, _('Jaeger URL'), class: 'label-bold' + = form.url_field :external_url, class: 'form-control', placeholder: 'e.g. https://jaeger.mycompany.com' + %p.form-text.text-muted + - jaeger_help_url = "https://www.jaegertracing.io/docs/1.7/getting-started/" + - link_start_tag = ''.html_safe % { url: jaeger_help_url } + - link_end_tag = "#{sprite_icon('external-link', css_class: 'ml-1 vertical-align-middle')}".html_safe + = _("For more information, please review %{link_start_tag}Jaeger's configuration doc%{link_end_tag}").html_safe % { link_start_tag: link_start_tag, link_end_tag: link_end_tag } + = f.submit _('Save changes'), class: 'btn btn-success' diff --git a/app/views/projects/settings/operations/show.html.haml b/app/views/projects/settings/operations/show.html.haml index 103828ee0a0..e5d34ff0fc9 100644 --- a/app/views/projects/settings/operations/show.html.haml +++ b/app/views/projects/settings/operations/show.html.haml @@ -8,5 +8,5 @@ = render 'projects/settings/operations/prometheus', service: prometheus_service if Feature.enabled?(:settings_operations_prometheus_service) = render 'projects/settings/operations/metrics_dashboard' = render 'projects/settings/operations/grafana_integration' -= render_if_exists 'projects/settings/operations/tracing' += render 'projects/settings/operations/tracing' = render_if_exists 'projects/settings/operations/status_page' diff --git a/app/views/projects/snippets/_actions.html.haml b/app/views/projects/snippets/_actions.html.haml deleted file mode 100644 index e4645101765..00000000000 --- a/app/views/projects/snippets/_actions.html.haml +++ /dev/null @@ -1,36 +0,0 @@ -- return unless current_user - -.d-none.d-sm-block - - if can?(current_user, :update_snippet, @snippet) - = link_to edit_project_snippet_path(@project, @snippet), class: "btn btn-grouped" do - = _('Edit') - - if can?(current_user, :admin_snippet, @snippet) - = link_to project_snippet_path(@project, @snippet), method: :delete, data: { confirm: _("Are you sure?") }, class: "btn btn-grouped btn-inverted btn-remove", title: _('Delete Snippet') do - = _('Delete') - - if can?(current_user, :create_snippet, @project) - = link_to new_project_snippet_path(@project), class: 'btn btn-grouped btn-inverted btn-success', title: _("New snippet") do - = _('New snippet') - - if @snippet.submittable_as_spam_by?(current_user) - = link_to _('Submit as spam'), mark_as_spam_project_snippet_path(@project, @snippet), method: :post, class: 'btn btn-grouped btn-spam', title: _('Submit as spam') -- if can?(current_user, :create_snippet, @project) || can?(current_user, :update_snippet, @snippet) - .d-block.d-sm-none.dropdown - %button.btn.btn-default.btn-block.gl-mb-0.gl-mt-2{ data: { toggle: "dropdown" } } - = _('Options') - = icon('caret-down') - .dropdown-menu.dropdown-menu-full-width - %ul - - if can?(current_user, :create_snippet, @project) - %li - = link_to new_project_snippet_path(@project), title: _("New snippet") do - = _('New snippet') - - if can?(current_user, :admin_snippet, @snippet) - %li - = link_to project_snippet_path(@project, @snippet), method: :delete, data: { confirm: _("Are you sure?") }, title: _('Delete Snippet') do - = _('Delete') - - if can?(current_user, :update_snippet, @snippet) - %li - = link_to edit_project_snippet_path(@project, @snippet) do - = _('Edit') - - if @snippet.submittable_as_spam_by?(current_user) - %li - = link_to _('Submit as spam'), mark_as_spam_project_snippet_path(@project, @snippet), method: :post diff --git a/app/views/projects/snippets/show.html.haml b/app/views/projects/snippets/show.html.haml index 7cf5de8947c..726ab7d2372 100644 --- a/app/views/projects/snippets/show.html.haml +++ b/app/views/projects/snippets/show.html.haml @@ -3,13 +3,7 @@ - breadcrumb_title @snippet.to_reference - page_title "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets") -- if Feature.enabled?(:snippets_vue, default_enabled: true) - #js-snippet-view{ data: {'qa-selector': 'snippet_view', 'snippet-gid': @snippet.to_global_id} } -- else - = render 'shared/snippets/header' - - .project-snippets - = render 'shared/snippets/blob', blob: @blob +#js-snippet-view{ data: {'qa-selector': 'snippet_view', 'snippet-gid': @snippet.to_global_id} } .row-content-block.top-block.content-component-block = render 'award_emoji/awards_block', awardable: @snippet, inline: true diff --git a/app/views/projects/starrers/index.html.haml b/app/views/projects/starrers/index.html.haml index 97996562e2c..7c8314c157d 100644 --- a/app/views/projects/starrers/index.html.haml +++ b/app/views/projects/starrers/index.html.haml @@ -11,7 +11,7 @@ .position-relative = search_field_tag :search, params[:search], { placeholder: _('Search'), class: 'form-control', spellcheck: false } %button.user-search-btn{ type: "submit", "aria-label" => _("Submit search") } - = icon("search") + = sprite_icon('search') .dropdown.inline.user-sort-dropdown = dropdown_toggle(starrers_sort_options_hash[@sort], { toggle: 'dropdown' }) %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml index dba9b20fcff..d7231e758c7 100644 --- a/app/views/projects/tags/_tag.html.haml +++ b/app/views/projects/tags/_tag.html.haml @@ -1,6 +1,7 @@ - commit = @repository.commit(tag.dereferenced_target) - release = @releases.find { |release| release.tag == tag.name } -%li.flex-row.allow-wrap + +%li.flex-row.allow-wrap.js-tag-list .row-main-content = sprite_icon('tag') = link_to tag.name, project_tag_path(@project, tag.name), class: 'item-title ref-name' @@ -24,7 +25,7 @@ .text-secondary = sprite_icon("rocket", size: 12) = _("Release") - = link_to release.name, project_releases_path(@project, anchor: release.tag), class: 'tag-release-link' + = link_to release.name, project_releases_path(@project, anchor: release.tag), class: 'gl-text-blue-600!' - if release.description.present? .md.gl-mt-3 = markdown_field(release, :description) @@ -38,5 +39,4 @@ - if can?(current_user, :admin_tag, @project) = link_to edit_project_tag_release_path(@project, tag.name), class: 'btn btn-edit has-tooltip', title: s_('TagsPage|Edit release notes'), data: { container: "body" } do = sprite_icon("pencil") - = link_to project_tag_path(@project, tag.name), class: "btn btn-remove remove-row has-tooltip gl-ml-3 #{protected_tag?(@project, tag) ? 'disabled' : ''}", title: s_('TagsPage|Delete tag'), method: :delete, data: { confirm: s_('TagsPage|Deleting the %{tag_name} tag cannot be undone. Are you sure?') % { tag_name: tag.name }, container: 'body' }, remote: true do - = sprite_icon("remove") + = render 'projects/buttons/remove_tag', project: @project, tag: tag diff --git a/app/views/projects/tags/destroy.js.haml b/app/views/projects/tags/destroy.js.haml deleted file mode 100644 index 59d359bbf10..00000000000 --- a/app/views/projects/tags/destroy.js.haml +++ /dev/null @@ -1,4 +0,0 @@ -- if @error.present? - new Flash({ message: '#{escape_javascript(@error)}', type: 'alert' }); -- elsif @repository.tags.empty? - $('.tags').load(document.URL + ' .nothing-here-block').hide().fadeIn(1000) diff --git a/app/views/projects/tags/show.html.haml b/app/views/projects/tags/show.html.haml index 25a560da5c6..d726d2ab233 100644 --- a/app/views/projects/tags/show.html.haml +++ b/app/views/projects/tags/show.html.haml @@ -52,8 +52,7 @@ = render 'projects/buttons/download', project: @project, ref: @tag.name - if can?(current_user, :admin_tag, @project) .btn-container.controls-item-full - = link_to project_tag_path(@project, @tag.name), class: "btn btn-icon btn-danger gl-button remove-row has-tooltip #{protected_tag?(@project, @tag) ? 'disabled' : ''}", title: s_('TagsPage|Delete tag'), method: :delete, data: { confirm: s_('TagsPage|Deleting the %{tag_name} tag cannot be undone. Are you sure?') % { tag_name: @tag.name } } do - = sprite_icon('remove', css_class: 'gl-icon') + = 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/tracings/_tracing_button.html.haml b/app/views/projects/tracings/_tracing_button.html.haml new file mode 100644 index 00000000000..c9a6afd3761 --- /dev/null +++ b/app/views/projects/tracings/_tracing_button.html.haml @@ -0,0 +1,2 @@ += link_to project_settings_operations_path(@project), title: _('Configure Tracing'), class: 'btn btn-success' do + = _('Add Jaeger URL') diff --git a/app/views/projects/tracings/show.html.haml b/app/views/projects/tracings/show.html.haml new file mode 100644 index 00000000000..8c9bffc81bf --- /dev/null +++ b/app/views/projects/tracings/show.html.haml @@ -0,0 +1,33 @@ +- @content_class = "limit-container-width" unless fluid_layout +- page_title _("Tracing") + +- if @project.tracing_external_url.present? + %h3.page-title= _('Tracing') + .gl-alert.gl-alert-info.alert.flex-alert + = sprite_icon('information-o', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .alert-message + = _("Your password isn't required to view this page. If a password or any other personal details are requested, please contact your administrator to report abuse.") + - jaeger_link = link_to('Jaeger tracing', 'https://www.jaegertracing.io/', target: "_blank", rel: "noreferrer") + %p.light= _("GitLab uses %{jaeger_link} to monitor distributed systems.").html_safe % { jaeger_link: jaeger_link } + + + .card + - iframe_permissions = "allow-forms allow-scripts allow-same-origin allow-popups" + %iframe.border-0{ src: sanitize(@project.tracing_external_url, scrubber: Rails::Html::TextOnlyScrubber.new), width: '100%', height: 970, sandbox: iframe_permissions } +- else + .row.empty-state + .col-12 + .svg-content + = image_tag 'illustrations/monitoring/tracing.svg' + + .col-12 + .text-content + %h4.text-left= _('Troubleshoot and monitor your application with tracing') + %p + - jaeger_help_url = "https://www.jaegertracing.io/docs/1.7/getting-started/" + - link_start_tag = ''.html_safe % { url: jaeger_help_url } + - link_end_tag = "#{sprite_icon('external-link', css_class: 'ml-1 vertical-align-middle')}".html_safe + = _('To get started, link this page to your Jaeger server, or find out how to %{link_start_tag}install Jaeger%{link_end_tag}').html_safe % { link_start_tag: link_start_tag, link_end_tag: link_end_tag } + + .text-center + = render 'tracing_button' diff --git a/app/views/projects/tree/_tree_header.html.haml b/app/views/projects/tree/_tree_header.html.haml index 268858f8ff8..dc9fb9e7792 100644 --- a/app/views/projects/tree/_tree_header.html.haml +++ b/app/views/projects/tree/_tree_header.html.haml @@ -1,7 +1,3 @@ -- can_collaborate = can_collaborate_with_project?(@project) -- can_create_mr_from_fork = can?(current_user, :fork_project, @project) && can?(current_user, :create_merge_request_in, @project) -- can_visit_ide = can_collaborate || current_user&.already_forked?(@project) - .tree-ref-container .tree-ref-holder = render 'shared/ref_switcher', destination: 'tree', path: @path, show_create: true @@ -14,13 +10,7 @@ #js-tree-history-link.d-inline-block{ data: { history_link: project_commits_path(@project, @ref) } } = render 'projects/find_file_link' - - - if can_visit_ide || can_create_mr_from_fork - #js-tree-web-ide-link.d-inline-block{ data: { options: vue_ide_link_data(@project, @ref).to_json } } - - if !can_visit_ide - = render 'shared/confirm_fork_modal', fork_path: ide_fork_and_edit_path(@project, @ref, @path) - - unless current_user&.gitpod_enabled - = render 'shared/gitpod/enable_gitpod_modal' + = render 'shared/web_ide_button', blob: nil - if show_xcode_link?(@project) .project-action-button.project-xcode.inline< diff --git a/app/views/projects/tree/show.html.haml b/app/views/projects/tree/show.html.haml index 3dd12a7b641..4d8c357cee1 100644 --- a/app/views/projects/tree/show.html.haml +++ b/app/views/projects/tree/show.html.haml @@ -1,3 +1,5 @@ +- current_route_path = request.fullpath.match(/-\/tree\/[^\/]+\/(.+$)/).to_a[1] +- add_page_startup_graphql_call('repository/path_last_commit', { projectPath: @project.full_path, ref: current_ref, path: current_route_path }) - breadcrumb_title _("Repository") - @content_class = "limit-container-width" unless fluid_layout diff --git a/app/views/projects/triggers/_index.html.haml b/app/views/projects/triggers/_index.html.haml index 4e097f345c2..4f39c839630 100644 --- a/app/views/projects/triggers/_index.html.haml +++ b/app/views/projects/triggers/_index.html.haml @@ -6,23 +6,26 @@ .card-body = render "projects/triggers/form", btn_text: "Add trigger" %hr - - if @triggers.any? - .table-responsive.triggers-list - %table.table - %thead - %th - %strong Token - %th - %strong Description - %th - %strong Owner - %th - %strong Last used - %th - = render partial: 'projects/triggers/trigger', collection: @triggers, as: :trigger + - if Feature.enabled?(:ci_pipeline_triggers_settings_vue_ui, @project) + #js-ci-pipeline-triggers-list.triggers-list{ data: { triggers: @triggers_json } } - else - %p.settings-message.text-center.gl-mb-3 - No triggers have been created yet. Add one using the form above. + - if @triggers.any? + .table-responsive.triggers-list + %table.table + %thead + %th + %strong Token + %th + %strong Description + %th + %strong Owner + %th + %strong Last used + %th + = render partial: 'projects/triggers/trigger', collection: @triggers, as: :trigger + - else + %p.settings-message.text-center.gl-mb-3{ data: { testid: 'no_triggers_content' } } + No triggers have been created yet. Add one using the form above. .card-footer diff --git a/app/views/projects/triggers/_trigger.html.haml b/app/views/projects/triggers/_trigger.html.haml index 579b8ba2766..b25199b405a 100644 --- a/app/views/projects/triggers/_trigger.html.haml +++ b/app/views/projects/triggers/_trigger.html.haml @@ -2,7 +2,7 @@ %td - if trigger.has_token_exposed? %span= trigger.token - = clipboard_button(text: trigger.token, title: _("Copy trigger token")) + = clipboard_button(text: trigger.token, title: _("Copy trigger token"), testid: 'clipboard-btn') - else %span= trigger.short_token @@ -33,5 +33,5 @@ = link_to edit_project_trigger_path(@project, trigger), method: :get, title: "Edit", class: "btn btn-default btn-sm" do = sprite_icon('pencil') - if can?(current_user, :manage_trigger, trigger) - = link_to project_trigger_path(@project, trigger), data: { confirm: revoke_trigger_confirmation }, method: :delete, title: "Revoke", class: "btn btn-default btn-warning btn-sm btn-trigger-revoke" do + = link_to project_trigger_path(@project, trigger), data: { confirm: revoke_trigger_confirmation, testid: 'trigger_revoke_button' }, method: :delete, title: "Revoke", class: "btn btn-default btn-warning btn-sm btn-trigger-revoke" do = sprite_icon('remove') diff --git a/app/views/projects/wikis/git_access.html.haml b/app/views/projects/wikis/git_access.html.haml index 1db4554541d..c166642bae2 100644 --- a/app/views/projects/wikis/git_access.html.haml +++ b/app/views/projects/wikis/git_access.html.haml @@ -1,5 +1,6 @@ - @content_class = "limit-container-width" unless fluid_layout - page_title s_("WikiClone|Git Access"), _("Wiki") +- add_page_specific_style 'page_bundles/wiki' .wiki-page-header.top-area.has-sidebar-toggle.py-3.flex-column.flex-lg-row = wiki_sidebar_toggle_button -- cgit v1.2.3