2015-05-07 18:54:46 +09:00
|
|
|
Template.user_downvoted_posts.helpers({
|
|
|
|
arguments: function () {
|
2014-12-08 19:51:39 +09:00
|
|
|
var user = this;
|
2015-05-07 18:54:46 +09:00
|
|
|
return {
|
|
|
|
template: "posts_list_compact",
|
2015-05-08 09:20:22 +09:00
|
|
|
options: {
|
|
|
|
currentUser: user,
|
|
|
|
fieldLabel: i18n.t("downvotedAt"),
|
|
|
|
fieldValue: function (post) {
|
|
|
|
var user = this.currentUser;
|
|
|
|
var vote = _.findWhere(user.telescope.downvotedPosts, {itemId: post._id});
|
|
|
|
return moment(vote.votedAt).format("MM/DD/YYYY, HH:mm");
|
|
|
|
}
|
|
|
|
},
|
2015-05-07 18:54:46 +09:00
|
|
|
terms: {
|
|
|
|
view: 'userDownvotedPosts',
|
|
|
|
userId: user._id,
|
|
|
|
limit: 5
|
|
|
|
}
|
|
|
|
}
|
2014-12-08 14:53:26 +09:00
|
|
|
}
|
2015-05-07 18:54:46 +09:00
|
|
|
});
|