From 2edd42cafc821422076ec3aeaaaebd8f81b7aa4f Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 9 Mar 2017 08:59:29 +0000 Subject: [PATCH] Check was in wrong part, the avatar container class should always be added on lines in the changes tab --- app/views/projects/diffs/_line.html.haml | 5 ++--- 1 file 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