summaryrefslogtreecommitdiff
path: root/app/views/projects/notes/_notes.html.haml
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-07-20 16:18:18 -0600
committerDouwe Maan <douwe@selenight.nl>2016-07-20 16:18:18 -0600
commit79214be727aaa0704a1be5b50aa6dd3011629bc2 (patch)
tree8be3ad3775acebb43b114cd90a8fc919097a7b2c /app/views/projects/notes/_notes.html.haml
parent5a77eb153669bfbac4ab1f05615d11965beb826d (diff)
downloadgitlab-ce-79214be727aaa0704a1be5b50aa6dd3011629bc2.tar.gz
Add Discussion model to represent MR/diff discussiondiscussion-model
Diffstat (limited to 'app/views/projects/notes/_notes.html.haml')
-rw-r--r--app/views/projects/notes/_notes.html.haml12
1 files changed, 5 insertions, 7 deletions
diff --git a/app/views/projects/notes/_notes.html.haml b/app/views/projects/notes/_notes.html.haml
index ebf7e8a9cb3..022578bd6db 100644
--- a/app/views/projects/notes/_notes.html.haml
+++ b/app/views/projects/notes/_notes.html.haml
@@ -1,10 +1,8 @@
- if @discussions.present?
- - @discussions.each do |discussion_notes|
- - note = discussion_notes.first
- - if note_for_main_target?(note)
- = render partial: "projects/notes/note", object: note, as: :note
+ - @discussions.each do |discussion|
+ - if discussion.for_target?(@noteable)
+ = render partial: "projects/notes/note", object: discussion.first_note, as: :note
- else
- = render 'projects/notes/discussion', discussion_notes: discussion_notes
+ = render 'discussions/discussion', discussion: discussion
- else
- - @notes.each do |note|
- = render partial: "projects/notes/note", object: note, as: :note
+ = render partial: "projects/notes/note", collection: @notes, as: :note