mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
24 lines
No EOL
643 B
JavaScript
24 lines
No EOL
643 B
JavaScript
Template.user_upvoted_posts.helpers({
|
|
arguments: function () {
|
|
var user = this;
|
|
return {
|
|
template: "posts_list_compact",
|
|
options: {
|
|
currentUser: user,
|
|
fieldLabel: i18n.t("upvotedAt"),
|
|
fieldValue: function (post) {
|
|
var user = this.currentUser;
|
|
var vote = _.findWhere(user.telescope.upvotedPosts, {itemId: post._id});
|
|
return moment(vote.votedAt).format("MM/DD/YYYY, HH:mm");
|
|
}
|
|
},
|
|
terms: {
|
|
view: 'userUpvotedPosts',
|
|
userId: user._id,
|
|
limit: 5,
|
|
enableCache: false,
|
|
subscribeToUsers: false
|
|
}
|
|
};
|
|
}
|
|
}); |