2013-02-22 14:41:12 -06:00
|
|
|
/**
|
|
|
|
Builds the routes for the admin section
|
2013-02-20 12:15:50 -06:00
|
|
|
|
2013-02-22 14:41:12 -06:00
|
|
|
@method buildRoutes
|
|
|
|
@for Discourse.AdminRoute
|
|
|
|
**/
|
2013-02-26 13:54:43 -06:00
|
|
|
Discourse.Route.buildRoutes(function() {
|
2014-02-12 22:34:57 -06:00
|
|
|
this.resource('admin', function() {
|
2013-02-22 14:41:12 -06:00
|
|
|
this.route('dashboard', { path: '/' });
|
2013-11-13 13:02:47 -06:00
|
|
|
this.resource('adminSiteSettings', { path: '/site_settings' }, function() {
|
|
|
|
this.resource('adminSiteSettingsCategory', { path: 'category/:category_id'} );
|
|
|
|
});
|
2013-04-04 11:59:44 -05:00
|
|
|
|
|
|
|
this.resource('adminSiteContents', { path: '/site_contents' }, function() {
|
|
|
|
this.resource('adminSiteContentEdit', {path: '/:content_type'});
|
|
|
|
});
|
|
|
|
|
2013-06-03 15:12:24 -05:00
|
|
|
this.resource('adminEmail', { path: '/email'}, function() {
|
2014-02-14 18:17:13 -06:00
|
|
|
this.route('all');
|
2014-02-14 17:50:08 -06:00
|
|
|
this.route('sent');
|
2014-02-14 12:06:21 -06:00
|
|
|
this.route('skipped');
|
2013-06-03 15:12:24 -05:00
|
|
|
this.route('previewDigest', { path: '/preview-digest' });
|
|
|
|
});
|
|
|
|
|
2014-02-12 22:34:57 -06:00
|
|
|
this.route('customize');
|
|
|
|
this.route('api');
|
|
|
|
|
|
|
|
this.resource('admin.backups', { path: '/backups' }, function() {
|
|
|
|
this.route('logs');
|
|
|
|
});
|
2013-02-21 13:09:28 -06:00
|
|
|
|
2013-02-27 21:39:42 -06:00
|
|
|
this.resource('adminReports', { path: '/reports/:type' });
|
|
|
|
|
2013-02-22 14:41:12 -06:00
|
|
|
this.resource('adminFlags', { path: '/flags' }, function() {
|
2014-02-12 22:34:57 -06:00
|
|
|
this.route('active');
|
|
|
|
this.route('old');
|
2013-02-22 14:41:12 -06:00
|
|
|
});
|
2013-02-21 13:09:28 -06:00
|
|
|
|
2013-08-01 20:30:13 -05:00
|
|
|
this.resource('adminLogs', { path: '/logs' }, function() {
|
2013-08-07 15:04:12 -05:00
|
|
|
this.route('staffActionLogs', { path: '/staff_action_logs' });
|
2013-08-15 09:48:30 -05:00
|
|
|
this.route('screenedEmails', { path: '/screened_emails' });
|
2013-10-21 13:49:51 -05:00
|
|
|
this.route('screenedIpAddresses', { path: '/screened_ip_addresses' });
|
2013-08-15 09:48:30 -05:00
|
|
|
this.route('screenedUrls', { path: '/screened_urls' });
|
2013-08-01 20:30:13 -05:00
|
|
|
});
|
|
|
|
|
2014-04-23 12:25:02 -05:00
|
|
|
this.resource('adminGroups', { path: '/groups'}, function() {
|
|
|
|
this.resource('adminGroup', { path: '/:name' });
|
|
|
|
});
|
2013-04-17 02:08:21 -05:00
|
|
|
|
2013-02-22 14:41:12 -06:00
|
|
|
this.resource('adminUsers', { path: '/users' }, function() {
|
2014-01-22 16:09:56 -06:00
|
|
|
this.resource('adminUser', { path: '/:username' }, function() {
|
2014-03-19 09:27:21 -05:00
|
|
|
this.route('badges');
|
2014-01-22 16:09:56 -06:00
|
|
|
this.route('leaderRequirements', { path: '/leader_requirements' });
|
|
|
|
});
|
2013-02-22 14:41:12 -06:00
|
|
|
this.resource('adminUsersList', { path: '/list' }, function() {
|
2013-11-07 12:53:32 -06:00
|
|
|
_.each(['active', 'new', 'pending', 'admins', 'moderators', 'blocked', 'suspended',
|
2014-04-15 11:25:09 -05:00
|
|
|
'newuser', 'basicuser', 'regular', 'leaders', 'elders'], function(x) {
|
2013-07-08 11:21:08 -05:00
|
|
|
this.route(x, { path: '/' + x });
|
|
|
|
}, this);
|
2013-02-22 14:41:12 -06:00
|
|
|
});
|
2013-02-20 12:15:50 -06:00
|
|
|
});
|
2013-02-22 14:41:12 -06:00
|
|
|
|
2014-03-05 06:52:20 -06:00
|
|
|
this.route('badges');
|
|
|
|
|
2013-02-20 12:15:50 -06:00
|
|
|
});
|
2013-02-22 14:41:12 -06:00
|
|
|
});
|