2015-01-05 10:06:30 +09:00
|
|
|
viewsMenu.push({
|
2014-12-08 11:15:20 +09:00
|
|
|
route: 'posts_digest_default',
|
2014-12-15 09:46:51 +09:00
|
|
|
label: 'digest',
|
|
|
|
description: 'posts_of_a_single_day'
|
2014-12-08 11:15:20 +09:00
|
|
|
});
|
|
|
|
|
|
|
|
viewParameters.digest = function (terms) {
|
|
|
|
return {
|
|
|
|
find: {
|
|
|
|
postedAt: {
|
|
|
|
$gte: terms.after,
|
|
|
|
$lt: terms.before
|
|
|
|
}
|
|
|
|
},
|
|
|
|
options: {
|
2015-01-06 11:26:44 +09:00
|
|
|
sort: {sticky: -1, score: -1},
|
|
|
|
limit: 0
|
2014-12-08 11:15:20 +09:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
getDigestURL = function(moment){
|
|
|
|
return Router.routes['posts_digest'].path({
|
|
|
|
year: moment.year(),
|
|
|
|
month: moment.month() + 1,
|
|
|
|
day: moment.date()
|
|
|
|
});
|
|
|
|
};
|