Commit 3bc507e5 authored by Riyad Preukschas's avatar Riyad Preukschas

Rename diff note partials

parent 534bd5a2
= render "commits/commit_box"
= render "commits/diffs", diffs: @commit.diffs
= render "notes/notes_with_form", tid: @commit.id, tt: "commit"
= render "notes/per_line_form"
= render "notes/diff_note_form"
:javascript
......
......@@ -13,11 +13,11 @@
%td.old_line
= link_to raw(type == "new" ? " " : line_old), "##{line_code}", id: line_code
- if @comments_allowed
= render "notes/per_line_note_link", line_code: line_code
= render "notes/diff_note_link", line_code: line_code
%td.new_line= link_to raw(type == "old" ? " " : line_new) , "##{line_code}", id: line_code
%td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line}  "
- if @reply_allowed
- comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at)
- unless comments.empty?
= render "notes/per_line_notes_with_reply", notes: comments
= render "notes/diff_notes_with_reply", notes: comments
......@@ -21,7 +21,7 @@
= render "merge_requests/show/diffs" if @diffs
.status
= render "notes/per_line_form"
= render "notes/diff_note_form"
:javascript
$(function(){
......
......@@ -11,9 +11,9 @@
// find the commented line ...
var trEl = $(".#{note.line_code}").parent();
// ... and insert the note and the reply button after it
trEl.after("#{escape_javascript(render "notes/per_line_reply_button", note: note)}");
trEl.after("#{escape_javascript(render "notes/per_line_note", note: note)}");
trEl.after("#{escape_javascript(render "notes/diff_notes_reply_button", note: note)}");
trEl.after("#{escape_javascript(render "notes/diff_note", note: note)}");
} else {
// instert new note before reply button
trRpl.before("#{escape_javascript(render "notes/per_line_note", note: note)}");
trRpl.before("#{escape_javascript(render "notes/diff_note", note: note)}");
}
- notes.each do |note|
= render "notes/diff_note", note: note
= render "notes/diff_notes_reply_button", note: notes.first
......@@ -20,5 +20,5 @@
%td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line}  "
- if line_code == note.line_code
= render "notes/per_line_notes_with_reply", notes: discussion_notes
= render "notes/diff_notes_with_reply", notes: discussion_notes
- break # cut off diff after notes
- notes.each do |note|
= render "notes/per_line_note", note: note
= render "notes/per_line_reply_button", note: notes.first
- if @note.line_code
= render "create_per_line_note", note: @note
= render "create_diff_note", note: @note
- else
= render "create_common_note", note: @note
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment