2019-12-17 10:08:15 -05:00
|
|
|
- return unless can?(current_user, :remove_project, project)
|
2021-11-15 16:14:31 -05:00
|
|
|
- merge_requests_count = Projects::AllMergeRequestsCountService.new(project).count
|
|
|
|
- issues_count = Projects::AllIssuesCountService.new(project).count
|
2022-01-27 13:14:37 -05:00
|
|
|
- forks_count = Projects::ForksCountService.new(project).count
|
2019-12-17 10:08:15 -05:00
|
|
|
|
|
|
|
.sub-section
|
2020-08-12 17:09:54 -04:00
|
|
|
%h4.danger-title= _('Delete project')
|
2019-12-17 10:08:15 -05:00
|
|
|
%p
|
2021-07-16 11:09:56 -04:00
|
|
|
%strong= _('Deleting the project will delete its repository and all related resources, including issues and merge requests.')
|
2021-01-29 10:09:40 -05:00
|
|
|
= link_to _('Learn more.'), help_page_path('user/project/settings/index', anchor: 'removing-a-fork-relationship'), target: '_blank', rel: 'noopener noreferrer'
|
2020-07-15 14:09:09 -04:00
|
|
|
%p
|
2020-08-12 17:09:54 -04:00
|
|
|
%strong= _('Deleted projects cannot be restored!')
|
2022-01-27 13:14:37 -05:00
|
|
|
#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) } }
|