Commit 05503faf authored by Robert Hunt's avatar Robert Hunt

Restyle project deletion and restoration containers

Changed the project deletion container to use a new danger UI and
updated the project restoration container to use gl-alert whilst moving
it to the top of the advanced section

Changelog: changed
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/82313
EE: true
parent 45f078f2
...@@ -366,3 +366,8 @@ to @gitlab/ui by https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1709 ...@@ -366,3 +366,8 @@ to @gitlab/ui by https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1709
/* stylelint-disable property-no-vendor-prefix */ /* stylelint-disable property-no-vendor-prefix */
-webkit-backdrop-filter: blur(2px); // still required by Safari -webkit-backdrop-filter: blur(2px); // still required by Safari
} }
// Will be moved to @gitlab/ui by https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/2708
.gl-inset-border-l-3-red-600 {
box-shadow: inset $gl-border-size-3 0 0 0 $red-600;
}
...@@ -66,6 +66,8 @@ ...@@ -66,6 +66,8 @@
%p= s_('ProjectSettings|Housekeeping, export, archive, change path, transfer, and delete.') %p= s_('ProjectSettings|Housekeeping, export, archive, change path, transfer, and delete.')
.settings-content .settings-content
= render_if_exists 'projects/settings/restore', project: @project
.sub-section .sub-section
%h4= _('Housekeeping') %h4= _('Housekeeping')
%p %p
......
...@@ -99,7 +99,7 @@ module EE ...@@ -99,7 +99,7 @@ module EE
end end
def permanent_delete_message(project) def permanent_delete_message(project)
message = _('This action deletes %{codeOpen}%{project_path_with_namespace}%{codeClose} and everything this project contains. %{strongOpen}There is no going back%{strongClose}') message = _('This action deletes %{codeOpen}%{project_path_with_namespace}%{codeClose} and everything this project contains. %{strongOpen}There is no going back.%{strongClose}')
html_escape(message) % remove_message_data(project) html_escape(message) % remove_message_data(project)
end end
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
- forks_count = Projects::ForksCountService.new(project).count - forks_count = Projects::ForksCountService.new(project).count
- unless project.marked_for_deletion? - unless project.marked_for_deletion?
.sub-section .gl-bg-red-50.gl-inset-border-l-3-red-600.gl-py-5.gl-px-6
%h4.danger-title= _('Delete this project') %h4.gl-font-lg.gl-mt-0= _('Delete this project')
- if adjourned_deletion && can_delay_project_deletions - if adjourned_deletion && can_delay_project_deletions
= render 'projects/settings/marked_for_removal' = render 'projects/settings/marked_for_removal'
- else - else
...@@ -20,5 +20,4 @@ ...@@ -20,5 +20,4 @@
- else - 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) } } #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 - else
= render 'projects/settings/restore', project: project
= render 'projects/settings/permanently_delete', project: project = render 'projects/settings/permanently_delete', project: project
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- issues_count = Projects::AllIssuesCountService.new(project).count - issues_count = Projects::AllIssuesCountService.new(project).count
- forks_count = Projects::ForksCountService.new(project).count - forks_count = Projects::ForksCountService.new(project).count
.sub-section .gl-bg-red-50.gl-inset-border-l-3-red-600.gl-py-5.gl-px-6
%h4.danger-title= _('Delete this project') %h4.gl-font-lg.gl-mt-0= _('Delete this project')
%p= permanent_delete_message(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) } } #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) } }
- return unless @project.marked_for_deletion?
- return unless project.feature_available?(:adjourned_deletion_for_projects_and_groups) - return unless project.feature_available?(:adjourned_deletion_for_projects_and_groups)
- date = permanent_deletion_date(project.marked_for_deletion_at) - date = permanent_deletion_date(project.marked_for_deletion_at)
.sub-section
%h4= _('Restore project') .gl-alert.gl-alert-warning.gl-mb-7{ role: 'alert' }
%p .gl-alert-container
%strong= _('This project will be deleted on %{date}') %{ date: date } = sprite_icon('warning', css_class: "gl-icon gl-alert-icon")
%p .gl-alert-content
= _("Restoring the project will prevent the project from being removed on this date and restore people's ability to make changes to it.") %h4.gl-alert-title= _('This project will be deleted on %{date}') %{ date: date }
= _("The repository can be committed to, and issues, comments and other entities can be created.") .gl-alert-body
%strong= _('Only active projects show up in the search and on the dashboard.') %p
= link_to _('Restore project'), namespace_project_restore_path(project.namespace, project), = _("Restoring the project will prevent the project from being removed on this date and restore people's ability to make changes to it.")
method: :post, class: "gl-button btn" = _("The repository can be committed to, and issues, comments and other entities can be created.")
= _('Only active projects show up in the search and on the dashboard.')
= link_to _('Restore project'), namespace_project_restore_path(project.namespace, project),
method: :post, class: "gl-button btn btn-confirm"
...@@ -37482,7 +37482,7 @@ msgstr "" ...@@ -37482,7 +37482,7 @@ msgstr ""
msgid "This action cannot be undone, and will permanently delete the %{key} SSH key" msgid "This action cannot be undone, and will permanently delete the %{key} SSH key"
msgstr "" msgstr ""
msgid "This action deletes %{codeOpen}%{project_path_with_namespace}%{codeClose} and everything this project contains. %{strongOpen}There is no going back%{strongClose}" msgid "This action deletes %{codeOpen}%{project_path_with_namespace}%{codeClose} and everything this project contains. %{strongOpen}There is no going back.%{strongClose}"
msgstr "" msgstr ""
msgid "This action deletes %{codeOpen}%{project_path_with_namespace}%{codeClose} on %{date} and everything this project contains." msgid "This action deletes %{codeOpen}%{project_path_with_namespace}%{codeClose} on %{date} and everything this project contains."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment