Skip to content
Snippets Groups Projects
Commit 494ae878 authored by Riyad Preukschas's avatar Riyad Preukschas
Browse files

Refactor discussion reply

parent 1319373d
No related branches found
No related tags found
1 merge request!1878Discussions (a.k.a. Grouped Comments)
= link_to "javascript:;",
class: "btn reply-btn js-discussion-reply-button",
data: { noteable_type: note.noteable_type,
noteable_id: note.noteable_id,
line_code: note.line_code,
discussion_id: note.discussion_id },
title: "Add a reply" do
%i.icon-comment
Reply
%ul#notes-list.notes
%ul#new-notes-list.notes
.notes-status
 
- if can? current_user, :write_note, @project
.note-forms.js-note-forms
= render "notes/common_form"
= render "notes/diff_note_form"
= render "notes/discussion_note_form"
 
:javascript
$(function(){
NoteList.init("#{tid}", "#{tt}", "#{project_notes_path(@project)}");
NoteList.init("#{@target_id}", "#{@target_type}", "#{project_notes_path(@project)}");
});
Loading
Loading
@@ -7,5 +7,5 @@
 
:javascript
$(function(){
NoteList.init("#{tid}", "#{tt}", "#{project_notes_path(@project)}");
NoteList.init("#{@target_id}", "#{@target_type}", "#{project_notes_path(@project)}");
});
- if @note.line_code
= render "create_diff_note", note: @note
- else
- if note_for_main_target?(@note)
= render "create_common_note", note: @note
- else
= render "create_discussion_note", note: @note
%div.wall_page
= render "notes/reversed_notes_with_form", tid: nil, tt: "wall"
= render "notes/reversed_notes_with_form"
Loading
Loading
@@ -8,4 +8,4 @@
 
%br
%div= render 'blob'
%div#notes= render "notes/notes_with_form", tid: @snippet.id, tt: "snippet"
%div#notes= render "notes/notes_with_form"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment