Vulcan/packages/telescope-daily/lib/routes.js

46 lines
1 KiB
JavaScript
Raw Normal View History

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
});
PostsDailyController = RouteController.extend({
template: function() {
// use a function to make sure the template is evaluated *after* any template overrides
return getTemplate('postsDaily');
},
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?
},
data: function () {
2015-01-08 17:37:54 +09:00
this.days = this.params.days ? this.params.days : daysPerPage;
Session.set('postsDays', this.days);
return {
days: this.days
};
2014-11-27 17:25:01 +05:30
},
getTitle: function () {
return i18n.t('daily') + ' - ' + getSetting('title', "Telescope");
},
getDescription: function () {
return i18n.t('day_by_day_view');
},
2014-11-27 17:25:01 +05:30
fastRender: true
});
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
});
});