2014-09-12 18:53:49 +09:00
|
|
|
Template[getTemplate('postInfo')].helpers({
|
2014-07-14 10:12:02 +09:00
|
|
|
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;
|
2014-11-20 14:55:34 +09:00
|
|
|
return time;
|
2014-07-14 10:12:02 +09:00
|
|
|
},
|
2014-10-06 17:11:43 -06:00
|
|
|
getTemplate: function() {
|
2014-12-04 12:38:20 +09:00
|
|
|
return getTemplate("postAuthor");
|
2014-09-16 15:46:48 -04:00
|
|
|
}
|
2014-07-14 10:12:02 +09:00
|
|
|
});
|