FIX: hide custom top/footer in admin section

This commit is contained in:
Régis Hanol 2015-08-07 18:06:55 +02:00
parent 15418f3d44
commit 1aa075f70b
4 changed files with 20 additions and 6 deletions

View File

@ -0,0 +1,16 @@
export default Discourse.Route.extend({
titleToken() {
return I18n.t('admin_title');
},
activate() {
this.controllerFor("application").setProperties({
showTop: false,
showFooter: false,
});
},
deactivate() {
this.controllerFor("application").set("showTop", true);
}
});

View File

@ -1,5 +0,0 @@
Discourse.AdminRoute = Discourse.Route.extend({
titleToken: function() {
return I18n.t('admin_title');
}
});

View File

@ -1,4 +1,5 @@
export default Ember.Controller.extend({
showTop: true,
showFooter: false,
styleCategory: null,

View File

@ -2,7 +2,9 @@
<div id="main-outlet" class="wrap">
<div class="container">
{{#if showTop}}
{{custom-html "top"}}
{{/if}}
{{global-notice}}
</div>
{{outlet}}