Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
788de6f1
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,发现更多精彩内容 >>
提交
788de6f1
编写于
3月 26, 2012
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Better commit show page
上级
7d56a51b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
38 addition
and
20 deletion
+38
-20
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+16
-2
app/controllers/commits_controller.rb
app/controllers/commits_controller.rb
+2
-0
app/views/commits/show.html.haml
app/views/commits/show.html.haml
+20
-18
未找到文件。
app/assets/stylesheets/common.scss
浏览文件 @
788de6f1
...
...
@@ -1011,23 +1011,37 @@ p.time {
}
.issue_box
,
.commit_box
,
.merge_request_box
{
@extend
.padded
;
@extend
.borders
;
@extend
.prepend-top-20
;
@extend
.append-bottom-20
;
border-width
:
2px
;
img
{
max-width
:
100%
;
}
pre
{
background
:
white
!
important
;
code
{
background
:
none
!
important
;
}
}
}
.commit_box
{
.commit_message
{
margin
:
-20px
;
padding
:
20px
;
margin-top
:
10px
;
border-radius
:
0
;
border
:none
;
font-size
:
12px
;
background-color
:
#f5f5f5
;
border
:none
;
border-top
:
1px
solid
#eee
;
}
}
.highlight_word
{
background
:
#EEDC94
;
}
...
...
app/controllers/commits_controller.rb
浏览文件 @
788de6f1
...
...
@@ -32,6 +32,8 @@ class CommitsController < ApplicationController
@note
=
@project
.
build_commit_note
(
@commit
)
@comments_allowed
=
true
@line_notes
=
project
.
commit_line_notes
(
@commit
)
@notes_count
=
@line_notes
.
count
+
project
.
commit_notes
(
@commit
).
count
end
def
compare
...
...
app/views/commits/show.html.haml
浏览文件 @
788de6f1
.commit
=
link_to
tree_project_ref_path
(
@project
,
@commit
.
id
),
:class
=>
"btn right small"
do
Browse Code »
=
image_tag
gravatar_icon
(
@commit
.
author_email
),
:class
=>
"avatar"
%code
=
@commit
.
id
.
to_s
%h5
=
@commit
.
author_name
%small
=
@commit
.
created_at
.
stamp
(
"Aug 21, 2011 9:23pm"
)
-
if
@commit
.
author_name
!=
@commit
.
committer_name
or
@commit
.
author_email
!=
@commit
.
committer_email
or
@commit
.
authored_date
!=
@commit
.
committed_date
–
%cite
committed by
=
@commit
.
committer_name
%small
=
@commit
.
committed_date
.
stamp
(
"Aug 21, 2011 9:23pm"
)
.commit_box
.commit
.right
-
unless
@notes_count
.
zero?
%span
.btn.small.disabled.padded
=
pluralize
@notes_count
,
'note'
%br
%pre
.commit_message.prettyprint
=
commit_msg_with_link_to_issues
(
@project
,
@commit
.
safe_message
)
.clear
%br
=
link_to
tree_project_ref_path
(
@project
,
@commit
.
id
),
:class
=>
"btn small"
do
Browse Code »
=
image_tag
gravatar_icon
(
@commit
.
author_email
),
:class
=>
"avatar"
%code
=
@commit
.
id
.
to_s
%h5
=
@commit
.
author_name
%small
=
@commit
.
created_at
.
stamp
(
"Aug 21, 2011 9:23pm"
)
-
if
@commit
.
author_name
!=
@commit
.
committer_name
or
@commit
.
author_email
!=
@commit
.
committer_email
or
@commit
.
authored_date
!=
@commit
.
committed_date
–
%cite
committed by
=
@commit
.
committer_name
%small
=
@commit
.
committed_date
.
stamp
(
"Aug 21, 2011 9:23pm"
)
%pre
.commit_message
=
commit_msg_with_link_to_issues
(
@project
,
@commit
.
safe_message
)
%br
%p
.cgray
Showing
#{
pluralize
(
@commit
.
diffs
.
count
,
"changed file"
)
}
=
render
"commits/diffs"
,
:diffs
=>
@commit
.
diffs
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录