blame with rugged
This commit is contained in:
parent
b43e918a73
commit
a286f92050
2 changed files with 5 additions and 11 deletions
|
@ -179,7 +179,7 @@ GEM
|
||||||
mime-types (~> 1.19)
|
mime-types (~> 1.19)
|
||||||
gitlab_emoji (0.0.1.1)
|
gitlab_emoji (0.0.1.1)
|
||||||
emoji (~> 1.0.1)
|
emoji (~> 1.0.1)
|
||||||
gitlab_git (6.2.1)
|
gitlab_git (6.3.0)
|
||||||
activesupport (~> 4.0)
|
activesupport (~> 4.0)
|
||||||
charlock_holmes (~> 0.6)
|
charlock_holmes (~> 0.6)
|
||||||
gitlab-grit (~> 2.6)
|
gitlab-grit (~> 2.6)
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
%span.options= render "projects/blob/actions"
|
%span.options= render "projects/blob/actions"
|
||||||
.file-content.blame.highlight
|
.file-content.blame.highlight
|
||||||
%table
|
%table
|
||||||
- current_line = 1
|
- @blame.each do |commit, lines, since|
|
||||||
- @blame.each do |commit, lines|
|
|
||||||
- commit = Commit.new(commit)
|
- commit = Commit.new(commit)
|
||||||
%tr
|
%tr
|
||||||
%td.blame-commit
|
%td.blame-commit
|
||||||
|
@ -23,14 +22,9 @@
|
||||||
= link_to_gfm truncate(commit.title, length: 20), project_commit_path(@project, commit.id), class: "row_title"
|
= link_to_gfm truncate(commit.title, length: 20), project_commit_path(@project, commit.id), class: "row_title"
|
||||||
%td.lines.blame-numbers
|
%td.lines.blame-numbers
|
||||||
%pre
|
%pre
|
||||||
- if lines.empty?
|
- (since...(since + lines.count)).each do |i|
|
||||||
= current_line
|
= i
|
||||||
- current_line += 1
|
\
|
||||||
- else
|
|
||||||
- lines.each do |line|
|
|
||||||
= current_line
|
|
||||||
\
|
|
||||||
- current_line += 1
|
|
||||||
%td.lines
|
%td.lines
|
||||||
%pre
|
%pre
|
||||||
%code{ class: highlightjs_class(@blob.name) }
|
%code{ class: highlightjs_class(@blob.name) }
|
||||||
|
|
Loading…
Reference in a new issue