diff options
Diffstat (limited to 'app/views/projects/blame/show.html.haml')
-rw-r--r-- | app/views/projects/blame/show.html.haml | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index 8d9ec068a43..5f9a92ff93f 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -3,7 +3,7 @@ %h3.page-title Blame view -#tree-holder.tree-holder +#blob-content-holder.tree-holder .file-holder .file-title = blob_icon @blob.mode, @blob.name @@ -12,14 +12,14 @@ %small= number_to_human_size @blob.size .file-actions = render "projects/blob/actions" - .file-content.blame.highlight + .file-content.blame.code.js-syntax-highlight %table - current_line = 1 - - @blame.each do |blame_group| + - @blame_groups.each do |blame_group| %tr %td.blame-commit .commit - - commit = Commit.new(blame_group[:commit], @project) + - commit = blame_group[:commit] .commit-row-title %strong = link_to_gfm truncate(commit.title, length: 35), namespace_project_commit_path(@project.namespace, @project, commit.id), class: "cdark" @@ -30,16 +30,16 @@ = commit_author_link(commit, avatar: false) authored #{time_ago_with_tooltip(commit.committed_date, skip_js: true)} - %td.lines.blame-numbers - %pre - - line_count = blame_group[:lines].count - - (current_line...(current_line + line_count)).each do |i| + %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 + \ + - current_line += line_count %td.lines - %pre{class: 'code highlight white'} + %pre.code.highlight %code - blame_group[:lines].each do |line| - :erb - <%= highlight(@blob.name, line, nowrap: true, continue: true).html_safe %> + #{line} |