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-06-06 00:40:06 +08:00
|
|
|
|
2013-05-08 01:30:12 +08:00
|
|
|
serialize: function(params) {
|
|
|
|
return { username: Em.get(params, 'username').toLowerCase() };
|
|
|
|
},
|
|
|
|
|
2013-06-06 00:40:06 +08:00
|
|
|
model: function(params) {
|
|
|
|
return Discourse.AdminUser.find(Em.get(params, 'username').toLowerCase());
|
2013-05-15 00:03:15 +08:00
|
|
|
},
|
|
|
|
|
2013-06-06 00:40:06 +08:00
|
|
|
renderTemplate: function() {
|
2013-06-04 04:12:24 +08:00
|
|
|
this.render({into: 'admin/templates/admin'});
|
2013-05-15 00:49:15 +08:00
|
|
|
}
|
2013-05-15 00:03:15 +08:00
|
|
|
|
2013-02-23 04:41:12 +08:00
|
|
|
});
|