mirror of
https://github.com/vale981/Vulcan
synced 2025-03-08 19:11:38 -05:00
12 lines
No EOL
409 B
JavaScript
12 lines
No EOL
409 B
JavaScript
Template.comment_list.helpers({
|
|
has_comments: function(){
|
|
var post = Posts.findOne(Session.get('selectedPostId'));
|
|
if(post){
|
|
return Comments.find({post: post._id, parent: null}).count() > 0;
|
|
}
|
|
},
|
|
child_comments: function(){
|
|
var post = Posts.findOne(Session.get('selectedPostId'));
|
|
return Comments.find({post: post._id, parent: null}, {sort: {score: -1, submitted: -1}});
|
|
}
|
|
}) |