diff --git a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 index 66aad96..8fc8f93 100644 --- a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 @@ -19,6 +19,7 @@ export default Ember.Controller.extend({ results: Em.computed.alias('selectedItem.results'), editing: false, + showNavbar: true, everEditing: false, showRecentQueries: true, sortBy: ['id:desc'], @@ -90,13 +91,16 @@ export default Ember.Controller.extend({ window.open(this.get('selectedItem.downloadUrl'), "_blank"); }, - scrollTop() { + visitQuery() { window.scrollTo(0,0); this.set('editing', false); + this.set('showCreate', false); + this.set('showNavbar', false); this.set('everEditing', false); }, goHome() { + this.set('showNavbar', true); this.set('selectedQueryId', null); this.transitionToRoute('adminPlugins.explorer'); }, diff --git a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs index 4a5149a..1ddd0ea 100644 --- a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs +++ b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs @@ -3,11 +3,13 @@ {{#if disallow}}

{{i18n "explorer.admins_only"}}

{{else}} + {{#if showNavbar}}
{{combo-box valueAttribute="id" value=selectedQueryId nameProperty="listName" none="explorer.menu_none" content=content castInteger="true" nameChanges="true"}} {{d-button action="showCreate" icon="plus" class="no-text"}} {{d-button action="importQuery" label="explorer.import.label" icon="upload"}}
+ {{/if}} {{#if showCreate}}
@@ -23,7 +25,9 @@
{{/if}} -
+ {{#if showNavbar}} +
+ {{/if}} {{#if content.length}} {{#if selectedItem.fake}} @@ -151,7 +155,7 @@ {{#each sortedQueries as |query|}} - + {{query.name}}
{{query.description}}