diff options
author | Phil Hughes <me@iamphill.com> | 2016-02-22 17:09:13 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-02-22 17:09:13 +0300 |
commit | fbc578a7eced90ccb71687aaefa2d429a5ace63b (patch) | |
tree | a72e47c200c1d2c24f88f002e511899bca802322 | |
parent | f51d8af5a72e563b3ea87668b6f4981dcbcdcd14 (diff) |
Added line links to blame table
Closes #4119
-rw-r--r-- | app/assets/javascripts/dispatcher.js.coffee | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/highlight.scss | 4 | ||||
-rw-r--r-- | app/views/projects/blame/show.html.haml | 6 |
3 files changed, 8 insertions, 4 deletions
diff --git a/app/assets/javascripts/dispatcher.js.coffee b/app/assets/javascripts/dispatcher.js.coffee index b17f8e51470..407005d8adf 100644 --- a/app/assets/javascripts/dispatcher.js.coffee +++ b/app/assets/javascripts/dispatcher.js.coffee @@ -91,7 +91,7 @@ class Dispatcher new TreeView() when 'projects:find_file:show' shortcut_handler = true - when 'projects:blob:show' + when 'projects:blob:show', 'projects:blame:show' new LineHighlighter() shortcut_handler = new ShortcutsNavigation() when 'projects:labels:new', 'projects:labels:edit' diff --git a/app/assets/stylesheets/framework/highlight.scss b/app/assets/stylesheets/framework/highlight.scss index 9854df4c45c..12e2f00fe89 100644 --- a/app/assets/stylesheets/framework/highlight.scss +++ b/app/assets/stylesheets/framework/highlight.scss @@ -44,8 +44,10 @@ white-space: nowrap; i { + float: left; + margin-top: 3px; + margin-right: 5px; visibility: hidden; - @extend .pull-left; } &:hover i { diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index eb6fbfaffa0..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 @@ -33,7 +33,9 @@ %td.line-numbers - line_count = blame_group[:lines].count - (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 %td.lines |