Commit 54a5b883 authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'blame-line-link' into 'master'

Added line links to blame table

Closes #4119

See merge request !2915
parents d10b43da fbc578a7
...@@ -91,7 +91,7 @@ class Dispatcher ...@@ -91,7 +91,7 @@ class Dispatcher
new TreeView() new TreeView()
when 'projects:find_file:show' when 'projects:find_file:show'
shortcut_handler = true shortcut_handler = true
when 'projects:blob:show' when 'projects:blob:show', 'projects:blame:show'
new LineHighlighter() new LineHighlighter()
shortcut_handler = new ShortcutsNavigation() shortcut_handler = new ShortcutsNavigation()
when 'projects:labels:new', 'projects:labels:edit' when 'projects:labels:new', 'projects:labels:edit'
......
...@@ -44,8 +44,10 @@ ...@@ -44,8 +44,10 @@
white-space: nowrap; white-space: nowrap;
i { i {
float: left;
margin-top: 3px;
margin-right: 5px;
visibility: hidden; visibility: hidden;
@extend .pull-left;
} }
&:hover i { &:hover i {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
%h3.page-title Blame view %h3.page-title Blame view
#tree-holder.tree-holder #blob-content-holder.tree-holder
.file-holder .file-holder
.file-title .file-title
= blob_icon @blob.mode, @blob.name = blob_icon @blob.mode, @blob.name
...@@ -33,7 +33,9 @@ ...@@ -33,7 +33,9 @@
%td.line-numbers %td.line-numbers
- line_count = blame_group[:lines].count - line_count = blame_group[:lines].count
- (current_line...(current_line + line_count)).each do |i| - (current_line...(current_line + line_count)).each do |i|
%a.diff-line-num= 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 %td.lines
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment