mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
22 lines
579 B
JavaScript
22 lines
579 B
JavaScript
Template.post_admin.helpers({
|
|
showApprove: function () {
|
|
return this.status === Posts.config.STATUS_PENDING;
|
|
},
|
|
showUnapprove: function(){
|
|
return !!Settings.get('requirePostsApproval') && this.status === Posts.config.STATUS_APPROVED;
|
|
},
|
|
shortScore: function(){
|
|
return Math.floor(this.score*1000)/1000;
|
|
}
|
|
});
|
|
|
|
Template.post_admin.events({
|
|
'click .approve-link': function(e){
|
|
Meteor.call('approvePost', this);
|
|
e.preventDefault();
|
|
},
|
|
'click .unapprove-link': function(e){
|
|
Meteor.call('unapprovePost', this);
|
|
e.preventDefault();
|
|
}
|
|
});
|