Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
0fac66f8
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0fac66f8
编写于
7月 30, 2015
作者:
A
Achilleas Pipinellis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Mention group and project name in flash messages upon create, update and delete.
上级
82f0d3e6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
7 deletion
+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
未找到文件。
CHANGELOG
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录