gitlab-org--gitlab-foss/app/views/projects/notes/_notes.html.haml
Rémy Coutable 5efbfa14d4 Move complex view condition to a model method
This is moved to a model method rather than an helper method because the
API will need it too.
2016-01-13 16:37:17 +01:00

15 lines
483 B
Text

- if @discussions.present?
- @discussions.each do |discussion_notes|
- note = discussion_notes.first
- if note_for_main_target?(note)
- next if note.cross_reference_not_visible_for?(current_user)
= render discussion_notes
- else
= render 'projects/notes/discussion', discussion_notes: discussion_notes
- else
- @notes.each do |note|
- next unless note.author
- next if note.cross_reference_not_visible_for?(current_user)
= render note