diff --git a/app/assets/javascripts/admin/routes/admin_customize_route.js b/app/assets/javascripts/admin/routes/admin_customize_route.js index 49027c451d7..cd5f60f5513 100644 --- a/app/assets/javascripts/admin/routes/admin_customize_route.js +++ b/app/assets/javascripts/admin/routes/admin_customize_route.js @@ -11,6 +11,10 @@ Discourse.AdminCustomizeRoute = Discourse.Route.extend({ model: function() { return Discourse.SiteCustomization.findAll(); + }, + + renderTemplate: function() { + this.render({into: 'admin/templates/admin'}); } }); diff --git a/app/assets/javascripts/admin/routes/admin_dashboard_route.js b/app/assets/javascripts/admin/routes/admin_dashboard_route.js index 8270023bc46..5aace990d55 100644 --- a/app/assets/javascripts/admin/routes/admin_dashboard_route.js +++ b/app/assets/javascripts/admin/routes/admin_dashboard_route.js @@ -16,6 +16,10 @@ c.set('loading', false); }); } + }, + + renderTemplate: function() { + this.render({into: 'admin/templates/admin'}); } }); diff --git a/app/assets/javascripts/admin/routes/admin_email_logs_route.js b/app/assets/javascripts/admin/routes/admin_email_logs_route.js index 470f01ec505..3b763c3f575 100644 --- a/app/assets/javascripts/admin/routes/admin_email_logs_route.js +++ b/app/assets/javascripts/admin/routes/admin_email_logs_route.js @@ -11,6 +11,10 @@ Discourse.AdminEmailLogsRoute = Discourse.Route.extend({ model: function() { return Discourse.EmailLog.findAll(); + }, + + renderTemplate: function() { + this.render('admin/templates/email_logs'); } }); diff --git a/app/assets/javascripts/admin/routes/admin_flags_route.js b/app/assets/javascripts/admin/routes/admin_flags_route.js new file mode 100644 index 00000000000..c78f0caafc8 --- /dev/null +++ b/app/assets/javascripts/admin/routes/admin_flags_route.js @@ -0,0 +1,17 @@ +(function() { + + /** + Basic route for admin flags + + @class AdminFlagsRoute + @extends Discourse.Route + @namespace Discourse + @module Discourse + **/ + Discourse.AdminFlagsRoute = Discourse.Route.extend({ + renderTemplate: function() { + this.render('admin/templates/flags'); + } + }); + +}).call(this); diff --git a/app/assets/javascripts/admin/routes/admin_route.js b/app/assets/javascripts/admin/routes/admin_route.js new file mode 100644 index 00000000000..a168172a3dc --- /dev/null +++ b/app/assets/javascripts/admin/routes/admin_route.js @@ -0,0 +1,17 @@ +(function() { + + /** + The base admin route + + @class AdminRoute + @extends Discourse.Route + @namespace Discourse + @module Discourse + **/ + Discourse.AdminRoute = Discourse.Route.extend({ + renderTemplate: function() { + this.render('admin/templates/admin'); + } + }); + +}).call(this); diff --git a/app/assets/javascripts/admin/routes/admin_site_settings_route.js b/app/assets/javascripts/admin/routes/admin_site_settings_route.js index f72d8afdba1..66d51d77919 100644 --- a/app/assets/javascripts/admin/routes/admin_site_settings_route.js +++ b/app/assets/javascripts/admin/routes/admin_site_settings_route.js @@ -11,7 +11,11 @@ Discourse.AdminSiteSettingsRoute = Discourse.Route.extend({ model: function() { return Discourse.SiteSetting.findAll(); - } + }, + + renderTemplate: function() { + this.render('admin/templates/site_settings', {into: 'admin/templates/admin'}); + } }); }).call(this); diff --git a/app/assets/javascripts/admin/routes/admin_user_route.js b/app/assets/javascripts/admin/routes/admin_user_route.js index 6afd2fbb400..a0c2295caea 100644 --- a/app/assets/javascripts/admin/routes/admin_user_route.js +++ b/app/assets/javascripts/admin/routes/admin_user_route.js @@ -11,7 +11,12 @@ Discourse.AdminUserRoute = Discourse.Route.extend({ model: function(params) { return Discourse.AdminUser.find(params.username); + }, + + renderTemplate: function() { + this.render('admin/templates/user', {into: 'admin/templates/admin'}); } + }); }).call(this); diff --git a/app/assets/javascripts/admin/routes/admin_users_list_new_route.js b/app/assets/javascripts/admin/routes/admin_users_list_new_route.js index 27ea12c87ef..bc6008f1a4e 100644 --- a/app/assets/javascripts/admin/routes/admin_users_list_new_route.js +++ b/app/assets/javascripts/admin/routes/admin_users_list_new_route.js @@ -11,7 +11,7 @@ Discourse.AdminUsersListNewRoute = Discourse.Route.extend({ setupController: function() { return this.controllerFor('adminUsersList').show('new'); - } + } }); }).call(this); diff --git a/app/assets/javascripts/admin/routes/admin_users_list_pending_route.js b/app/assets/javascripts/admin/routes/admin_users_list_pending_route.js index c2c12a8ad9c..3b5376a64f1 100644 --- a/app/assets/javascripts/admin/routes/admin_users_list_pending_route.js +++ b/app/assets/javascripts/admin/routes/admin_users_list_pending_route.js @@ -11,7 +11,7 @@ Discourse.AdminUsersListPendingRoute = Discourse.Route.extend({ setupController: function() { return this.controllerFor('adminUsersList').show('pending'); - } + } }); }).call(this); diff --git a/app/assets/javascripts/admin/routes/admin_users_list_route.js b/app/assets/javascripts/admin/routes/admin_users_list_route.js new file mode 100644 index 00000000000..a08336be0df --- /dev/null +++ b/app/assets/javascripts/admin/routes/admin_users_list_route.js @@ -0,0 +1,17 @@ +(function() { + + /** + 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'}); + } + }); + +}).call(this); diff --git a/app/assets/javascripts/admin/templates/customize.js.handlebars b/app/assets/javascripts/admin/templates/customize.js.handlebars index 40cceeba5d0..4c3c1e77686 100644 --- a/app/assets/javascripts/admin/templates/customize.js.handlebars +++ b/app/assets/javascripts/admin/templates/customize.js.handlebars @@ -2,7 +2,7 @@