mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00

Conflicts: .meteor/packages .meteor/versions client/components/postList/posts_list.js client/main.js lib/router/filters.js lib/router/posts.js lib/router/users.js packages/telescope-base/package.js packages/telescope-daily/lib/routes.js packages/telescope-module-share/package.js packages/telescope-seo/lib/routes.js packages/telescope-seo/lib/seo.js packages/telescope-seo/package.js packages/telescope-singleday/lib/routes.js
43 lines
891 B
JavaScript
43 lines
891 B
JavaScript
// Controller for post digest
|
|
|
|
PostsSingledayController = RouteController.extend({
|
|
|
|
template: getTemplate('singleDay'),
|
|
|
|
onBeforeAction: function () {
|
|
this.render(getTemplate('postListTop'), {to: 'postListTop'});
|
|
this.next();
|
|
},
|
|
|
|
data: function() {
|
|
var currentDate = this.params.day ? new Date(this.params.year, this.params.month-1, this.params.day) : Session.get('today');
|
|
Session.set('currentDate', currentDate);
|
|
},
|
|
|
|
getTitle: function () {
|
|
return i18n.t('single_day');
|
|
},
|
|
|
|
getDescription: function () {
|
|
return i18n.t('posts_of_a_single_day');
|
|
},
|
|
|
|
fastRender: true
|
|
|
|
});
|
|
|
|
Meteor.startup(function () {
|
|
|
|
// Digest
|
|
|
|
Router.route('/day/:year/:month/:day', {
|
|
name: 'postsSingleDay',
|
|
controller: PostsSingledayController
|
|
});
|
|
|
|
Router.route('/day', {
|
|
name: 'postsSingleDayDefault',
|
|
controller: PostsSingledayController
|
|
});
|
|
|
|
});
|