Remove some useless views

This commit is contained in:
Robin Ward 2013-02-21 15:55:58 -05:00
parent 2d1bbf22e9
commit c8a908e81a
18 changed files with 76 additions and 95 deletions

View file

@ -11,6 +11,10 @@
Discourse.AdminCustomizeRoute = Discourse.Route.extend({
model: function() {
return Discourse.SiteCustomization.findAll();
},
renderTemplate: function() {
this.render({into: 'admin/templates/admin'});
}
});

View file

@ -16,6 +16,10 @@
c.set('loading', false);
});
}
},
renderTemplate: function() {
this.render({into: 'admin/templates/admin'});
}
});

View file

@ -11,6 +11,10 @@
Discourse.AdminEmailLogsRoute = Discourse.Route.extend({
model: function() {
return Discourse.EmailLog.findAll();
},
renderTemplate: function() {
this.render('admin/templates/email_logs');
}
});

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -11,7 +11,7 @@
Discourse.AdminUsersListNewRoute = Discourse.Route.extend({
setupController: function() {
return this.controllerFor('adminUsersList').show('new');
}
}
});
}).call(this);

View file

@ -11,7 +11,7 @@
Discourse.AdminUsersListPendingRoute = Discourse.Route.extend({
setupController: function() {
return this.controllerFor('adminUsersList').show('pending');
}
}
});
}).call(this);

View file

@ -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);

View file

@ -2,7 +2,7 @@
<div class='list'>
<div class='well'>
<ul class='nav nav-list'>
{{#each view.content}}
{{#each content}}
<li {{bindAttr class="this.selected:active"}}><a {{action selectStyle this target="controller"}}>{{this.description}}</a></li>
{{/each}}
</ul>

View file

@ -12,7 +12,6 @@
Discourse.AdminCustomizeView = window.Discourse.View.extend({
templateName: 'admin/templates/customize',
classNames: ['customize'],
contentBinding: 'controller.content',
init: function() {
this._super();

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);