mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 12:16:37 -04:00
25 lines
No EOL
637 B
JavaScript
25 lines
No EOL
637 B
JavaScript
Template[getTemplate('posts_list')].helpers({
|
|
post_item: function () {
|
|
return getTemplate('post_item');
|
|
},
|
|
posts : function () {
|
|
if(this.postsList){ // XXX
|
|
this.postsList.rewind();
|
|
var posts = this.postsList.map(function (post, index, cursor) {
|
|
post.rank = index;
|
|
return post;
|
|
});
|
|
return posts;
|
|
}
|
|
},
|
|
postsLoadMore: function () {
|
|
return getTemplate('postsLoadMore');
|
|
},
|
|
postsListIncoming: function () {
|
|
return getTemplate('postsListIncoming');
|
|
}
|
|
});
|
|
|
|
Template[getTemplate('posts_list')].created = function() {
|
|
Session.set('listPopulatedAt', new Date());
|
|
}; |