mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 20:16:39 -04:00
11 lines
No EOL
372 B
JavaScript
11 lines
No EOL
372 B
JavaScript
Template.comment_list.helpers({
|
|
has_comments: function(){
|
|
// note: use this.post to access 'post' object in parent template
|
|
if(this.post){
|
|
return Comments.find({post: this.post._id, parent: null}).count() > 0;
|
|
}
|
|
},
|
|
child_comments: function(){
|
|
return Comments.find({post: this.post._id, parent: null}, {sort: {score: -1, submitted: -1}});
|
|
}
|
|
}) |