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
|
- page_title "Blame", @blob.path, @ref
%h3.page-title Blame view
#tree-holder.tree-holder
.file-holder
.file-title
%i.fa.fa-file
%strong
= @path
%small= number_to_human_size @blob.size
.file-actions
= render "projects/blob/actions"
.file-content.blame.highlight
%table
- current_line = 1
- @blame.each do |raw_commit, line|
%tr
%td.blame-commit
%span.commit
- unless @prev_commit && @prev_commit.sha == raw_commit.sha
- commit = Commit.new(raw_commit, @project)
= link_to commit.short_id, namespace_project_commit_path(@project.namespace, @project, commit), class: "commit_short_id"
= commit_author_link(commit, avatar: true, size: 16)
= link_to_gfm truncate(commit.title, length: 20), namespace_project_commit_path(@project.namespace, @project, commit.id), class: "row_title"
- @prev_commit = raw_commit
%td.lines.blame-numbers
%pre
= current_line
- current_line += 1
%td.lines
%pre{class: 'code highlight white'}
%code
:erb
<%= highlight(@blob.name, line, nowrap: true, continue: true).html_safe %>
|