debian-mirror-gitlab/app/views/projects/blame/show.html.haml

44 lines
1.6 KiB
Text
Raw Normal View History

2015-09-11 14:41:01 +05:30
- page_title "Blame", @blob.path, @ref
2015-09-25 12:07:36 +05:30
- header_title project_title(@project, "Files", project_files_path(@project))
2014-09-02 18:07:02 +05:30
%h3.page-title Blame view
#tree-holder.tree-holder
.file-holder
.file-title
2015-12-23 02:04:40 +05:30
= blob_icon @blob.mode, @blob.name
2015-04-26 12:48:37 +05:30
%strong
2014-09-02 18:07:02 +05:30
= @path
2015-04-26 12:48:37 +05:30
%small= number_to_human_size @blob.size
.file-actions
= render "projects/blob/actions"
2016-02-05 20:25:01 +05:30
.file-content.blame.code.js-syntax-highlight
2014-09-02 18:07:02 +05:30
%table
2015-09-11 14:41:01 +05:30
- current_line = 1
2016-02-05 20:25:01 +05:30
- @blame_groups.each do |blame_group|
2014-09-02 18:07:02 +05:30
%tr
%td.blame-commit
2015-09-11 14:41:01 +05:30
.commit
2016-02-05 20:25:01 +05:30
- commit = blame_group[:commit]
2015-09-11 14:41:01 +05:30
.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: "monospace"
 
.light
= commit_author_link(commit, avatar: false)
authored
2015-09-25 12:07:36 +05:30
#{time_ago_with_tooltip(commit.committed_date, skip_js: true)}
2016-02-05 20:25:01 +05:30
%td.line-numbers
- line_count = blame_group[:lines].count
- (current_line...(current_line + line_count)).each do |i|
%a.diff-line-num= i
\
- current_line += line_count
2014-09-02 18:07:02 +05:30
%td.lines
2016-02-05 20:25:01 +05:30
%pre.code.highlight
2015-04-26 12:48:37 +05:30
%code
2015-09-11 14:41:01 +05:30
- blame_group[:lines].each do |line|
2016-02-05 20:25:01 +05:30
#{line}