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