2014-08-28 10:16:17 +09:00
|
|
|
var coreSubscriptions = new SubsManager({
|
|
|
|
// cache recent 50 subscriptions
|
|
|
|
cacheLimit: 50,
|
|
|
|
// expire any subscription after 30 minutes
|
|
|
|
expireIn: 30
|
|
|
|
});
|
|
|
|
|
2014-09-29 10:35:03 +09:00
|
|
|
PostsDailyController = RouteController.extend({
|
2014-12-11 12:38:53 +09:00
|
|
|
|
2014-09-29 10:35:03 +09:00
|
|
|
template: function() {
|
|
|
|
return getTemplate('postsDaily');
|
|
|
|
},
|
2014-12-11 12:38:53 +09:00
|
|
|
|
|
|
|
subscriptions: function () {
|
2015-01-08 17:37:54 +09:00
|
|
|
// this.days = this.params.days ? this.params.days : daysPerPage;
|
|
|
|
// TODO: find a way to preload the first n posts of the first 5 days?
|
2014-09-29 10:35:03 +09:00
|
|
|
},
|
2014-12-11 12:38:53 +09:00
|
|
|
|
|
|
|
data: function () {
|
2015-01-08 17:37:54 +09:00
|
|
|
this.days = this.params.days ? this.params.days : daysPerPage;
|
2014-09-29 10:35:03 +09:00
|
|
|
Session.set('postsDays', this.days);
|
|
|
|
return {
|
|
|
|
days: this.days
|
|
|
|
};
|
2014-11-27 17:25:01 +05:30
|
|
|
},
|
2014-12-11 12:38:53 +09:00
|
|
|
|
|
|
|
getTitle: function () {
|
2015-01-05 16:32:38 +09:00
|
|
|
return i18n.t('daily') + ' - ' + getSetting('title', "Telescope");
|
2014-12-11 12:38:53 +09:00
|
|
|
},
|
|
|
|
|
2014-12-15 09:46:51 +09:00
|
|
|
getDescription: function () {
|
|
|
|
return i18n.t('day_by_day_view');
|
|
|
|
},
|
|
|
|
|
2014-11-27 17:25:01 +05:30
|
|
|
fastRender: true
|
2014-09-29 10:35:03 +09:00
|
|
|
});
|
2014-08-28 10:16:17 +09:00
|
|
|
|
|
|
|
Meteor.startup(function () {
|
2014-08-27 10:23:56 +09:00
|
|
|
|
2014-11-17 14:53:42 +09:00
|
|
|
Router.route('/daily/:days?', {
|
|
|
|
name: 'postsDaily',
|
|
|
|
controller: PostsDailyController
|
2014-08-27 09:24:37 +09:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|