mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
31 lines
623 B
JavaScript
31 lines
623 B
JavaScript
/**
|
|
* Controller for daily view
|
|
*/
|
|
Posts.controllers.daily = Posts.controllers.list.extend({
|
|
|
|
view: "daily",
|
|
|
|
template: function() {
|
|
// use a function to make sure the template is evaluated *after* any template overrides
|
|
// TODO: still needed?
|
|
return 'posts_daily';
|
|
},
|
|
|
|
data: function () {
|
|
var daysCount = this.params.daysCount ? this.params.daysCount : daysPerPage;
|
|
return {
|
|
daysCount: daysCount
|
|
};
|
|
}
|
|
|
|
});
|
|
|
|
Meteor.startup(function () {
|
|
|
|
Router.route('/daily/:daysCount?', {
|
|
name: 'postsDaily',
|
|
template: 'posts_daily',
|
|
controller: Posts.controllers.daily
|
|
});
|
|
|
|
});
|