Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
57f3409b
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 搜索 >>
提交
57f3409b
编写于
3月 19, 2013
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move Wall to own resource
上级
f3dfd229
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
39 addition
and
25 deletion
+39
-25
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+0
-16
app/controllers/walls_controller.rb
app/controllers/walls_controller.rb
+20
-0
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+1
-1
app/views/layouts/project_resource.html.haml
app/views/layouts/project_resource.html.haml
+1
-1
app/views/projects/wall.html.haml
app/views/projects/wall.html.haml
+0
-2
app/views/walls/show.html.haml
app/views/walls/show.html.haml
+11
-0
config/routes.rb
config/routes.rb
+6
-5
未找到文件。
app/controllers/projects_controller.rb
浏览文件 @
57f3409b
...
...
@@ -68,22 +68,6 @@ class ProjectsController < ProjectResourceController
end
end
#
# Wall
#
def
wall
return
render_404
unless
@project
.
wall_enabled
@target_type
=
:wall
@target_id
=
nil
@note
=
@project
.
notes
.
new
respond_to
do
|
format
|
format
.
html
end
end
def
destroy
return
access_denied!
unless
can?
(
current_user
,
:remove_project
,
project
)
...
...
app/controllers/walls_controller.rb
0 → 100644
浏览文件 @
57f3409b
class
WallsController
<
ProjectResourceController
before_filter
:module_enabled
respond_to
:js
,
:html
def
show
@note
=
@project
.
notes
.
new
respond_to
do
|
format
|
format
.
html
end
end
protected
def
module_enabled
return
render_404
unless
@project
.
wall_enabled
end
end
app/helpers/application_helper.rb
浏览文件 @
57f3409b
...
...
@@ -105,7 +105,7 @@ module ApplicationHelper
{
label:
"
#{
simple_sanitize
(
@project
.
name_with_namespace
)
}
- Snippets"
,
url:
project_snippets_path
(
@project
)
},
{
label:
"
#{
simple_sanitize
(
@project
.
name_with_namespace
)
}
- Team"
,
url:
project_team_index_path
(
@project
)
},
{
label:
"
#{
simple_sanitize
(
@project
.
name_with_namespace
)
}
- Tree"
,
url:
project_tree_path
(
@project
,
@ref
||
@project
.
repository
.
root_ref
)
},
{
label:
"
#{
simple_sanitize
(
@project
.
name_with_namespace
)
}
- Wall"
,
url:
wall_project
_path
(
@project
)
},
{
label:
"
#{
simple_sanitize
(
@project
.
name_with_namespace
)
}
- Wall"
,
url:
project_wall
_path
(
@project
)
},
{
label:
"
#{
simple_sanitize
(
@project
.
name_with_namespace
)
}
- Wiki"
,
url:
project_wikis_path
(
@project
)
},
]
end
...
...
app/views/layouts/project_resource.html.haml
浏览文件 @
57f3409b
...
...
@@ -41,7 +41,7 @@
-
if
@project
.
wall_enabled
=
nav_link
(
path:
'projects#wall'
)
do
=
link_to
'Wall'
,
wall_project
_path
(
@project
)
=
link_to
'Wall'
,
project_wall
_path
(
@project
)
-
if
@project
.
snippets_enabled
=
nav_link
(
controller: :snippets
)
do
...
...
app/views/projects/wall.html.haml
已删除
100644 → 0
浏览文件 @
f3dfd229
%div
.wall_page
=
render
"notes/reversed_notes_with_form"
app/views/walls/show.html.haml
0 → 100644
浏览文件 @
57f3409b
%div
.wall-page
%ul
.well-list.notes
.notes-busy.js-notes-busy
.js-main-target-form
=
render
"notes/form"
:javascript
$
(
function
(){
Wall
.
init
(
#{
@project
.
id
}
);
});
config/routes.rb
浏览文件 @
57f3409b
...
...
@@ -167,11 +167,6 @@ Gitlab::Application.routes.draw do
# Project Area
#
resources
:projects
,
constraints:
{
id:
/(?:[a-zA-Z.0-9_\-]+\/)?[a-zA-Z.0-9_\-]+/
},
except:
[
:new
,
:create
,
:index
],
path:
"/"
do
member
do
get
"wall"
get
"files"
end
resources
:blob
,
only:
[
:show
],
constraints:
{
id:
/.+/
}
resources
:tree
,
only:
[
:show
,
:edit
,
:update
],
constraints:
{
id:
/.+/
}
resources
:commit
,
only:
[
:show
],
constraints:
{
id:
/[[:alnum:]]{6,40}/
}
...
...
@@ -194,6 +189,12 @@ Gitlab::Application.routes.draw do
end
end
resource
:wall
,
only:
[
:show
]
do
member
do
get
'notes'
end
end
resource
:repository
do
member
do
get
"branches"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录