0cd73885e6
Closes #1521
36 lines
1.3 KiB
Text
36 lines
1.3 KiB
Text
- 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
|
|
- @blame.each do |commit, lines, since|
|
|
- commit = Commit.new(commit, @project)
|
|
%tr
|
|
%td.blame-commit
|
|
%span.commit
|
|
= 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"
|
|
%td.lines.blame-numbers
|
|
%pre
|
|
- (since...(since + lines.count)).each do |i|
|
|
= i
|
|
\
|
|
%td.lines
|
|
%pre{class: 'code highlight white'}
|
|
%code
|
|
:erb
|
|
<% lines.each do |line| %>
|
|
<%= highlight(@blob.name, line, nowrap: true, continue: true).html_safe %>
|
|
<% end %>
|