Pull together and rename Notes partials
This commit is contained in:
parent
6fc10fa256
commit
c20af32ae4
7 changed files with 24 additions and 30 deletions
|
@ -1,4 +1,16 @@
|
|||
- if note_for_main_target?(@note)
|
||||
= render "create_common_note", note: @note
|
||||
- if @note.valid?
|
||||
var noteHtml = "#{escape_javascript(render "notes/note", note: @note)}";
|
||||
|
||||
- if note_for_main_target?(@note)
|
||||
- if @note.for_wall?
|
||||
NoteList.appendNewWallNote(#{@note.id}, noteHtml);
|
||||
- else
|
||||
NoteList.appendNewNote(#{@note.id}, noteHtml);
|
||||
- else
|
||||
var firstDiscussionNoteHtml = "#{escape_javascript(render "notes/diff_notes_with_reply", notes: [@note])}";
|
||||
NoteList.appendNewDiscussionNote("#{@note.discussion_id}", firstDiscussionNoteHtml, noteHtml);
|
||||
|
||||
- else
|
||||
= render "create_discussion_note", note: @note
|
||||
-# TODO: insert form correctly
|
||||
$(".js-main-target-note").replaceWith("#{escape_javascript(render 'notes/common_form')}");
|
||||
GitLab.GfmAutoComplete.setup();
|
Loading…
Add table
Add a link
Reference in a new issue