gitlab-org--gitlab-foss/app/views/projects/blame/show.html.haml

43 lines
1.8 KiB
Text

- @no_container = true
- page_title "Blame", @blob.path, @ref
= render "projects/commits/head"
%div{ class: container_class }
#blob-content-holder.tree-holder
= render "projects/blob/breadcrumb", blob: @blob, blame: true
.file-holder
= render "projects/blob/header", blob: @blob, blame: true
.table-responsive.file-content.blame.code.js-syntax-highlight
%table
- current_line = 1
- @blame_groups.each do |blame_group|
%tr
%td.blame-commit
.commit
- commit = blame_group[:commit]
= author_avatar(commit, size: 36)
.commit-row-title
%strong
= link_to_gfm truncate(commit.title, length: 35), namespace_project_commit_path(@project.namespace, @project, commit.id), class: "cdark"
.pull-right
= link_to commit.short_id, namespace_project_commit_path(@project.namespace, @project, commit), class: "commit-sha"
 
.light
= commit_author_link(commit, avatar: false)
committed
#{time_ago_with_tooltip(commit.committed_date)}
%td.line-numbers
- line_count = blame_group[:lines].count
- (current_line...(current_line + line_count)).each do |i|
%a.diff-line-num{ href: "#L#{i}", id: "L#{i}", 'data-line-number' => i }
= icon("link")
= i
\
- current_line += line_count
%td.lines
%pre.code.highlight
%code
- blame_group[:lines].each do |line|
#{line}