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