2014-07-05 11:24:28 +09:00
|
|
|
Template[getTemplate('posts_list')].helpers({
|
2014-07-05 11:42:28 +09:00
|
|
|
post_item: function () {
|
|
|
|
return getTemplate('post_item');
|
|
|
|
},
|
2013-10-29 16:55:59 +09:00
|
|
|
posts : function () {
|
2014-05-01 13:10:34 -07:00
|
|
|
if(this.postsList){ // XXX
|
|
|
|
this.postsList.rewind();
|
|
|
|
var posts = this.postsList.map(function (post, index, cursor) {
|
|
|
|
post.rank = index;
|
|
|
|
return post;
|
|
|
|
});
|
|
|
|
return posts;
|
|
|
|
}
|
2013-10-29 16:55:59 +09:00
|
|
|
},
|
2014-08-28 10:16:17 +09:00
|
|
|
postsLoadMore: function () {
|
|
|
|
return getTemplate('postsLoadMore');
|
2012-12-20 21:17:07 +01:00
|
|
|
}
|
2014-07-18 09:18:52 +09:00
|
|
|
});
|