Vulcan/client/views/posts/modules/post_info.js
Sacha Greif 3e415dce78 Merge branch 'telescope-master-profile-hooks' of github.com:AdmitHub/Telescope into AdmitHub-telescope-master-profile-hooks
Conflicts:
	client/views/posts/modules/post_info.html

Note:
	adapted PR to only keep some of the added features
2014-12-04 12:38:20 +09:00

16 lines
No EOL
488 B
JavaScript

Template[getTemplate('postInfo')].helpers({
pointsUnitDisplayText: function(){
return this.upvotes == 1 ? i18n.t('point') : i18n.t('points');
},
can_edit: function(){
return canEdit(Meteor.user(), this);
},
ago: function(){
// if post is approved show submission time, else show creation time.
time = this.status == STATUS_APPROVED ? this.postedAt : this.createdAt;
return time;
},
getTemplate: function() {
return getTemplate("postAuthor");
}
});