Skip to content
Snippets Groups Projects
Commit a1e6fc15 authored by Stan Hu's avatar Stan Hu
Browse files

Merge branch 'issue-2216' into 'master'

Diff colors on MR Discussion like on Changes-tab

Fixes #2216

# Before
![Screen_Shot_2015-08-06_at_21.44.58](https://gitlab.com/gert/gitlab-ce/uploads/ed5935e0713dd58f9cd4b17a1fecaa86/Screen_Shot_2015-08-06_at_21.44.58.png)

# After
![Screen_Shot_2015-08-06_at_21.44.33](https://gitlab.com/gert/gitlab-ce/uploads/0816360afcc7cf860d2eadf8dd63b49e/Screen_Shot_2015-08-06_at_21.44.33.png)

See merge request !1108
parents 5fb5fd25 3bd50383
No related branches found
No related tags found
No related merge requests found
Please view this file on the master branch, on stable branches it's out of date.
 
v 7.14.0 (unreleased)
- Fix coloring of diffs on MR Discussion-tab (Gert Goet)
- Fix "Network" and "Graphs" pages for branches with encoded slashes (Stan Hu)
- Fix errors deleting and creating branches with encoded slashes (Stan Hu)
- Always add current user to autocomplete controller to support filter by "Me" (Stan Hu)
Loading
Loading
Loading
Loading
@@ -12,18 +12,19 @@
.diff-content
%table
- note.truncated_diff_lines.each do |line|
- type = line.type
- line_code = generate_line_code(note.file_path, line)
%tr.line_holder{ id: line_code }
- if line.type == "match"
%tr.line_holder{ id: line_code, class: "#{type}" }
- if type == "match"
%td.old_line= "..."
%td.new_line= "..."
%td.line_content.matched= line.text
- else
%td.old_line{class: line.type == "new" ? "new" : "old"}
= raw(line.type == "new" ? " " : line.old_pos)
%td.new_line{class: line.type == "new" ? "new" : "old"}
= raw(line.type == "old" ? " " : line.new_pos)
%td.line_content{class: "noteable_line #{line.type} #{line_code}", "line_code" => line_code}= raw diff_line_content(line.text)
%td.old_line
= raw(type == "new" ? " " : line.old_pos)
%td.new_line
= raw(type == "old" ? " " : line.new_pos)
%td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw diff_line_content(line.text)
 
- if line_code == note.line_code
= render "projects/notes/diff_notes_with_reply", notes: discussion_notes
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment