From 2c802bb67acd636ad0a653d24922587b630ebba7 Mon Sep 17 00:00:00 2001 From: Sascha Eggenberger Date: Fri, 11 Aug 2023 12:26:00 +0200 Subject: [PATCH] Advanced project settings: Use GlCard Changelog: changed --- app/views/projects/_export.html.haml | 59 +++++++++-------- app/views/projects/_remove.html.haml | 18 ++++-- app/views/projects/_remove_fork.html.haml | 18 ++++-- app/views/projects/_transfer.html.haml | 42 +++++++----- app/views/projects/edit.html.haml | 64 +++++++++++-------- .../projects/settings/_archive.html.haml | 32 ++++++---- ee/app/views/projects/_remove.html.haml | 24 ++++--- .../settings/_permanently_delete.html.haml | 12 ++-- 8 files changed, 156 insertions(+), 113 deletions(-) diff --git a/app/views/projects/_export.html.haml b/app/views/projects/_export.html.haml index 3ef2c722e98beb..20fb2b43c636fe 100644 --- a/app/views/projects/_export.html.haml +++ b/app/views/projects/_export.html.haml @@ -2,30 +2,35 @@ - project = local_assigns.fetch(:project) -.sub-section{ data: { qa_selector: 'export_project_content' } } - %h4= _('Export project') - - link_start = ''.html_safe % { url: help_page_path('user/project/settings/import_export') } - %p= _('Export this project with all its related data in order to move it to a new GitLab instance. When the exported file is ready, you can download it from this page or from the download link in the email notification you will receive. You can then import it when creating a new project. %{link_start}Learn more.%{link_end}').html_safe % { link_start: link_start, link_end: ''.html_safe } - %p.gl-mb-0 - %p= _('The following items will be exported:') - %ul - - project_export_descriptions.each do |desc| - %li= desc - %p= _('The following items will NOT be exported:') - %ul - %li= _('Job logs and artifacts') - %li= _('Container registry images') - %li= _('CI variables') - %li= _('Pipeline triggers') - %li= _('Webhooks') - %li= _('Any encrypted tokens') - - if project.export_status == :finished - = render Pajamas::ButtonComponent.new(href: download_export_project_path(project), - method: :get, - button_options: { ref: 'nofollow', download: '', data: { qa_selector: 'download_export_link' } }) do - = _('Download export') - = render Pajamas::ButtonComponent.new(href: generate_new_export_project_path(project), method: :post) do - = _('Generate new export') - - else - = render Pajamas::ButtonComponent.new(href: export_project_path(project), method: :post, button_options: { data: { qa_selector: 'export_project_link' } }) do - = _('Export project') += render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card', data: { qa_selector: 'export_project_content' } }, header_options: { class: 'gl-new-card-header' }, body_options: { class: 'gl-new-card-body gl-px-5 gl-py-4' }) do |c| + - c.with_header do + .gl-new-card-title-wrapper + %h4.gl-new-card-title= _('Export project') + + - c.with_body do + %p + - link_start = ''.html_safe % { url: help_page_path('user/project/settings/import_export') } + = _('Export this project with all its related data in order to move it to a new GitLab instance. When the exported file is ready, you can download it from this page or from the download link in the email notification you will receive. You can then import it when creating a new project. %{link_start}Learn more.%{link_end}').html_safe % { link_start: link_start, link_end: ''.html_safe } + .gl-mb-0 + %p.gl-font-weight-bold= _('The following items will be exported:') + %ul + - project_export_descriptions.each do |desc| + %li= desc + %p.gl-font-weight-bold= _('The following items will NOT be exported:') + %ul + %li= _('Job logs and artifacts') + %li= _('Container registry images') + %li= _('CI variables') + %li= _('Pipeline triggers') + %li= _('Webhooks') + %li= _('Any encrypted tokens') + - if project.export_status == :finished + = render Pajamas::ButtonComponent.new(href: download_export_project_path(project), + method: :get, + button_options: { ref: 'nofollow', download: '', data: { qa_selector: 'download_export_link' } }) do + = _('Download export') + = render Pajamas::ButtonComponent.new(href: generate_new_export_project_path(project), method: :post) do + = _('Generate new export') + - else + = render Pajamas::ButtonComponent.new(href: export_project_path(project), method: :post, button_options: { data: { qa_selector: 'export_project_link' } }) do + = _('Export project') diff --git a/app/views/projects/_remove.html.haml b/app/views/projects/_remove.html.haml index dec3199ffe15d0..12b310f8ba0d5c 100644 --- a/app/views/projects/_remove.html.haml +++ b/app/views/projects/_remove.html.haml @@ -3,10 +3,14 @@ - issues_count = Projects::AllIssuesCountService.new(project).count - forks_count = Projects::ForksCountService.new(project).count -.sub-section - %h4.danger-title= _('Delete project') - %p - %strong= _('Deleting the project will delete its repository and all related resources, including issues and merge requests.') - %p - %strong= _('Deleted projects cannot be restored!') - #js-project-delete-button{ data: { form_path: project_path(project), confirm_phrase: delete_confirm_phrase(project), is_fork: project.forked?.to_s, issues_count: number_with_delimiter(issues_count), merge_requests_count: number_with_delimiter(merge_requests_count), forks_count: number_with_delimiter(forks_count), stars_count: number_with_delimiter(project.star_count) } } += render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card' }, header_options: { class: 'gl-new-card-header gl-flex-direction-column' }, body_options: { class: 'gl-new-card-body gl-bg-red-50 gl-px-5 gl-py-4' }) do |c| + - c.with_header do + .gl-new-card-title-wrapper + %h4.gl-new-card-title.danger-title= _('Delete project') + + - c.with_body do + %p + %strong= _('Deleting the project will delete its repository and all related resources, including issues and merge requests.') + %p + %strong= _('Deleted projects cannot be restored!') + #js-project-delete-button{ data: { form_path: project_path(project), confirm_phrase: delete_confirm_phrase(project), is_fork: project.forked?.to_s, issues_count: number_with_delimiter(issues_count), merge_requests_count: number_with_delimiter(merge_requests_count), forks_count: number_with_delimiter(forks_count), stars_count: number_with_delimiter(project.star_count) } } diff --git a/app/views/projects/_remove_fork.html.haml b/app/views/projects/_remove_fork.html.haml index 260c2b2272e4eb..2db78d0f62a314 100644 --- a/app/views/projects/_remove_fork.html.haml +++ b/app/views/projects/_remove_fork.html.haml @@ -1,11 +1,15 @@ - return unless @project.forked? && can?(current_user, :remove_fork_project, @project) - remove_form_id = "js-remove-project-fork-form" -.sub-section - %h4.danger-title= _('Remove fork relationship') - %p= remove_fork_project_description_message(@project) += render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card' }, header_options: { class: 'gl-new-card-header gl-flex-direction-column' }, body_options: { class: 'gl-new-card-body gl-px-5 gl-py-4' }) do |c| + - c.with_header do + .gl-new-card-title-wrapper + %h4.gl-new-card-title.danger-title= _('Remove fork relationship') + %p.gl-new-card-description + = remove_fork_project_description_message(@project) - = form_for @project, url: remove_fork_project_path(@project), method: :delete, html: { id: remove_form_id } do |f| - %p - %strong= _('After it is removed, the fork relationship can only be restored by using the API. This project will no longer be able to receive or send merge requests to the upstream project or other forks.') - .js-confirm-danger{ data: remove_fork_project_confirm_json(@project, remove_form_id) } + - c.with_body do + = form_for @project, url: remove_fork_project_path(@project), method: :delete, html: { id: remove_form_id } do |f| + %p + %strong= _('After it is removed, the fork relationship can only be restored by using the API. This project will no longer be able to receive or send merge requests to the upstream project or other forks.') + .js-confirm-danger{ data: remove_fork_project_confirm_json(@project, remove_form_id) } diff --git a/app/views/projects/_transfer.html.haml b/app/views/projects/_transfer.html.haml index 93fc8d12960650..fe84a83c43c3c8 100644 --- a/app/views/projects/_transfer.html.haml +++ b/app/views/projects/_transfer.html.haml @@ -3,21 +3,29 @@ - hidden_input_id = "new_namespace_id" - initial_data = { button_text: s_('ProjectSettings|Transfer project'), confirm_danger_message: transfer_project_message(@project), phrase: @project.name, target_form_id: form_id, target_hidden_input_id: hidden_input_id, project_id: @project.id } -.sub-section{ data: { qa_selector: 'transfer_project_content' } } - %h4.danger-title= _('Transfer project') - = form_for @project, url: transfer_project_path(@project), method: :put, html: { class: 'js-project-transfer-form', id: form_id } do |f| - .form-group += render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card', data: { qa_selector: 'transfer_project_content' } }, header_options: { class: 'gl-new-card-header gl-flex-direction-column' }, body_options: { class: 'gl-new-card-body gl-px-5 gl-py-4' }) do |c| + - c.with_header do + .gl-new-card-title-wrapper + %h4.gl-new-card-title.warning-title= _('Transfer project') + %p.gl-new-card-description - link_start = ''.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'transfer-a-project-to-another-namespace') } - %p= _("Transfer your project into another namespace. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: ''.html_safe } - %p= _('When you transfer your project to a group, you can easily manage multiple projects, view usage quotas for storage, pipeline minutes, and users, and start a trial or upgrade to a paid tier.') - %p - = _("Don't have a group?") - = link_to _('Create one'), new_group_path, target: '_blank' - = _('Things to be aware of before transferring:') - %ul - %li= _("Be careful. Changing the project's namespace can have unintended side effects.") - %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.') - = hidden_field_tag(hidden_input_id) - .js-transfer-project-form{ data: initial_data } + = _("Transfer your project into another namespace. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: ''.html_safe } + + - c.with_body do + = form_for @project, url: transfer_project_path(@project), method: :put, html: { class: 'js-project-transfer-form', id: form_id } do |f| + .form-group.gl-mb-0 + %p + - link_start = ''.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'rename-a-repository') } + = _("A project’s repository name defines its URL (the one you use to access the project via a browser) and its place on the file disk where GitLab is installed. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: ''.html_safe } + %p= _('When you transfer your project to a group, you can easily manage multiple projects, view usage quotas for storage, pipeline minutes, and users, and start a trial or upgrade to a paid tier.') + %p + = _("Don't have a group?") + = link_to _('Create one'), new_group_path, target: '_blank' + %p.gl-font-weight-bold= _('Things to be aware of before transferring:') + %ul + %li= _("Be careful. Changing the project's namespace can have unintended side effects.") + %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.') + = hidden_field_tag(hidden_input_id) + .js-transfer-project-form{ data: initial_data } diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index b9149bbd7b3d60..b18c36ab5227e0 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -68,39 +68,49 @@ .settings-content = render_if_exists 'projects/settings/restore', project: @project - .sub-section - %h4= _('Housekeeping') - %p - = _('Runs a number of housekeeping tasks within the current repository, such as compressing file revisions and removing unreachable objects.') - = link_to _('Learn more.'), help_page_path('administration/housekeeping'), target: '_blank', rel: 'noopener noreferrer' - .gl-display-flex.gl-flex-wrap.gl-gap-3 - = render Pajamas::ButtonComponent.new(method: :post, href: housekeeping_project_path(@project)) do - = _('Run housekeeping') - #js-project-prune-unreachable-objects-button{ data: { prune_objects_path: housekeeping_project_path(@project, prune: true), prune_objects_doc_path: help_page_path('administration/housekeeping', anchor: 'prune-unreachable-objects') } } + = render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card gl-mt-0' }, header_options: { class: 'gl-new-card-header gl-flex-direction-column' }, body_options: { class: 'gl-new-card-body gl-px-5 gl-py-4' }) do |c| + - c.with_header do + .gl-new-card-title-wrapper + %h4.gl-new-card-title= _('Housekeeping') + %p.gl-new-card-description + = _('Runs a number of housekeeping tasks within the current repository, such as compressing file revisions and removing unreachable objects.') + = link_to _('Learn more.'), help_page_path('administration/housekeeping'), target: '_blank', rel: 'noopener noreferrer' + + - c.with_body do + .gl-display-flex.gl-flex-wrap.gl-gap-3 + = render Pajamas::ButtonComponent.new(method: :post, href: housekeeping_project_path(@project)) do + = _('Run housekeeping') + #js-project-prune-unreachable-objects-button{ data: { prune_objects_path: housekeeping_project_path(@project, prune: true), prune_objects_doc_path: help_page_path('administration/housekeeping', anchor: 'prune-unreachable-objects') } } = render 'export', project: @project = render_if_exists 'projects/settings/archive' - .sub-section.rename-repository - %h4.warning-title= _('Change path') - = render 'projects/errors' - = gitlab_ui_form_for @project do |f| - .form-group + + = render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card rename-repository' }, header_options: { class: 'gl-new-card-header gl-flex-direction-column' }, body_options: { class: 'gl-new-card-body gl-px-5 gl-py-4' }) do |c| + - c.with_header do + .gl-new-card-title-wrapper + %h4.gl-new-card-title.warning-title= _('Change path') + %p.gl-new-card-description - link_start = ''.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'rename-a-repository') } - %p= _("A project’s repository name defines its URL (the one you use to access the project via a browser) and its place on the file disk where GitLab is installed. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: ''.html_safe } - %ul - %li= _("Be careful. Renaming a project's repository can have unintended side effects.") - %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.') - = f.label :path, _('Path'), class: 'label-bold' + = _("A project’s repository name defines its URL (the one you use to access the project via a browser) and its place on the file disk where GitLab is installed. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: ''.html_safe } + + - c.with_body do + = render 'projects/errors' + = gitlab_ui_form_for @project do |f| .form-group - .input-group - .input-group-prepend - .input-group-text - #{Gitlab::Utils.append_path(root_url, @project.namespace.full_path)}/ - = f.text_field :path, class: 'form-control', data: { qa_selector: 'project_path_field' } - = f.submit _('Change path'), class: "btn-danger", data: { qa_selector: 'change_path_button' }, pajamas_button: true + %p + %span.gl-font-weight-bold= _("Be careful. Renaming a project's repository can have unintended side effects.") + = _('You will need to update your local repositories to point to the new location.') + - if @project.deployment_platform.present? + %p= _('Your deployment services will be broken, you will need to manually fix the services after renaming.') + = f.label :path, _('Path'), class: 'label-bold' + .form-group + .input-group + .input-group-prepend + .input-group-text + #{Gitlab::Utils.append_path(root_url, @project.namespace.full_path)}/ + = f.text_field :path, class: 'form-control', data: { qa_selector: 'project_path_field' } + = f.submit _('Change path'), class: "btn-danger", data: { qa_selector: 'change_path_button' }, pajamas_button: true = render 'transfer', project: @project diff --git a/app/views/projects/settings/_archive.html.haml b/app/views/projects/settings/_archive.html.haml index 05685c26ac52f9..e7da3177cde2e3 100644 --- a/app/views/projects/settings/_archive.html.haml +++ b/app/views/projects/settings/_archive.html.haml @@ -1,18 +1,22 @@ - return unless can?(current_user, :archive_project, @project) -.sub-section - %h4.warning-title += render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card', data: { qa_selector: 'export_project_content' } }, header_options: { class: 'gl-new-card-header gl-flex-direction-column' }, body_options: { class: 'gl-new-card-body gl-px-5 gl-py-4' }) do |c| + - c.with_header do + .gl-new-card-title-wrapper + %h4.gl-new-card-title.warning-title + - if @project.archived? + = _('Unarchive project') + - else + = _('Archive project') + + - c.with_body do - if @project.archived? - = _('Unarchive project') + - link_start = ''.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'unarchive-a-project') } + %p= _("Unarchiving the project restores its members' ability to make commits, and create issues, comments, and other entities. %{strong_start}After you unarchive the project, it displays in the search and on the dashboard.%{strong_end} %{link_start}Learn more.%{link_end}").html_safe % { strong_start: ''.html_safe, strong_end: ''.html_safe, link_start: link_start, link_end: ''.html_safe } + = render Pajamas::ButtonComponent.new(method: :post, href: unarchive_project_path(@project), variant: :confirm, button_options: { aria: { label: _('Unarchive project') }, data: { confirm: _("Are you sure that you want to unarchive this project?"), qa_selector: 'unarchive_project_link' } }) do + = _('Unarchive project') - else - = _('Archive project') - - if @project.archived? - - link_start = ''.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'unarchive-a-project') } - %p= _("Unarchiving the project restores its members' ability to make commits, and create issues, comments, and other entities. %{strong_start}After you unarchive the project, it displays in the search and on the dashboard.%{strong_end} %{link_start}Learn more.%{link_end}").html_safe % { strong_start: ''.html_safe, strong_end: ''.html_safe, link_start: link_start, link_end: ''.html_safe } - = render Pajamas::ButtonComponent.new(method: :post, href: unarchive_project_path(@project), variant: :confirm, button_options: { aria: { label: _('Unarchive project') }, data: { confirm: _("Are you sure that you want to unarchive this project?"), qa_selector: 'unarchive_project_link' } }) do - = _('Unarchive project') - - else - - link_start = ''.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'archive-a-project') } - %p= _("Archiving the project makes it entirely read-only. It is hidden from the dashboard and doesn't display in searches. %{strong_start}The repository cannot be committed to, and no issues, comments, or other entities can be created.%{strong_end} %{link_start}Learn more.%{link_end}").html_safe % { strong_start: ''.html_safe, strong_end: ''.html_safe, link_start: link_start, link_end: ''.html_safe } - = render Pajamas::ButtonComponent.new(method: :post, href: archive_project_path(@project), variant: :confirm, button_options: { aria: { label: _('Archive project') }, data: { confirm: _("Are you sure that you want to archive this project?"), qa_selector: 'archive_project_link', 'confirm-btn-variant': 'confirm' } }) do - = _('Archive project') + - link_start = ''.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'archive-a-project') } + %p= _("Archiving the project makes it entirely read-only. It is hidden from the dashboard and doesn't display in searches. %{strong_start}The repository cannot be committed to, and no issues, comments, or other entities can be created.%{strong_end} %{link_start}Learn more.%{link_end}").html_safe % { strong_start: ''.html_safe, strong_end: ''.html_safe, link_start: link_start, link_end: ''.html_safe } + = render Pajamas::ButtonComponent.new(method: :post, href: archive_project_path(@project), variant: :confirm, button_options: { aria: { label: _('Archive project') }, data: { confirm: _("Are you sure that you want to archive this project?"), qa_selector: 'archive_project_link', 'confirm-btn-variant': 'confirm' } }) do + = _('Archive project') diff --git a/ee/app/views/projects/_remove.html.haml b/ee/app/views/projects/_remove.html.haml index 15049a60b54091..0b64210cf273df 100644 --- a/ee/app/views/projects/_remove.html.haml +++ b/ee/app/views/projects/_remove.html.haml @@ -8,16 +8,20 @@ - forks_count = Projects::ForksCountService.new(project).count - unless project.marked_for_deletion? - .gl-bg-red-50.gl-inset-border-l-3-red-600.gl-py-5.gl-px-6 - %h4.gl-font-lg.gl-mt-0= _('Delete this project') - - if delayed_deletion && can_delay_project_deletions - = render 'projects/settings/marked_for_removal' - - else - %p= permanent_delete_message(project) + = render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card' }, header_options: { class: 'gl-new-card-header gl-flex-direction-column' }, body_options: { class: 'gl-new-card-body gl-bg-red-50 gl-px-5 gl-py-4' }) do |c| + - c.with_header do + .gl-new-card-title-wrapper + %h4.gl-new-card-title.danger-title= _('Delete this project') - - if delayed_deletion && project.feature_available?(:adjourned_deletion_for_projects_and_groups) - #js-project-delayed-delete-button{ data: { restore_help_path: restore_help_path, delayed_deletion_date: delayed_date, form_path: project_path(project), confirm_phrase: delete_confirm_phrase(project), is_fork: project.forked?.to_s, issues_count: number_with_delimiter(issues_count), merge_requests_count: number_with_delimiter(merge_requests_count), forks_count: number_with_delimiter(forks_count), stars_count: number_with_delimiter(project.star_count) } } - - else - #js-project-delete-button{ data: { form_path: project_path(project), confirm_phrase: delete_confirm_phrase(project), is_fork: project.forked?.to_s, issues_count: number_with_delimiter(issues_count), merge_requests_count: number_with_delimiter(merge_requests_count), forks_count: number_with_delimiter(forks_count), stars_count: number_with_delimiter(project.star_count) } } + - c.with_body do + - if delayed_deletion && can_delay_project_deletions + = render 'projects/settings/marked_for_removal' + - else + %p= permanent_delete_message(project) + + - if delayed_deletion && project.feature_available?(:adjourned_deletion_for_projects_and_groups) + #js-project-delayed-delete-button{ data: { restore_help_path: restore_help_path, delayed_deletion_date: delayed_date, form_path: project_path(project), confirm_phrase: delete_confirm_phrase(project), is_fork: project.forked?.to_s, issues_count: number_with_delimiter(issues_count), merge_requests_count: number_with_delimiter(merge_requests_count), forks_count: number_with_delimiter(forks_count), stars_count: number_with_delimiter(project.star_count) } } + - else + #js-project-delete-button{ data: { form_path: project_path(project), confirm_phrase: delete_confirm_phrase(project), is_fork: project.forked?.to_s, issues_count: number_with_delimiter(issues_count), merge_requests_count: number_with_delimiter(merge_requests_count), forks_count: number_with_delimiter(forks_count), stars_count: number_with_delimiter(project.star_count) } } - else = render 'projects/settings/permanently_delete', project: project diff --git a/ee/app/views/projects/settings/_permanently_delete.html.haml b/ee/app/views/projects/settings/_permanently_delete.html.haml index a618918a3f0d1b..3d436bf243e092 100644 --- a/ee/app/views/projects/settings/_permanently_delete.html.haml +++ b/ee/app/views/projects/settings/_permanently_delete.html.haml @@ -2,7 +2,11 @@ - issues_count = Projects::AllIssuesCountService.new(project).count - forks_count = Projects::ForksCountService.new(project).count -.gl-bg-red-50.gl-inset-border-l-3-red-600.gl-py-5.gl-px-6 - %h4.gl-font-lg.gl-mt-0= _('Delete this project') - %p= permanent_delete_message(project) - #js-project-delete-button{ data: { form_path: project_path(project, permanently_delete: true), confirm_phrase: delete_confirm_phrase(project), is_fork: project.forked?.to_s, issues_count: number_with_delimiter(issues_count), merge_requests_count: number_with_delimiter(merge_requests_count), forks_count: number_with_delimiter(forks_count), stars_count: number_with_delimiter(project.star_count) } } += render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card' }, header_options: { class: 'gl-new-card-header gl-flex-direction-column' }, body_options: { class: 'gl-new-card-body gl-bg-red-50 gl-px-5 gl-py-4' }) do |c| + - c.with_header do + .gl-new-card-title-wrapper + %h4.gl-new-card-title.danger-title= _('Delete this project') + + - c.with_body do + %p= permanent_delete_message(project) + #js-project-delete-button{ data: { form_path: project_path(project, permanently_delete: true), confirm_phrase: delete_confirm_phrase(project), is_fork: project.forked?.to_s, issues_count: number_with_delimiter(issues_count), merge_requests_count: number_with_delimiter(merge_requests_count), forks_count: number_with_delimiter(forks_count), stars_count: number_with_delimiter(project.star_count) } } -- GitLab