Vulcan/client/views/comments/comment_page.js
2012-10-05 13:59:40 +09:00

15 lines
No EOL
447 B
JavaScript

Template.comment_page.post = function(){
var selectedComment = Comments.findOne(Session.get('selectedCommentId'));
return selectedComment && Posts.findOne(selectedComment.post);
};
Template.comment_page.helpers({
comment: function(){
var comment = Comments.findOne(Session.get('selectedCommentId'));
Template.comment_page.repress_recursion = true;
return comment;
},
canComment: function(){
return canComment(Meteor.user());
}
});