diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-11-15 15:30:05 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-11-16 13:08:08 -0500 |
commit | c8e53d4467e1e8cce4db04aafba00d55f014e283 (patch) | |
tree | 16d79078bfa633c4fa2e9dd7c181aa6f84ce0490 /app/views/projects/notes | |
parent | 43d5eca084112dc29df5ca1a521f95acaf3c9ccb (diff) | |
download | gitlab-ce-c8e53d4467e1e8cce4db04aafba00d55f014e283.tar.gz |
Revert "Merge pull request #9820 from huacnlee/avoid-render-form-in-notes-list"rs-revert-gh-9820
This reverts commit 63144cd062f6d259f1f30b6e06eb92a16caa8dec, reversing
changes made to 8ab5df9d872414b2cca3ebd16d57b89e2f19e06a.
Diffstat (limited to 'app/views/projects/notes')
-rw-r--r-- | app/views/projects/notes/_note.html.haml | 5 | ||||
-rw-r--r-- | app/views/projects/notes/_notes_with_form.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/notes/edit.js.erb | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml index 8a3292f7daf..88808301985 100644 --- a/app/views/projects/notes/_note.html.haml +++ b/app/views/projects/notes/_note.html.haml @@ -7,7 +7,7 @@ .note-header - if note_editable?(note) .note-actions - = link_to edit_namespace_project_note_path(note.project.namespace, note.project, note), title: 'Edit comment', remote: true, class: 'js-note-edit' do + = link_to '#', title: 'Edit comment', class: 'js-note-edit' do = icon('pencil-square-o') = link_to namespace_project_note_path(note.project.namespace, note.project, note), title: 'Remove comment', method: :delete, data: { confirm: 'Are you sure you want to remove this comment?' }, remote: true, class: 'js-note-delete danger' do @@ -59,6 +59,9 @@ .note-text = preserve do = markdown(note.note, {no_header_anchors: true}) + - unless note.system? + -# System notes can't be edited + = render 'projects/notes/edit_form', note: note - if note.attachment.url .note-attachment diff --git a/app/views/projects/notes/_notes_with_form.html.haml b/app/views/projects/notes/_notes_with_form.html.haml index 91cefa6d14d..04222b8f7c4 100644 --- a/app/views/projects/notes/_notes_with_form.html.haml +++ b/app/views/projects/notes/_notes_with_form.html.haml @@ -7,4 +7,4 @@ = render "projects/notes/form", view: params[:view] :javascript - window._notes = new Notes("#{namespace_project_notes_path(namespace_id: @project.namespace, target_id: @noteable.id, target_type: @noteable.class.name.underscore)}", #{@notes.map(&:id).to_json}, #{Time.now.to_i}, "#{params[:view]}") + new Notes("#{namespace_project_notes_path(namespace_id: @project.namespace, target_id: @noteable.id, target_type: @noteable.class.name.underscore)}", #{@notes.map(&:id).to_json}, #{Time.now.to_i}, "#{params[:view]}") diff --git a/app/views/projects/notes/edit.js.erb b/app/views/projects/notes/edit.js.erb deleted file mode 100644 index 2599bad5d6e..00000000000 --- a/app/views/projects/notes/edit.js.erb +++ /dev/null @@ -1,2 +0,0 @@ -$note = $('.note-row-<%= @note.id %>:visible'); -_notes.showEditForm($note, '<%= escape_javascript(render('edit_form', note: @note)) %>'); |