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

47 lines
1.7 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-04-26 12:48:37 +05:30
%i.fa.fa-file
%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"
.file-content.blame.highlight
2014-09-02 18:07:02 +05:30
%table
2015-09-11 14:41:01 +05:30
- current_line = 1
- @blame.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
- commit = Commit.new(blame_group[:commit], @project)
.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)}
2014-09-02 18:07:02 +05:30
%td.lines.blame-numbers
%pre
2015-09-11 14:41:01 +05:30
- line_count = blame_group[:lines].count
- (current_line...(current_line + line_count)).each do |i|
2015-04-26 12:48:37 +05:30
= i
\
2015-09-11 14:41:01 +05:30
- current_line += line_count
2014-09-02 18:07:02 +05:30
%td.lines
2015-04-26 12:48:37 +05:30
%pre{class: 'code highlight white'}
%code
2015-09-11 14:41:01 +05:30
- blame_group[:lines].each do |line|
:erb
<%= highlight(@blob.name, line, nowrap: true, continue: true).html_safe %>