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 @@
diff --git a/app/assets/javascripts/admin/views/admin_customize_view.js b/app/assets/javascripts/admin/views/admin_customize_view.js index fcc6437da42..895b0aa89e8 100644 --- a/app/assets/javascripts/admin/views/admin_customize_view.js +++ b/app/assets/javascripts/admin/views/admin_customize_view.js @@ -12,7 +12,6 @@ Discourse.AdminCustomizeView = window.Discourse.View.extend({ templateName: 'admin/templates/customize', classNames: ['customize'], - contentBinding: 'controller.content', init: function() { this._super(); diff --git a/app/assets/javascripts/admin/views/admin_email_logs_view.js b/app/assets/javascripts/admin/views/admin_email_logs_view.js deleted file mode 100644 index 709187ecd1d..00000000000 --- a/app/assets/javascripts/admin/views/admin_email_logs_view.js +++ /dev/null @@ -1,15 +0,0 @@ -(function() { - - /** - A view for listing email logs - - @class AdminEmailLogsView - @extends Discourse.View - @namespace Discourse - @module Discourse - **/ - Discourse.AdminEmailLogsView = window.Discourse.View.extend({ - templateName: 'admin/templates/email_logs' - }); - -}).call(this); diff --git a/app/assets/javascripts/admin/views/admin_flags_view.js b/app/assets/javascripts/admin/views/admin_flags_view.js deleted file mode 100644 index effaa4f42a9..00000000000 --- a/app/assets/javascripts/admin/views/admin_flags_view.js +++ /dev/null @@ -1,15 +0,0 @@ -(function() { - - /** - A view for listing admin flags - - @class AdminFlagsView - @extends Discourse.View - @namespace Discourse - @module Discourse - **/ - Discourse.AdminFlagsView = window.Discourse.View.extend({ - templateName: 'admin/templates/flags' - }); - -}).call(this); diff --git a/app/assets/javascripts/admin/views/admin_site_settings_view.js b/app/assets/javascripts/admin/views/admin_site_settings_view.js deleted file mode 100644 index a93fc93f0a7..00000000000 --- a/app/assets/javascripts/admin/views/admin_site_settings_view.js +++ /dev/null @@ -1,15 +0,0 @@ -(function() { - - /** - A view for dealing with site settings - - @class AdminSiteSettingsView - @extends Discourse.View - @namespace Discourse - @module Discourse - **/ - Discourse.AdminSiteSettingsView = window.Discourse.View.extend({ - templateName: 'admin/templates/site_settings' - }); - -}).call(this); diff --git a/app/assets/javascripts/admin/views/admin_user_view.js b/app/assets/javascripts/admin/views/admin_user_view.js deleted file mode 100644 index ede1b342d91..00000000000 --- a/app/assets/javascripts/admin/views/admin_user_view.js +++ /dev/null @@ -1,15 +0,0 @@ -(function() { - - /** - A view for showing a user in the admin section - - @class AdminUserView - @extends Discourse.View - @namespace Discourse - @module Discourse - **/ - Discourse.AdminUserView = window.Discourse.View.extend({ - templateName: 'admin/templates/user' - }); - -}).call(this); diff --git a/app/assets/javascripts/admin/views/admin_users_list_view.js b/app/assets/javascripts/admin/views/admin_users_list_view.js deleted file mode 100644 index 410f372a414..00000000000 --- a/app/assets/javascripts/admin/views/admin_users_list_view.js +++ /dev/null @@ -1,15 +0,0 @@ -(function() { - - /** - A view for listing users in the admin section - - @class AdminUsersListView - @extends Discourse.View - @namespace Discourse - @module Discourse - **/ - Discourse.AdminUsersListView = window.Discourse.View.extend({ - templateName: 'admin/templates/users_list' - }); - -}).call(this); diff --git a/app/assets/javascripts/admin/views/admin_view.js b/app/assets/javascripts/admin/views/admin_view.js deleted file mode 100644 index fbb1bed1f53..00000000000 --- a/app/assets/javascripts/admin/views/admin_view.js +++ /dev/null @@ -1,15 +0,0 @@ -(function() { - - /** - A base view for the admin section - - @class AdminView - @extends Discourse.View - @namespace Discourse - @module Discourse - **/ - Discourse.AdminView = window.Discourse.View.extend({ - templateName: 'admin/templates/admin' - }); - -}).call(this);