mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Dashboard links to list of admins and moderators; Move a bunch of ember routes into one file: admin_users_list_routes.js
This commit is contained in:
@@ -33,6 +33,8 @@ Discourse.Route.buildRoutes(function() {
|
||||
this.route('active', { path: '/active' });
|
||||
this.route('new', { path: '/new' });
|
||||
this.route('pending', { path: '/pending' });
|
||||
this.route('admins', { path: '/admins' });
|
||||
this.route('moderators', { path: '/moderators' });
|
||||
// Trust Levels:
|
||||
this.route('newuser', { path: '/newuser' });
|
||||
this.route('basic', { path: '/basic' });
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
Handles the route that lists active users.
|
||||
|
||||
@class AdminUsersListActiveRoute
|
||||
@extends Discourse.Route
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminUsersListActiveRoute = Discourse.Route.extend({
|
||||
setupController: function() {
|
||||
return this.controllerFor('adminUsersList').show('active');
|
||||
}
|
||||
});
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
Handles the route that lists new users.
|
||||
|
||||
@class AdminUsersListNewRoute
|
||||
@extends Discourse.Route
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminUsersListNewRoute = Discourse.Route.extend({
|
||||
setupController: function() {
|
||||
return this.controllerFor('adminUsersList').show('new');
|
||||
}
|
||||
});
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
Handles the route that lists pending users.
|
||||
|
||||
@class AdminUsersListNewRoute
|
||||
@extends Discourse.Route
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminUsersListPendingRoute = Discourse.Route.extend({
|
||||
setupController: function() {
|
||||
return this.controllerFor('adminUsersList').show('pending');
|
||||
}
|
||||
});
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
Handles the route that deals with listing users
|
||||
|
||||
@class AdminUsersListRoute
|
||||
@extends Discourse.Route
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminUsersListRoute = Discourse.Route.extend({
|
||||
renderTemplate: function() {
|
||||
this.render('admin/templates/users_list', {into: 'admin/templates/admin'});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
Handles the route that deals with listing users
|
||||
|
||||
@class AdminUsersListRoute
|
||||
@extends Discourse.Route
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminUsersListRoute = Discourse.Route.extend({
|
||||
renderTemplate: function() {
|
||||
this.render('admin/templates/users_list', {into: 'admin/templates/admin'});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
Handles the route that lists active users.
|
||||
|
||||
@class AdminUsersListActiveRoute
|
||||
@extends Discourse.Route
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminUsersListActiveRoute = Discourse.Route.extend({
|
||||
setupController: function() {
|
||||
return this.controllerFor('adminUsersList').show('active');
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
Handles the route that lists new users.
|
||||
|
||||
@class AdminUsersListNewRoute
|
||||
@extends Discourse.Route
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminUsersListNewRoute = Discourse.Route.extend({
|
||||
setupController: function() {
|
||||
return this.controllerFor('adminUsersList').show('new');
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
Handles the route that lists pending users.
|
||||
|
||||
@class AdminUsersListNewRoute
|
||||
@extends Discourse.Route
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminUsersListPendingRoute = Discourse.Route.extend({
|
||||
setupController: function() {
|
||||
return this.controllerFor('adminUsersList').show('pending');
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
Handles the route that lists admin users.
|
||||
|
||||
@class AdminUsersListAdminsRoute
|
||||
@extends Discourse.Route
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminUsersListAdminsRoute = Discourse.Route.extend({
|
||||
setupController: function() {
|
||||
return this.controllerFor('adminUsersList').show('admins');
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
Handles the route that lists moderators.
|
||||
|
||||
@class AdminUsersListModeratorsRoute
|
||||
@extends Discourse.Route
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminUsersListModeratorsRoute = Discourse.Route.extend({
|
||||
setupController: function() {
|
||||
return this.controllerFor('adminUsersList').show('moderators');
|
||||
}
|
||||
});
|
||||
@@ -98,9 +98,9 @@
|
||||
|
||||
<div class="dashboard-stats totals">
|
||||
<span class="title"><i class='icon icon-trophy'></i> {{i18n admin.dashboard.admins}}</span>
|
||||
<span class="value">{{admins}}</span>
|
||||
<span class="value">{{#linkTo 'adminUsersList.admins'}}{{admins}}{{/linkTo}}</span>
|
||||
<span class="title"><i class='icon icon-magic'></i> {{i18n admin.dashboard.moderators}}</span>
|
||||
<span class="value">{{moderators}}</span>
|
||||
<span class="value">{{#linkTo 'adminUsersList.moderators'}}{{moderators}}{{/linkTo}}</span>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-stats">
|
||||
|
||||
Reference in New Issue
Block a user