summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiyad Preukschas <riyad@informatik.uni-bremen.de>2012-11-17 20:24:12 +0100
committerRiyad Preukschas <riyad@informatik.uni-bremen.de>2012-12-03 22:51:56 +0100
commit3bc507e5c5139c3e43558152675e222dd4b25927 (patch)
treedca5f8551c30808cecdff73272cf3031eb754e94
parent534bd5a268bc3409db1352198222275ff844316d (diff)
downloadgitlab-ce-3bc507e5c5139c3e43558152675e222dd4b25927.tar.gz
Rename diff note partials
-rw-r--r--app/views/commit/show.html.haml2
-rw-r--r--app/views/commits/_text_file.html.haml4
-rw-r--r--app/views/merge_requests/_show.html.haml2
-rw-r--r--app/views/notes/_create_diff_note.js.haml (renamed from app/views/notes/_create_per_line_note.js.haml)6
-rw-r--r--app/views/notes/_diff_note.html.haml (renamed from app/views/notes/_per_line_note.html.haml)0
-rw-r--r--app/views/notes/_diff_note_form.html.haml (renamed from app/views/notes/_per_line_form.html.haml)0
-rw-r--r--app/views/notes/_diff_note_link.html.haml (renamed from app/views/notes/_per_line_note_link.html.haml)0
-rw-r--r--app/views/notes/_diff_notes_reply_button.html.haml (renamed from app/views/notes/_per_line_reply_button.html.haml)0
-rw-r--r--app/views/notes/_diff_notes_with_reply.html.haml3
-rw-r--r--app/views/notes/_discussion_diff.html.haml2
-rw-r--r--app/views/notes/_per_line_notes_with_reply.html.haml3
-rw-r--r--app/views/notes/create.js.haml2
12 files changed, 12 insertions, 12 deletions
diff --git a/app/views/commit/show.html.haml b/app/views/commit/show.html.haml
index 432d55b19e3..1157ae7adce 100644
--- a/app/views/commit/show.html.haml
+++ b/app/views/commit/show.html.haml
@@ -1,7 +1,7 @@
= 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
diff --git a/app/views/commits/_text_file.html.haml b/app/views/commits/_text_file.html.haml
index 5e7886922b4..3d9014c3a3f 100644
--- a/app/views/commits/_text_file.html.haml
+++ b/app/views/commits/_text_file.html.haml
@@ -13,11 +13,11 @@
%td.old_line
= link_to raw(type == "new" ? "&nbsp;" : 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" ? "&nbsp;" : line_new) , "##{line_code}", id: line_code
%td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line} &nbsp;"
- 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
diff --git a/app/views/merge_requests/_show.html.haml b/app/views/merge_requests/_show.html.haml
index a09a77c043e..9c5f4af26c3 100644
--- a/app/views/merge_requests/_show.html.haml
+++ b/app/views/merge_requests/_show.html.haml
@@ -21,7 +21,7 @@
= render "merge_requests/show/diffs" if @diffs
.status
-= render "notes/per_line_form"
+= render "notes/diff_note_form"
:javascript
$(function(){
diff --git a/app/views/notes/_create_per_line_note.js.haml b/app/views/notes/_create_diff_note.js.haml
index 6f74699996b..453053bd728 100644
--- a/app/views/notes/_create_per_line_note.js.haml
+++ b/app/views/notes/_create_diff_note.js.haml
@@ -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)}");
}
diff --git a/app/views/notes/_per_line_note.html.haml b/app/views/notes/_diff_note.html.haml
index 28bcd6e0c94..28bcd6e0c94 100644
--- a/app/views/notes/_per_line_note.html.haml
+++ b/app/views/notes/_diff_note.html.haml
diff --git a/app/views/notes/_per_line_form.html.haml b/app/views/notes/_diff_note_form.html.haml
index 9210be977f6..9210be977f6 100644
--- a/app/views/notes/_per_line_form.html.haml
+++ b/app/views/notes/_diff_note_form.html.haml
diff --git a/app/views/notes/_per_line_note_link.html.haml b/app/views/notes/_diff_note_link.html.haml
index d25577eac5a..d25577eac5a 100644
--- a/app/views/notes/_per_line_note_link.html.haml
+++ b/app/views/notes/_diff_note_link.html.haml
diff --git a/app/views/notes/_per_line_reply_button.html.haml b/app/views/notes/_diff_notes_reply_button.html.haml
index edd84eaef2d..edd84eaef2d 100644
--- a/app/views/notes/_per_line_reply_button.html.haml
+++ b/app/views/notes/_diff_notes_reply_button.html.haml
diff --git a/app/views/notes/_diff_notes_with_reply.html.haml b/app/views/notes/_diff_notes_with_reply.html.haml
new file mode 100644
index 00000000000..43f954d532f
--- /dev/null
+++ b/app/views/notes/_diff_notes_with_reply.html.haml
@@ -0,0 +1,3 @@
+- notes.each do |note|
+ = render "notes/diff_note", note: note
+= render "notes/diff_notes_reply_button", note: notes.first
diff --git a/app/views/notes/_discussion_diff.html.haml b/app/views/notes/_discussion_diff.html.haml
index 4cd227d68c6..544435af6ba 100644
--- a/app/views/notes/_discussion_diff.html.haml
+++ b/app/views/notes/_discussion_diff.html.haml
@@ -20,5 +20,5 @@
%td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line} &nbsp;"
- 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
diff --git a/app/views/notes/_per_line_notes_with_reply.html.haml b/app/views/notes/_per_line_notes_with_reply.html.haml
deleted file mode 100644
index ebe0c5c6c47..00000000000
--- a/app/views/notes/_per_line_notes_with_reply.html.haml
+++ /dev/null
@@ -1,3 +0,0 @@
-- notes.each do |note|
- = render "notes/per_line_note", note: note
-= render "notes/per_line_reply_button", note: notes.first
diff --git a/app/views/notes/create.js.haml b/app/views/notes/create.js.haml
index 03866591c4f..9921312e6eb 100644
--- a/app/views/notes/create.js.haml
+++ b/app/views/notes/create.js.haml
@@ -1,5 +1,5 @@
- if @note.line_code
- = render "create_per_line_note", note: @note
+ = render "create_diff_note", note: @note
- else
= render "create_common_note", note: @note