Vulcan/client/views/posts/posts_list.js
2014-08-28 10:16:17 +09:00

18 lines
No EOL
443 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');
}
});