Support for default User Index

This commit is contained in:
Robin Ward 2013-07-24 17:17:34 -04:00
parent 9351a7bcb1
commit 8408795093
1 changed files with 16 additions and 0 deletions

View File

@ -49,6 +49,22 @@ Discourse.UserActivityIndexRoute = Discourse.Route.extend({
}
});
Discourse.UserIndexRoute = Discourse.UserActivityRoute.extend({
renderTemplate: function() {
this._super();
this.render('user_stream', {into: 'user_activity', outlet: 'activity'});
},
model: function() {
return this.modelFor('user').findStream();
},
setupController: function(controller, model) {
this.controllerFor('userActivity').set('model', this.modelFor('user'));
this.set('model', model)
}
});
// Build all the filter routes
Object.keys(Discourse.UserAction.TYPES).forEach(function (userAction) {
Discourse["UserActivity" + userAction.classify() + "Route"] = Discourse.UserActivityIndexRoute.extend({