summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-07-31 13:29:38 +0000
committerDouwe Maan <douwe@gitlab.com>2015-07-31 13:29:38 +0000
commitbdb4288ab82bab14619fe817020e90e48a97e1d4 (patch)
tree4cc230ecb59ffda92e67b604a814ef26676e927b
parent3307008499c81c8dc88da633e9c6f063d770a676 (diff)
parentfeb2865fba15524c7dd1ae03274c63ae02edd152 (diff)
downloadgitlab-ce-bdb4288ab82bab14619fe817020e90e48a97e1d4.tar.gz
Merge branch 'mention-name-in-flash-msg' into 'master'
Mention group and project names in flash messages upon create, update and delete. Mention group and project names in flash messages upon create, update and delete. I also changed some wording inconsistency. **Before** ![project_created](https://gitlab.com/axil/gitlab-ce/uploads/b91b92e46b08d6c566acee8d88fccff1/project_created.png) **After** ![project_created_after](https://gitlab.com/axil/gitlab-ce/uploads/56db5125f2769386c43cf9e2f175a54d/project_created_after.png) See merge request !1070
-rw-r--r--CHANGELOG1
-rw-r--r--app/controllers/groups_controller.rb6
-rw-r--r--app/controllers/projects_controller.rb8
3 files changed, 8 insertions, 7 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 27cf89b5938..8dc23cf175f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -23,6 +23,7 @@ v 7.14.0 (unreleased)
- Fix bug causing Bitbucket importer to crash when OAuth application had been removed.
- Add fetch command to the MR page.
- Disabled autocapitalize and autocorrect on login field (Daryl Chan)
+ - Mention group and project name in creation, update and deletion notices (Achilleas Pipinellis)
v 7.13.2
- Fix randomly failed spec
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index 901c1cdddcb..279c6ef0f4d 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -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, alert: "Group '#{@group.name} was deleted."
end
protected
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 586359f3080..dafc11d0707 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -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