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
3cbb8540
Commit
3cbb8540
authored
Aug 06, 2020
by
Jiaan Louw
Committed by
Nathan Friend
Aug 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update delete project confirmation phrase
parent
d4640473
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
3 deletions
+14
-3
app/views/projects/_remove.html.haml
app/views/projects/_remove.html.haml
+2
-1
changelogs/unreleased/24401-update-delete-project-confirm-phrase.yml
...unreleased/24401-update-delete-project-confirm-phrase.yml
+6
-0
ee/app/views/projects/_remove.html.haml
ee/app/views/projects/_remove.html.haml
+2
-1
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/features/projects_spec.rb
spec/features/projects_spec.rb
+1
-1
No files found.
app/views/projects/_remove.html.haml
View file @
3cbb8540
-
return
unless
can?
(
current_user
,
:remove_project
,
project
)
-
return
unless
can?
(
current_user
,
:remove_project
,
project
)
-
confirm_phrase
=
s_
(
'DeleteProject|Delete %{name}'
)
%
{
name:
project
.
full_name
}
.sub-section
.sub-section
%h4
.danger-title
=
_
(
'Remove project'
)
%h4
.danger-title
=
_
(
'Remove project'
)
...
@@ -6,4 +7,4 @@
...
@@ -6,4 +7,4 @@
%strong
=
_
(
'Removing the project will delete its repository and all related resources including issues, merge requests etc.'
)
%strong
=
_
(
'Removing the project will delete its repository and all related resources including issues, merge requests etc.'
)
%p
%p
%strong
=
_
(
'Removed projects cannot be restored!'
)
%strong
=
_
(
'Removed projects cannot be restored!'
)
#js-project-delete-button
{
data:
{
form_path:
project_path
(
project
),
confirm_phrase:
project
.
path
}
}
#js-project-delete-button
{
data:
{
form_path:
project_path
(
project
),
confirm_phrase:
confirm_phrase
}
}
changelogs/unreleased/24401-update-delete-project-confirm-phrase.yml
0 → 100644
View file @
3cbb8540
---
title
:
Update the project deletion confirmation modal to be more specific, the confirmation
phrase now includes the project full path
merge_request
:
38700
author
:
type
:
changed
ee/app/views/projects/_remove.html.haml
View file @
3cbb8540
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
-
adjourned_date
=
adjourned_deletion
?
permanent_deletion_date
(
Time
.
now
.
utc
).
to_s
:
nil
;
-
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-adjourned-period-premium-only'
)
-
admin_help_path
=
help_page_path
(
'user/admin_area/settings/visibility_and_access_controls'
,
anchor:
'default-deletion-adjourned-period-premium-only'
)
-
recovery_help_path
=
help_page_path
(
'user/project/settings/index'
,
anchor:
'remove-a-project'
)
-
recovery_help_path
=
help_page_path
(
'user/project/settings/index'
,
anchor:
'remove-a-project'
)
-
confirm_phrase
=
s_
(
'DeleteProject|Delete %{name}'
)
%
{
name:
project
.
full_name
}
-
unless
project
.
marked_for_deletion?
-
unless
project
.
marked_for_deletion?
.sub-section
.sub-section
...
@@ -19,7 +20,7 @@
...
@@ -19,7 +20,7 @@
%p
=
permanent_delete_message
(
project
)
%p
=
permanent_delete_message
(
project
)
%p
%p
%strong
=
_
(
'Are you ABSOLUTELY SURE you wish to delete this project?'
)
%strong
=
_
(
'Are you ABSOLUTELY SURE you wish to delete this project?'
)
#js-project-delete-button
{
data:
{
form_path:
project_path
(
project
),
confirm_phrase:
project
.
path
}
}
#js-project-delete-button
{
data:
{
form_path:
project_path
(
project
),
confirm_phrase:
confirm_phrase
}
}
-
else
-
else
=
render
'projects/settings/restore'
,
project:
project
=
render
'projects/settings/restore'
,
project:
project
locale/gitlab.pot
View file @
3cbb8540
...
@@ -7815,6 +7815,9 @@ msgstr ""
...
@@ -7815,6 +7815,9 @@ msgstr ""
msgid "Delete variable"
msgid "Delete variable"
msgstr ""
msgstr ""
msgid "DeleteProject|Delete %{name}"
msgstr ""
msgid "DeleteProject|Failed to remove project repository. Please try again or contact administrator."
msgid "DeleteProject|Failed to remove project repository. Please try again or contact administrator."
msgstr ""
msgstr ""
...
...
spec/features/projects_spec.rb
View file @
3cbb8540
...
@@ -260,7 +260,7 @@ RSpec.describe 'Project' do
...
@@ -260,7 +260,7 @@ RSpec.describe 'Project' do
end
end
it
'removes a project'
,
:sidekiq_might_not_need_inline
do
it
'removes a project'
,
:sidekiq_might_not_need_inline
do
expect
{
remove_with_confirm
(
'Remove project'
,
project
.
path
,
'Yes, delete project'
)
}.
to
change
{
Project
.
count
}.
by
(
-
1
)
expect
{
remove_with_confirm
(
'Remove project'
,
"Delete
#{
project
.
full_name
}
"
,
'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
(
page
).
to
have_content
"Project '
#{
project
.
full_name
}
' is in the process of being deleted."
expect
(
Project
.
all
.
count
).
to
be_zero
expect
(
Project
.
all
.
count
).
to
be_zero
expect
(
project
.
issues
).
to
be_empty
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