prevent diff unfolding link from appearing for deleted files

This commit is contained in:
Mike Greiling 2017-02-16 15:38:10 -06:00
parent 3b67af697c
commit 2d0c0308d5
2 changed files with 2 additions and 2 deletions

View file

@ -43,7 +43,7 @@
- discussion_left, discussion_right = parallel_diff_discussions(left, right, diff_file)
- if discussion_left || discussion_right
= render "discussions/parallel_diff_discussion", discussion_left: discussion_left, discussion_right: discussion_right
- if !diff_file.new_file && diff_file.diff_lines.any?
- if !diff_file.new_file && !diff_file.deleted_file && diff_file.diff_lines.any?
- last_line = diff_file.diff_lines.last
- if last_line.new_pos < total_lines
%tr.line_holder.parallel

View file

@ -10,7 +10,7 @@
as: :line,
locals: { diff_file: diff_file, discussions: discussions }
- if !diff_file.new_file && diff_file.highlighted_diff_lines.any?
- if !diff_file.new_file && !diff_file.deleted_file && diff_file.highlighted_diff_lines.any?
- last_line = diff_file.highlighted_diff_lines.last
- if last_line.new_pos < total_lines
%tr.line_holder