2016-08-24 18:44:58 -04:00
|
|
|
- @no_container = true
|
2016-10-30 17:41:13 -04:00
|
|
|
- project_duration = age_map_duration(@blame_groups, @project)
|
2017-06-22 20:07:19 -04:00
|
|
|
- page_title "Blame", @blob.path, @ref
|
2015-09-17 06:16:24 -04:00
|
|
|
|
2016-08-24 18:44:58 -04:00
|
|
|
%div{ class: container_class }
|
|
|
|
#blob-content-holder.tree-holder
|
2017-05-08 19:58:54 -04:00
|
|
|
= render "projects/blob/breadcrumb", blob: @blob, blame: true
|
|
|
|
|
2016-08-24 18:44:58 -04:00
|
|
|
.file-holder
|
2017-04-07 18:13:04 -04:00
|
|
|
= render "projects/blob/header", blob: @blob, blame: true
|
2016-10-30 17:41:13 -04:00
|
|
|
.file-blame-legend
|
|
|
|
= render 'age_map_legend'
|
2016-08-24 18:44:58 -04:00
|
|
|
.table-responsive.file-content.blame.code.js-syntax-highlight
|
|
|
|
%table
|
|
|
|
- current_line = 1
|
|
|
|
- @blame_groups.each do |blame_group|
|
|
|
|
%tr
|
2016-10-30 17:41:13 -04:00
|
|
|
- commit = blame_group[:commit]
|
|
|
|
%td.blame-commit{ class: age_map_class(commit.committed_date, project_duration) }
|
2016-08-24 18:44:58 -04:00
|
|
|
.commit
|
|
|
|
= author_avatar(commit, size: 36)
|
|
|
|
.commit-row-title
|
2017-07-16 11:11:32 -04:00
|
|
|
%span.item-title.str-truncated-100
|
2017-08-23 12:53:29 -04:00
|
|
|
= link_to_markdown commit.title, project_commit_path(@project, commit.id), class: "cdark", title: commit.title
|
2016-08-24 18:44:58 -04:00
|
|
|
.pull-right
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to commit.short_id, project_commit_path(@project, commit), class: "commit-sha"
|
2016-08-24 18:44:58 -04:00
|
|
|
|
|
|
|
.light
|
|
|
|
= commit_author_link(commit, avatar: false)
|
2016-11-30 16:28:42 -05:00
|
|
|
committed
|
2016-09-08 14:57:24 -04:00
|
|
|
#{time_ago_with_tooltip(commit.committed_date)}
|
2016-08-24 18:44:58 -04:00
|
|
|
%td.line-numbers
|
|
|
|
- line_count = blame_group[:lines].count
|
|
|
|
- (current_line...(current_line + line_count)).each do |i|
|
2016-12-26 05:47:16 -05:00
|
|
|
%a.diff-line-num{ href: "#L#{i}", id: "L#{i}", 'data-line-number' => i }
|
2016-08-24 18:44:58 -04:00
|
|
|
= icon("link")
|
|
|
|
= i
|
|
|
|
\
|
|
|
|
- current_line += line_count
|
|
|
|
%td.lines
|
|
|
|
%pre.code.highlight
|
|
|
|
%code
|
|
|
|
- blame_group[:lines].each do |line|
|
|
|
|
#{line}
|