Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
442887f4
Commit
442887f4
authored
Nov 11, 2020
by
Justin Boyson
Committed by
Natalia Tepluhina
Nov 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use project.path for confirmation phrase
Update test Update translations Add changelog
parent
a28219b2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
8 deletions
+8
-8
app/views/projects/_remove.html.haml
app/views/projects/_remove.html.haml
+1
-2
changelogs/unreleased/255970-confirmation-panels-for-significant-actions-are-inconsistent-in-te.yml
...panels-for-significant-actions-are-inconsistent-in-te.yml
+5
-0
ee/app/views/projects/_remove.html.haml
ee/app/views/projects/_remove.html.haml
+1
-2
locale/gitlab.pot
locale/gitlab.pot
+0
-3
spec/features/projects_spec.rb
spec/features/projects_spec.rb
+1
-1
No files found.
app/views/projects/_remove.html.haml
View file @
442887f4
-
return
unless
can?
(
current_user
,
:remove_project
,
project
)
-
confirm_phrase
=
s_
(
'DeleteProject|Delete %{name}'
)
%
{
name:
project
.
full_name
}
.sub-section
%h4
.danger-title
=
_
(
'Delete project'
)
...
...
@@ -7,4 +6,4 @@
%strong
=
_
(
'Deleting the project will delete its repository and all related resources including issues, merge requests etc.'
)
%p
%strong
=
_
(
'Deleted projects cannot be restored!'
)
#js-project-delete-button
{
data:
{
form_path:
project_path
(
project
),
confirm_phrase:
confirm_phrase
}
}
#js-project-delete-button
{
data:
{
form_path:
project_path
(
project
),
confirm_phrase:
project
.
path
}
}
changelogs/unreleased/255970-confirmation-panels-for-significant-actions-are-inconsistent-in-te.yml
0 → 100644
View file @
442887f4
---
title
:
Make delete repo prompts consistent
merge_request
:
47117
author
:
type
:
fixed
ee/app/views/projects/_remove.html.haml
View file @
442887f4
...
...
@@ -3,7 +3,6 @@
-
adjourned_date
=
adjourned_deletion
?
permanent_deletion_date
(
Time
.
now
.
utc
).
to_s
:
nil
;
-
admin_help_path
=
help_page_path
(
'user/admin_area/settings/visibility_and_access_controls'
,
anchor:
'default-deletion-delay'
)
-
recovery_help_path
=
help_page_path
(
'user/project/settings/index'
,
anchor:
'delete-a-project'
)
-
confirm_phrase
=
s_
(
'DeleteProject|Delete %{name}'
)
%
{
name:
project
.
full_name
}
-
unless
project
.
marked_for_deletion?
.sub-section
...
...
@@ -20,7 +19,7 @@
%p
=
permanent_delete_message
(
project
)
%p
%strong
=
_
(
'Are you ABSOLUTELY SURE you wish to delete this project?'
)
#js-project-delete-button
{
data:
{
form_path:
project_path
(
project
),
confirm_phrase:
confirm_phrase
}
}
#js-project-delete-button
{
data:
{
form_path:
project_path
(
project
),
confirm_phrase:
project
.
path
}
}
-
else
=
render
'projects/settings/restore'
,
project:
project
locale/gitlab.pot
View file @
442887f4
...
...
@@ -8810,9 +8810,6 @@ msgstr ""
msgid "Delete variable"
msgstr ""
msgid "DeleteProject|Delete %{name}"
msgstr ""
msgid "DeleteProject|Failed to remove project repository. Please try again or contact administrator."
msgstr ""
...
...
spec/features/projects_spec.rb
View file @
442887f4
...
...
@@ -279,7 +279,7 @@ RSpec.describe 'Project' do
end
it
'deletes a project'
,
:sidekiq_might_not_need_inline
do
expect
{
remove_with_confirm
(
'Delete project'
,
"Delete
#{
project
.
full_name
}
"
,
'Yes, delete project'
)
}.
to
change
{
Project
.
count
}.
by
(
-
1
)
expect
{
remove_with_confirm
(
'Delete project'
,
project
.
path
,
'Yes, delete project'
)
}.
to
change
{
Project
.
count
}.
by
(
-
1
)
expect
(
page
).
to
have_content
"Project '
#{
project
.
full_name
}
' is in the process of being deleted."
expect
(
Project
.
all
.
count
).
to
be_zero
expect
(
project
.
issues
).
to
be_empty
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment