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({
|
|
|
|
model: function(params) {
|
|
|
|
return Discourse.AdminUser.find(params.username);
|
|
|
|
},
|
2013-02-22 03:09:28 +08:00
|
|
|
|
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'});
|
|
|
|
}
|
|
|
|
});
|