Welcome to mirror list, hosted at ThFree Co, Russian Federation.

create.js.haml « notes « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c113b3482ecf04b26a83d75fbf556860f99b8d65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
- if @note.valid?
  var noteHtml = "#{escape_javascript(render @note)}";

  - if note_for_main_target?(@note)
    NoteList.appendNewNote(#{@note.id}, noteHtml);
  - else
    :plain
      var firstDiscussionNoteHtml = "#{escape_javascript(render "projects/notes/diff_notes_with_reply", notes: [@note])}";
      NoteList.appendNewDiscussionNote("#{@note.discussion_id}",
                                       firstDiscussionNoteHtml,
                                       noteHtml);

- else
  var errorsHtml = "#{escape_javascript(render 'projects/notes/form_errors', note: @note)}";
  - if note_for_main_target?(@note)
    NoteList.errorsOnForm(errorsHtml);
  - else
    NoteList.errorsOnForm(errorsHtml, "#{@note.discussion_id}");