Fix MR diff comments. Fix wiki comments loading error
This commit is contained in:
parent
caeb65b189
commit
9159be3a50
|
@ -14,7 +14,7 @@
|
||||||
border-top:1px solid #aaa;
|
border-top:1px solid #aaa;
|
||||||
}
|
}
|
||||||
#new-notes-list.reversed {
|
#new-notes-list.reversed {
|
||||||
border-bottom:1px solid #aaa;
|
border-bottom:1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.issue_notes,
|
.issue_notes,
|
||||||
|
@ -227,7 +227,7 @@ td .line_note_link {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.note-text {
|
.note-text {
|
||||||
border: 1px solid #aaa;
|
border: 1px solid #aaa;
|
||||||
box-shadow:none;
|
box-shadow:none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ module Notes
|
||||||
# this is the only case, where the order is DESC
|
# this is the only case, where the order is DESC
|
||||||
project.common_notes.order("created_at DESC, id DESC").limit(50)
|
project.common_notes.order("created_at DESC, id DESC").limit(50)
|
||||||
when "wiki"
|
when "wiki"
|
||||||
project.wikis.reverse.map {|w| w.notes.fresh }.flatten[0..20]
|
project.wiki_notes.limit(20)
|
||||||
end
|
end
|
||||||
|
|
||||||
@notes = if after_id
|
@notes = if after_id
|
||||||
|
|
|
@ -171,6 +171,10 @@ class Project < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def wiki_notes
|
||||||
|
Note.where(noteable_id: wikis.map(&:id), noteable_type: 'Wiki', project_id: self.id)
|
||||||
|
end
|
||||||
|
|
||||||
def project_id
|
def project_id
|
||||||
self.id
|
self.id
|
||||||
end
|
end
|
||||||
|
|
|
@ -28,7 +28,6 @@ class Wiki < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
new_wiki
|
new_wiki
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# == Schema Information
|
# == Schema Information
|
||||||
|
|
|
@ -1,2 +1,6 @@
|
||||||
= render "show"
|
= render "show"
|
||||||
|
|
||||||
|
:javascript
|
||||||
|
$(function(){
|
||||||
|
PerLineNotes.init();
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue