Commit 61eb650db0eb05ee6436d662927cb963ec157b76

Authored by Riyad Preukschas
1 parent cee230a1

Rename 'notes/notes' partial to 'notes/notes_with_form'

app/views/commits/show.html.haml
1 1 = render "commits/commit_box"
2 2 = render "commits/diffs", diffs: @commit.diffs
3   -= render "notes/notes", tid: @commit.id, tt: "commit"
  3 += render "notes/notes_with_form", tid: @commit.id, tt: "commit"
4 4 = render "notes/per_line_form"
5 5  
6 6  
... ...
app/views/issues/show.html.haml
... ... @@ -61,4 +61,4 @@
61 61 = markdown @issue.description
62 62  
63 63  
64   -.issue_notes#notes= render "notes/notes", tid: @issue.id, tt: "issue"
  64 +.issue_notes#notes= render "notes/notes_with_form", tid: @issue.id, tt: "issue"
... ...
app/views/merge_requests/_show.html.haml
... ... @@ -16,7 +16,7 @@
16 16 Diff
17 17  
18 18 .merge_request_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" }
19   - = render("notes/notes", tid: @merge_request.id, tt: "merge_request")
  19 + = render("notes/notes_with_form", tid: @merge_request.id, tt: "merge_request")
20 20 .merge-request-diffs
21 21 = render "merge_requests/show/diffs" if @diffs
22 22 .status
... ...
app/views/merge_requests/show.js.haml
1 1 :plain
2   - $(".merge-request-notes").html("#{escape_javascript(render("notes/notes", tid: @merge_request.id, tt: "merge_request"))}");
  2 + $(".merge-request-notes").html("#{escape_javascript(render notes/notes_with_form", tid: @merge_request.id, tt: "merge_request")}");
... ...
app/views/notes/_notes.html.haml
... ... @@ -1,11 +0,0 @@
1   -%ul#notes-list
2   -%ul#new-notes-list
3   -.notes-status
4   -
5   -- if can? current_user, :write_note, @project
6   - = render "notes/form"
7   -
8   -:javascript
9   - $(function(){
10   - NoteList.init("#{tid}", "#{tt}", "#{project_notes_path(@project)}");
11   - });
app/views/notes/_notes_with_form.html.haml 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +%ul#notes-list
  2 +%ul#new-notes-list
  3 +.notes-status
  4 +
  5 +- if can? current_user, :write_note, @project
  6 + = render "notes/form"
  7 +
  8 +:javascript
  9 + $(function(){
  10 + NoteList.init("#{tid}", "#{tt}", "#{project_notes_path(@project)}");
  11 + });
... ...
app/views/projects/wall.html.haml
1 1 %div.wall_page
2   - = render "notes/notes", tid: nil, tt: "wall"
  2 + = render "notes/notes_with_form", tid: nil, tt: "wall"
... ...
app/views/snippets/show.html.haml
... ... @@ -17,4 +17,4 @@
17 17 %div{class: current_user.dark_scheme ? "black" : ""}
18 18 = raw @snippet.colorize(options: { linenos: 'True'})
19 19  
20   -= render "notes/notes", tid: @snippet.id, tt: "snippet"
  20 += render "notes/notes_with_form", tid: @snippet.id, tt: "snippet"
... ...
app/views/wikis/show.html.haml
... ... @@ -21,4 +21,4 @@
21 21 Delete this page
22 22  
23 23 %hr
24   -.wiki_notes#notes= render "notes/notes", tid: @wiki.id, tt: "wiki"
  24 +.wiki_notes#notes= render "notes/notes_with_form", tid: @wiki.id, tt: "wiki"
... ...