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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
0fac66f8
Commit
0fac66f8
authored
Jul 30, 2015
by
Achilleas Pipinellis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mention group and project name in flash messages upon create, update and delete.
parent
82f0d3e6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
CHANGELOG
CHANGELOG
+1
-0
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+3
-3
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+4
-4
No files found.
CHANGELOG
View file @
0fac66f8
...
...
@@ -17,6 +17,7 @@ v 7.14.0 (unreleased)
- Add fetch command to the MR page
- Fix bug causing Bitbucket importer to crash when OAuth application had been removed.
- Add fetch command to the MR page.
- Mention group and project name in creation, update and deletion notices (Achilleas Pipinellis)
v 7.13.2
- Fix randomly failed spec
...
...
app/controllers/groups_controller.rb
View file @
0fac66f8
...
...
@@ -24,7 +24,7 @@ class GroupsController < Groups::ApplicationController
if
@group
.
save
@group
.
add_owner
(
current_user
)
redirect_to
@group
,
notice:
'Group was successfully created.'
redirect_to
@group
,
notice:
"Group '
#{
@group
.
name
}
' was successfully created."
else
render
action:
"new"
end
...
...
@@ -75,7 +75,7 @@ class GroupsController < Groups::ApplicationController
def
update
if
@group
.
update_attributes
(
group_params
)
redirect_to
edit_group_path
(
@group
),
notice:
'Group was successfully updated.'
redirect_to
edit_group_path
(
@group
),
notice:
"Group '
#{
@group
.
name
}
' was successfully updated."
else
render
action:
"edit"
end
...
...
@@ -84,7 +84,7 @@ class GroupsController < Groups::ApplicationController
def
destroy
DestroyGroupService
.
new
(
@group
,
current_user
).
execute
redirect_to
root_path
,
notice:
'Group was removed.'
redirect_to
root_path
,
notice:
"Group '
#{
@group
.
name
}
was deleted."
end
protected
...
...
app/controllers/projects_controller.rb
View file @
0fac66f8
...
...
@@ -24,7 +24,7 @@ class ProjectsController < ApplicationController
if
@project
.
saved?
redirect_to
(
project_path
(
@project
),
notice:
'Project was successfully created.'
notice:
"Project '
#{
@project
.
name
}
' was successfully created."
)
else
render
'new'
...
...
@@ -36,11 +36,11 @@ class ProjectsController < ApplicationController
respond_to
do
|
format
|
if
status
flash
[
:notice
]
=
'Project was successfully updated.'
flash
[
:notice
]
=
"Project '
#{
@project
.
name
}
' was successfully updated."
format
.
html
do
redirect_to
(
edit_project_path
(
@project
),
notice:
'Project was successfully updated.'
notice:
"Project '
#{
@project
.
name
}
' was successfully updated."
)
end
format
.
js
...
...
@@ -100,7 +100,7 @@ class ProjectsController < ApplicationController
return
access_denied!
unless
can?
(
current_user
,
:remove_project
,
@project
)
::
Projects
::
DestroyService
.
new
(
@project
,
current_user
,
{}).
execute
flash
[
:alert
]
=
'Project deleted.'
flash
[
:alert
]
=
"Project '
#{
@project
.
name
}
' was deleted."
if
request
.
referer
.
include?
(
'/admin'
)
redirect_to
admin_namespaces_projects_path
...
...
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