mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Remove some useless views
This commit is contained in:
parent
2d1bbf22e9
commit
c8a908e81a
18 changed files with 76 additions and 95 deletions
|
@ -11,6 +11,10 @@
|
|||
Discourse.AdminCustomizeRoute = Discourse.Route.extend({
|
||||
model: function() {
|
||||
return Discourse.SiteCustomization.findAll();
|
||||
},
|
||||
|
||||
renderTemplate: function() {
|
||||
this.render({into: 'admin/templates/admin'});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
c.set('loading', false);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
renderTemplate: function() {
|
||||
this.render({into: 'admin/templates/admin'});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -11,6 +11,10 @@
|
|||
Discourse.AdminEmailLogsRoute = Discourse.Route.extend({
|
||||
model: function() {
|
||||
return Discourse.EmailLog.findAll();
|
||||
},
|
||||
|
||||
renderTemplate: function() {
|
||||
this.render('admin/templates/email_logs');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
17
app/assets/javascripts/admin/routes/admin_flags_route.js
Normal file
17
app/assets/javascripts/admin/routes/admin_flags_route.js
Normal 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);
|
17
app/assets/javascripts/admin/routes/admin_route.js
Normal file
17
app/assets/javascripts/admin/routes/admin_route.js
Normal 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);
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
Discourse.AdminUsersListNewRoute = Discourse.Route.extend({
|
||||
setupController: function() {
|
||||
return this.controllerFor('adminUsersList').show('new');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}).call(this);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
Discourse.AdminUsersListPendingRoute = Discourse.Route.extend({
|
||||
setupController: function() {
|
||||
return this.controllerFor('adminUsersList').show('pending');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}).call(this);
|
||||
|
|
|
@ -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);
|
|
@ -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>
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
Discourse.AdminCustomizeView = window.Discourse.View.extend({
|
||||
templateName: 'admin/templates/customize',
|
||||
classNames: ['customize'],
|
||||
contentBinding: 'controller.content',
|
||||
|
||||
init: function() {
|
||||
this._super();
|
||||
|
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
Loading…
Reference in a new issue