mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 20:16:39 -04:00
21 lines
No EOL
652 B
JavaScript
21 lines
No EOL
652 B
JavaScript
Template.comment_list.created = function(){
|
|
postObject = this.data;
|
|
}
|
|
|
|
Template.comment_list.helpers({
|
|
has_comments: function(){
|
|
var post = this;
|
|
var comments = Comments.find({post: post._id, parent: null}, {sort: {score: -1, submitted: -1}});
|
|
return comments.count() > 0;
|
|
},
|
|
child_comments: function(){
|
|
var post = this;
|
|
var comments = Comments.find({post: post._id, parent: null}, {sort: {score: -1, submitted: -1}});
|
|
return comments;
|
|
}
|
|
});
|
|
|
|
Template.comment_list.rendered = function(){
|
|
// once all comments have been rendered, activate comment queuing for future real-time comments
|
|
window.queueComments = true;
|
|
} |