Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a3692621
Commit
a3692621
authored
Jan 14, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
line numbers for blame
parent
e98d4780
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
10 deletions
+33
-10
app/assets/stylesheets/sections/tree.scss
app/assets/stylesheets/sections/tree.scss
+12
-0
app/views/blame/show.html.haml
app/views/blame/show.html.haml
+21
-10
No files found.
app/assets/stylesheets/sections/tree.scss
View file @
a3692621
...
@@ -80,6 +80,18 @@
...
@@ -80,6 +80,18 @@
margin
:
0
;
margin
:
0
;
padding
:
0
;
padding
:
0
;
}
}
td
.blame-commit
{
background
:
#f9f9f9
;
min-width
:
350px
;
}
td
.blame-numbers
{
pre
{
color
:
#AAA
;
white-space
:
pre
;
}
background
:
#f1f1f1
;
border-left
:
1px
solid
#DDD
;
}
}
}
}
}
...
...
app/views/blame/show.html.haml
View file @
a3692621
...
@@ -20,16 +20,27 @@
...
@@ -20,16 +20,27 @@
%span
.options
=
render
"tree/blob_actions"
%span
.options
=
render
"tree/blob_actions"
.file_content.blame
.file_content.blame
%table
%table
-
current_line
=
1
-
@blame
.
each
do
|
commit
,
lines
|
-
@blame
.
each
do
|
commit
,
lines
|
-
commit
=
Commit
.
new
(
commit
)
-
commit
=
CommitDecorator
.
decorate
(
Commit
.
new
(
commit
))
-
commit
=
CommitDecorator
.
decorate
(
commit
)
%tr
%tr
%td
.author
=
commit
.
author_link
avatar:
true
,
size:
16
%td
.blame-commit
%td
.blame_commit
%span
.commit
=
link_to
commit
.
short_id
(
8
),
project_commit_path
(
@project
,
commit
),
class:
"commit_short_id"
%code
=
link_to
commit
.
short_id
,
project_commit_path
(
@project
,
commit
)
=
link_to_gfm
truncate
(
commit
.
title
,
length:
30
),
project_commit_path
(
@project
,
commit
),
class:
"row_title"
rescue
"--broken encoding"
=
commit
.
author_link
avatar:
true
,
size:
16
=
link_to_gfm
truncate
(
commit
.
title
,
length:
20
),
project_commit_path
(
@project
,
commit
.
id
),
class:
"row_title"
%td
.lines.blame-numbers
%pre
-
if
lines
.
empty?
=
current_line
-
current_line
+=
1
-
else
-
lines
.
each
do
|
line
|
=
current_line
-
current_line
+=
1
%td
.lines
%td
.lines
=
preserve
do
%pre
%pre
-
lines
.
each
do
|
line
|
=
line
s
.
join
(
"
\n
"
)
=
line
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment