From 61eb650db0eb05ee6436d662927cb963ec157b76 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Fri, 14 Sep 2012 04:59:55 +0200 Subject: [PATCH] Rename 'notes/notes' partial to 'notes/notes_with_form' --- app/views/commits/show.html.haml | 2 +- app/views/issues/show.html.haml | 2 +- app/views/merge_requests/_show.html.haml | 2 +- app/views/merge_requests/show.js.haml | 2 +- app/views/notes/_notes.html.haml | 11 ----------- app/views/notes/_notes_with_form.html.haml | 11 +++++++++++ app/views/projects/wall.html.haml | 2 +- app/views/snippets/show.html.haml | 2 +- app/views/wikis/show.html.haml | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 app/views/notes/_notes.html.haml create mode 100644 app/views/notes/_notes_with_form.html.haml diff --git a/app/views/commits/show.html.haml b/app/views/commits/show.html.haml index e01f8ea..d12fff9 100644 --- a/app/views/commits/show.html.haml +++ b/app/views/commits/show.html.haml @@ -1,6 +1,6 @@ = render "commits/commit_box" = render "commits/diffs", diffs: @commit.diffs -= render "notes/notes", tid: @commit.id, tt: "commit" += render "notes/notes_with_form", tid: @commit.id, tt: "commit" = render "notes/per_line_form" diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml index 9b1c72a..0b72a82 100644 --- a/app/views/issues/show.html.haml +++ b/app/views/issues/show.html.haml @@ -61,4 +61,4 @@ = markdown @issue.description -.issue_notes#notes= render "notes/notes", tid: @issue.id, tt: "issue" +.issue_notes#notes= render "notes/notes_with_form", tid: @issue.id, tt: "issue" diff --git a/app/views/merge_requests/_show.html.haml b/app/views/merge_requests/_show.html.haml index f1b3fa9..40b7219 100644 --- a/app/views/merge_requests/_show.html.haml +++ b/app/views/merge_requests/_show.html.haml @@ -16,7 +16,7 @@ Diff .merge_request_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" } - = render("notes/notes", tid: @merge_request.id, tt: "merge_request") + = render("notes/notes_with_form", tid: @merge_request.id, tt: "merge_request") .merge-request-diffs = render "merge_requests/show/diffs" if @diffs .status diff --git a/app/views/merge_requests/show.js.haml b/app/views/merge_requests/show.js.haml index 7a27b16..f44ccbb 100644 --- a/app/views/merge_requests/show.js.haml +++ b/app/views/merge_requests/show.js.haml @@ -1,2 +1,2 @@ :plain - $(".merge-request-notes").html("#{escape_javascript(render("notes/notes", tid: @merge_request.id, tt: "merge_request"))}"); + $(".merge-request-notes").html("#{escape_javascript(render notes/notes_with_form", tid: @merge_request.id, tt: "merge_request")}"); diff --git a/app/views/notes/_notes.html.haml b/app/views/notes/_notes.html.haml deleted file mode 100644 index 14e1e84..0000000 --- a/app/views/notes/_notes.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -%ul#notes-list -%ul#new-notes-list -.notes-status - -- if can? current_user, :write_note, @project - = render "notes/form" - -:javascript - $(function(){ - NoteList.init("#{tid}", "#{tt}", "#{project_notes_path(@project)}"); - }); diff --git a/app/views/notes/_notes_with_form.html.haml b/app/views/notes/_notes_with_form.html.haml new file mode 100644 index 0000000..14e1e84 --- /dev/null +++ b/app/views/notes/_notes_with_form.html.haml @@ -0,0 +1,11 @@ +%ul#notes-list +%ul#new-notes-list +.notes-status + +- if can? current_user, :write_note, @project + = render "notes/form" + +:javascript + $(function(){ + NoteList.init("#{tid}", "#{tt}", "#{project_notes_path(@project)}"); + }); diff --git a/app/views/projects/wall.html.haml b/app/views/projects/wall.html.haml index 97765d7..1a07bc3 100644 --- a/app/views/projects/wall.html.haml +++ b/app/views/projects/wall.html.haml @@ -1,2 +1,2 @@ %div.wall_page - = render "notes/notes", tid: nil, tt: "wall" + = render "notes/notes_with_form", tid: nil, tt: "wall" diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml index 0800b81..4188a9f 100644 --- a/app/views/snippets/show.html.haml +++ b/app/views/snippets/show.html.haml @@ -17,4 +17,4 @@ %div{class: current_user.dark_scheme ? "black" : ""} = raw @snippet.colorize(options: { linenos: 'True'}) -= render "notes/notes", tid: @snippet.id, tt: "snippet" += render "notes/notes_with_form", tid: @snippet.id, tt: "snippet" diff --git a/app/views/wikis/show.html.haml b/app/views/wikis/show.html.haml index fc23522..579ea1b 100644 --- a/app/views/wikis/show.html.haml +++ b/app/views/wikis/show.html.haml @@ -21,4 +21,4 @@ Delete this page %hr -.wiki_notes#notes= render "notes/notes", tid: @wiki.id, tt: "wiki" +.wiki_notes#notes= render "notes/notes_with_form", tid: @wiki.id, tt: "wiki" -- libgit2 0.21.2