Events for a repository are shown since v0.0.10. Let’s add events for a user. Everything is basically set up: there is an EventsView which lists all events from an EventsController. All we need to do is to modify the findQuery on the adapter so it is possible to get the events for a user:
The only thing left is to fetch the events in the router’s root.user.index route and modify the user template:
app/lib/router.js
12345678910111213141516171819202122232425
...// route root.user.indexindex:Ember.Route.extend({route:'/',connectOutlets:function(router){varusername=router.get('userController.id');varstore=router.get('store');// get watched repositories for given usernamevarwatchedRepositories=store.findQuery(Dashboard.Repository,{username:username,type:'watched'});router.set('repositoriesController.content',watchedRepositories);varuserEvents=store.findQuery(Dashboard.Event,{username:username});router.set('eventsController.content',userEvents);// connect user with events and watched repositoriesrouter.get('applicationController').connectOutlet('user');router.get('userController').connectOutlet('watchedRepositories','repositories',watchedRepositories);router.get('userController').connectOutlet('events','events',userEvents);},...})