move notes login to one controller

This commit is contained in:
Dmitriy Zaporozhets 2012-02-24 09:16:06 +02:00
parent 81092c0198
commit 215a01f63c
15 changed files with 55 additions and 46 deletions

View file

@ -21,7 +21,7 @@
%p.cgray
Showing #{pluralize(@commit.diffs.count, "changed file")}
= render "commits/diffs", :diffs => @commit.diffs
= render "notes/notes"
= render "notes/notes", :tid => @commit.id, :tt => "commit"
= render "notes/per_line_form"

View file

@ -41,5 +41,5 @@
%div= simple_format @issue.title
.issue_notes= render "notes/notes"
.issue_notes= render "notes/notes", :tid => @issue.id, :tt => "issue"

View file

@ -63,7 +63,7 @@
%img{:src => "/assets/ajax-loader-facebook.gif", :class => "dashboard-loader"}
.merge-request-notes
.merge_request_notes= render "notes/notes"
.merge_request_notes= render "notes/notes", :tid => @merge_request.id, :tt => "merge_request"
.loading{ :style => "display:none;"}
%center= image_tag "ajax-loader.gif"
.clear

View file

@ -2,7 +2,7 @@
= render "notes/form"
.clear
%hr
%ul#notes-list= render "notes/notes_list"
%ul#notes-list
:javascript
$('.delete-note').live('ajax:success', function() {
@ -22,5 +22,5 @@
$('.attach_holder').show();
});
NoteList.init("wall", #{@notes.last.try(:id) || 0}, #{@notes.first.try(:id) || 0});
NoteList.init("#{tid}", "#{tt}", "#{project_notes_path(@project)}");
});

View file

@ -1,5 +1,5 @@
%div.wall_page
= render "notes/notes"
= render "notes/notes", :tid => nil, :tt => "wall"
.loading{ :style => "display:none;"}
%center= image_tag "ajax-loader.gif"

View file

@ -1 +0,0 @@
= render "notes/load"