2013-02-22 15:41:12 -05:00
|
|
|
/**
|
|
|
|
Handles routes related to users in the admin section.
|
2013-02-20 13:15:50 -05:00
|
|
|
|
2013-05-07 13:30:12 -04:00
|
|
|
@class AdminUserRoute
|
2013-02-22 15:41:12 -05:00
|
|
|
@extends Discourse.Route
|
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
|
|
|
**/
|
|
|
|
Discourse.AdminUserRoute = Discourse.Route.extend({
|
2013-05-07 13:30:12 -04:00
|
|
|
serialize: function(params) {
|
|
|
|
return { username: Em.get(params, 'username').toLowerCase() };
|
|
|
|
},
|
|
|
|
|
2013-02-22 15:41:12 -05:00
|
|
|
renderTemplate: function() {
|
|
|
|
this.render('admin/templates/user', {into: 'admin/templates/admin'});
|
2013-05-14 12:03:15 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
setupController: function(controller, model) {
|
|
|
|
Discourse.AdminUser.find(Em.get(model, 'username').toLowerCase()).then(function (u) {
|
|
|
|
controller.set('content', u);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
2013-02-22 15:41:12 -05:00
|
|
|
});
|