Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
a7bcc2eb
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 搜索 >>
提交
a7bcc2eb
编写于
2月 14, 2012
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
submodules displayed for tree view
上级
c062e56b
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
38 addition
and
9 deletion
+38
-9
app/assets/images/submodule.png
app/assets/images/submodule.png
+0
-0
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+8
-1
app/assets/stylesheets/tree.scss
app/assets/stylesheets/tree.scss
+4
-0
app/controllers/commits_controller.rb
app/controllers/commits_controller.rb
+1
-0
app/views/commits/_text_file.html.haml
app/views/commits/_text_file.html.haml
+9
-7
app/views/refs/_submodule_item.html.haml
app/views/refs/_submodule_item.html.haml
+13
-0
app/views/refs/_tree.html.haml
app/views/refs/_tree.html.haml
+2
-0
app/views/refs/_tree_item.html.haml
app/views/refs/_tree_item.html.haml
+1
-1
未找到文件。
app/assets/images/submodule.png
0 → 100644
浏览文件 @
a7bcc2eb
641 字节
app/assets/stylesheets/common.scss
浏览文件 @
a7bcc2eb
...
...
@@ -234,12 +234,19 @@ img.lil_av {
border-color
:
#ddd
;
h5
{
padding
:
5px
10px
;
padding
:
0
10px
;
background
:
#f5f5f5
;
border-bottom
:
1px
solid
#ccc
;
@include
round-borders-top
(
4px
);
border-top
:none
;
}
li
{
padding
:
10px
;
&
:first-child
{
@include
round-borders-top
(
4px
);
border-top
:none
;
}
}
}
app/assets/stylesheets/tree.scss
浏览文件 @
a7bcc2eb
...
...
@@ -144,3 +144,7 @@ table.highlighttable .linenodiv pre {
background
:
#f5f5f5
;
}
}
.tree-commit-link
{
color
:
#333
;
}
app/controllers/commits_controller.rb
浏览文件 @
a7bcc2eb
...
...
@@ -28,6 +28,7 @@ class CommitsController < ApplicationController
@notes
=
project
.
commit_notes
(
@commit
).
fresh
.
limit
(
20
)
@note
=
@project
.
build_commit_note
(
@commit
)
@comments_allowed
=
true
@line_notes
=
project
.
commit_line_notes
(
@commit
)
respond_to
do
|
format
|
...
...
app/views/commits/_text_file.html.haml
浏览文件 @
a7bcc2eb
...
...
@@ -8,12 +8,14 @@
-
else
%td
.old_line
=
link_to
raw
(
type
==
"new"
?
" "
:
line_old
),
"#
#{
line_code
}
"
,
:id
=>
line_code
=
link_to
""
,
"#"
,
:class
=>
"line_note_link"
,
"line_code"
=>
line_code
,
:title
=>
"Add note for this line"
-
if
@comments_allowed
=
link_to
""
,
"#"
,
:class
=>
"line_note_link"
,
"line_code"
=>
line_code
,
:title
=>
"Add note for this line"
%td
.new_line
=
link_to
raw
(
type
==
"old"
?
" "
:
line_new
)
,
"#
#{
line_code
}
"
,
:id
=>
line_code
%td
.line_content
{
:class
=>
"noteable_line #{type} #{line_code}"
,
"line_code"
=>
line_code
}=
raw
"
#{
line
}
"
-
comments
=
@line_notes
.
select
{
|
n
|
n
.
line_code
==
line_code
}.
sort_by
(
&
:created_at
).
reverse
-
unless
comments
.
empty?
-
comments
.
each
do
|
note
|
=
render
"notes/per_line_show"
,
:note
=>
note
-
@line_notes
.
reject!
{
|
n
|
n
==
note
}
-
if
@comments_allowed
-
comments
=
@line_notes
.
select
{
|
n
|
n
.
line_code
==
line_code
}.
sort_by
(
&
:created_at
).
reverse
-
unless
comments
.
empty?
-
comments
.
each
do
|
note
|
=
render
"notes/per_line_show"
,
:note
=>
note
-
@line_notes
.
reject!
{
|
n
|
n
==
note
}
app/views/refs/_submodule_item.html.haml
0 → 100644
浏览文件 @
a7bcc2eb
-
url
=
content
.
url
(
@ref
)
-
name
=
content
.
basename
-
return
unless
url
%tr
{
:class
=>
"tree-item"
,
:url
=>
url
}
%td
.tree-item-file-name
=
image_tag
"submodule.png"
%strong
=
truncate
(
name
,
:length
=>
40
)
%td
%code
=
content
.
id
[
0
..
10
]
%td
=
link_to
truncate
(
url
,
:length
=>
40
),
url
app/views/refs/_tree.html.haml
浏览文件 @
a7bcc2eb
...
...
@@ -39,6 +39,8 @@
=
render
:partial
=>
"refs/tree_item"
,
:locals
=>
{
:content
=>
content
}
-
contents
.
select
{
|
i
|
i
.
is_a?
(
Grit
::
Blob
)}.
each
do
|
content
|
=
render
:partial
=>
"refs/tree_item"
,
:locals
=>
{
:content
=>
content
}
-
contents
.
select
{
|
i
|
i
.
is_a?
(
Grit
::
Submodule
)}.
each
do
|
content
|
=
render
:partial
=>
"refs/submodule_item"
,
:locals
=>
{
:content
=>
content
}
-
if
content
=
contents
.
select
{
|
c
|
c
.
is_a?
(
Grit
::
Blob
)
and
c
.
name
=~
/^readme/i
}.
first
#tree-readme-holder
...
...
app/views/refs/_tree_item.html.haml
浏览文件 @
a7bcc2eb
...
...
@@ -15,4 +15,4 @@
-
tm
=
@project
.
team_member_by_name_or_email
(
content_commit
.
author_email
,
content_commit
.
author_name
)
-
if
tm
=
link_to
"[
#{
tm
.
user_name
}
]"
,
project_team_member_path
(
@project
,
tm
)
=
link_to
truncate
(
content_commit
.
safe_message
,
:length
=>
tm
?
20
:
4
0
),
project_commit_path
(
@project
,
content_commit
.
id
),
:class
=>
"tree-commit-link"
=
link_to
truncate
(
content_commit
.
safe_message
,
:length
=>
tm
?
30
:
5
0
),
project_commit_path
(
@project
,
content_commit
.
id
),
:class
=>
"tree-commit-link"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录