summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-03-09 08:59:29 +0000
committerPhil Hughes <me@iamphill.com>2017-03-09 08:59:29 +0000
commit2edd42cafc821422076ec3aeaaaebd8f81b7aa4f (patch)
treec3cb616ce58909245f9d17c790c54cf024e3d11a
parent789bae241cab6fdab00fb8ef632e7e1c9dd34025 (diff)
downloadgitlab-ce-2edd42cafc821422076ec3aeaaaebd8f81b7aa4f.tar.gz
Check was in wrong part, the avatar container class should always be added on lines in the changes tab
-rw-r--r--app/views/projects/diffs/_line.html.haml5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/views/projects/diffs/_line.html.haml b/app/views/projects/diffs/_line.html.haml
index b40d9cb928b..62135d3ae32 100644
--- a/app/views/projects/diffs/_line.html.haml
+++ b/app/views/projects/diffs/_line.html.haml
@@ -5,7 +5,6 @@
- line_code = diff_file.line_code(line)
- if discussions && !line.meta?
- discussion = discussions[line_code]
- - show_discussion_avatars = discussion && discussion.resolvable? && !plain
%tr.line_holder{ class: type, id: (line_code unless plain) }
- case type
- when 'match'
@@ -15,13 +14,13 @@
%td.new_line.diff-line-num
%td.line_content.match= line.text
- else
- %td.old_line.diff-line-num{ class: [type, ("js-avatar-container" if show_discussion_avatars)], data: { linenumber: line.old_pos } }
+ %td.old_line.diff-line-num{ class: [type, ("js-avatar-container" if !plain)], data: { linenumber: line.old_pos } }
- link_text = type == "new" ? " " : line.old_pos
- if plain
= link_text
- else
%a{ href: "##{line_code}", data: { linenumber: link_text } }
- - if show_discussion_avatars
+ - if discussion && discussion.resolvable? && !plain
%diff-note-avatars{ "discussion-id" => discussion.id }
%td.new_line.diff-line-num{ class: type, data: { linenumber: line.new_pos } }
- link_text = type == "old" ? " " : line.new_pos