Skip to content
Snippets Groups Projects
Commit 9159be3a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix MR diff comments. Fix wiki comments loading error

parent caeb65b1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -14,7 +14,7 @@
border-top:1px solid #aaa;
}
#new-notes-list.reversed {
border-bottom:1px solid #aaa;
border-bottom:1px solid #ccc;
}
 
.issue_notes,
Loading
Loading
@@ -227,7 +227,7 @@ td .line_note_link {
}
}
 
.note-text {
.note-text {
border: 1px solid #aaa;
box-shadow:none;
}
Loading
Loading
@@ -20,7 +20,7 @@ module Notes
# this is the only case, where the order is DESC
project.common_notes.order("created_at DESC, id DESC").limit(50)
when "wiki"
project.wikis.reverse.map {|w| w.notes.fresh }.flatten[0..20]
project.wiki_notes.limit(20)
end
 
@notes = if after_id
Loading
Loading
Loading
Loading
@@ -171,6 +171,10 @@ class Project < ActiveRecord::Base
end
end
 
def wiki_notes
Note.where(noteable_id: wikis.map(&:id), noteable_type: 'Wiki', project_id: self.id)
end
def project_id
self.id
end
Loading
Loading
Loading
Loading
@@ -28,7 +28,6 @@ class Wiki < ActiveRecord::Base
end
new_wiki
end
end
end
# == Schema Information
Loading
Loading
= render "show"
 
:javascript
$(function(){
PerLineNotes.init();
});
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