Wire up `admin` view properly
This commit is contained in:
parent
7e1651a36e
commit
043e522f39
|
@ -1,8 +1,4 @@
|
|||
Discourse.AdminRoute = Discourse.Route.extend({
|
||||
renderTemplate: function() {
|
||||
this.render('admin/templates/admin');
|
||||
},
|
||||
|
||||
titleToken: function() {
|
||||
return I18n.t('admin_title');
|
||||
},
|
||||
|
|
|
@ -8,7 +8,7 @@ Discourse.AdminUserRoute = Discourse.Route.extend({
|
|||
},
|
||||
|
||||
renderTemplate: function() {
|
||||
this.render({into: 'admin/templates/admin'});
|
||||
this.render({into: 'admin'});
|
||||
},
|
||||
|
||||
afterModel: function(adminUser) {
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
export default Ember.View.extend({
|
||||
_onInsert: function() {
|
||||
|
||||
}.on('didInsertElement')
|
||||
});
|
||||
|
|
@ -171,6 +171,11 @@ export default Ember.DefaultResolver.extend({
|
|||
const compTemplate = Ember.TEMPLATES['admin/templates/' + decamelized];
|
||||
if (compTemplate) { return compTemplate; }
|
||||
}
|
||||
|
||||
if (decamelized === "javascripts/admin") {
|
||||
return Ember.TEMPLATES['admin/templates/admin'];
|
||||
}
|
||||
|
||||
if (decamelized.indexOf('admin') === 0 || decamelized.indexOf('javascripts/admin') === 0) {
|
||||
decamelized = decamelized.replace(/^admin\_/, 'admin/templates/');
|
||||
decamelized = decamelized.replace(/^admin\./, 'admin/templates/');
|
||||
|
|
Loading…
Reference in New Issue