2015-05-08 09:43:45 +09:00
|
|
|
Template.user_subscribed_posts.helpers({
|
|
|
|
arguments: function () {
|
|
|
|
var user = this;
|
|
|
|
return {
|
|
|
|
template: "posts_list_compact",
|
|
|
|
options: {
|
|
|
|
currentUser: user,
|
|
|
|
fieldLabel: i18n.t("subscribedAt"),
|
|
|
|
fieldValue: function (post) {
|
|
|
|
var user = this.currentUser;
|
2015-05-08 11:00:15 +09:00
|
|
|
var item = _.findWhere(user.telescope.subscribedItems.Posts, {itemId: post._id});
|
2015-05-08 09:43:45 +09:00
|
|
|
return moment(item.subscribedAt).format("MM/DD/YYYY, HH:mm");
|
|
|
|
}
|
|
|
|
},
|
|
|
|
terms: {
|
|
|
|
view: 'userSubscribedPosts',
|
|
|
|
userId: user._id,
|
|
|
|
limit: 5
|
|
|
|
}
|
|
|
|
}
|
2015-04-22 07:50:11 +09:00
|
|
|
}
|
2015-05-08 09:43:45 +09:00
|
|
|
});
|