Display new diff notes and allow creation through the web interface

This commit is contained in:
Douwe Maan
2016-07-06 18:51:00 -04:00
parent 521a0a20f7
commit 29d574868a
14 changed files with 622 additions and 78 deletions
+13 -3
View File
@@ -18,6 +18,7 @@ module Gitlab
line_code = diff_file.line_code(line)
line_new = line.new_pos
line_old = line.old_pos
position = diff_file.position(line)
next_line = diff_file.next_line(line.index)
@@ -26,6 +27,7 @@ module Gitlab
full_next_line = next_line.text
next_line_code = diff_file.line_code(next_line)
next_type = next_line.type
next_position = diff_file.position(next_line)
end
case type
@@ -37,12 +39,14 @@ module Gitlab
number: line_old,
text: full_line,
line_code: line_code,
position: position
},
right: {
type: type,
number: line_new,
text: full_line,
line_code: line_code
line_code: line_code,
position: position
}
}
when 'old'
@@ -55,12 +59,14 @@ module Gitlab
number: line_old,
text: full_line,
line_code: line_code,
position: position
},
right: {
type: next_type,
number: line_new,
text: full_next_line,
line_code: next_line_code,
position: next_position,
}
}
skip_next = true
@@ -73,12 +79,14 @@ module Gitlab
number: line_old,
text: full_line,
line_code: line_code,
position: position
},
right: {
type: next_type,
number: nil,
text: "",
line_code: nil
line_code: nil,
position: nil
}
}
end
@@ -95,12 +103,14 @@ module Gitlab
number: nil,
text: "",
line_code: line_code,
position: position
},
right: {
type: type,
number: line_new,
text: full_line,
line_code: line_code
line_code: line_code,
position: position
}
}
end