blob: 64bbd495102c73b4c6f056433c37a635c4af80ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
%h3.page-title Blame view
#tree-holder.tree-holder
.file-holder
.file-title
%i.icon-file
%span.file_name
= @path
%small= number_to_human_size @blob.size
%span.options= render "projects/blob/actions"
.file-content.blame.highlight
%table
- current_line = 1
- @blame.each do |commit, lines|
- commit = Commit.new(commit)
%tr
%td.blame-commit
%span.commit
= link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id"
= commit_author_link(commit, 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
%pre
%code{ class: highlightjs_class(@blob.name) }
:erb
<% lines.each do |line| %>
<%= line %>
<% end %>
|