mirror of
https://github.com/discourse/discourse-data-explorer.git
synced 2025-02-18 01:14:57 +00:00
FEATURE: Hide unnecessary create/import bar when visiting a query
This commit is contained in:
parent
915657b8cd
commit
2b4c056fe5
@ -19,6 +19,7 @@ export default Ember.Controller.extend({
|
|||||||
results: Em.computed.alias('selectedItem.results'),
|
results: Em.computed.alias('selectedItem.results'),
|
||||||
|
|
||||||
editing: false,
|
editing: false,
|
||||||
|
showNavbar: true,
|
||||||
everEditing: false,
|
everEditing: false,
|
||||||
showRecentQueries: true,
|
showRecentQueries: true,
|
||||||
sortBy: ['id:desc'],
|
sortBy: ['id:desc'],
|
||||||
@ -90,13 +91,16 @@ export default Ember.Controller.extend({
|
|||||||
window.open(this.get('selectedItem.downloadUrl'), "_blank");
|
window.open(this.get('selectedItem.downloadUrl'), "_blank");
|
||||||
},
|
},
|
||||||
|
|
||||||
scrollTop() {
|
visitQuery() {
|
||||||
window.scrollTo(0,0);
|
window.scrollTo(0,0);
|
||||||
this.set('editing', false);
|
this.set('editing', false);
|
||||||
|
this.set('showCreate', false);
|
||||||
|
this.set('showNavbar', false);
|
||||||
this.set('everEditing', false);
|
this.set('everEditing', false);
|
||||||
},
|
},
|
||||||
|
|
||||||
goHome() {
|
goHome() {
|
||||||
|
this.set('showNavbar', true);
|
||||||
this.set('selectedQueryId', null);
|
this.set('selectedQueryId', null);
|
||||||
this.transitionToRoute('adminPlugins.explorer');
|
this.transitionToRoute('adminPlugins.explorer');
|
||||||
},
|
},
|
||||||
|
@ -3,11 +3,13 @@
|
|||||||
{{#if disallow}}
|
{{#if disallow}}
|
||||||
<h2>{{i18n "explorer.admins_only"}}</h2>
|
<h2>{{i18n "explorer.admins_only"}}</h2>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
{{#if showNavbar}}
|
||||||
<div class="query-list">
|
<div class="query-list">
|
||||||
{{combo-box valueAttribute="id" value=selectedQueryId nameProperty="listName" none="explorer.menu_none" content=content castInteger="true" nameChanges="true"}}
|
{{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="showCreate" icon="plus" class="no-text"}}
|
||||||
{{d-button action="importQuery" label="explorer.import.label" icon="upload"}}
|
{{d-button action="importQuery" label="explorer.import.label" icon="upload"}}
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if showCreate}}
|
{{#if showCreate}}
|
||||||
<div class="query-create">
|
<div class="query-create">
|
||||||
@ -23,7 +25,9 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if showNavbar}}
|
||||||
<hr>
|
<hr>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if content.length}}
|
{{#if content.length}}
|
||||||
{{#if selectedItem.fake}}
|
{{#if selectedItem.fake}}
|
||||||
@ -151,7 +155,7 @@
|
|||||||
{{#each sortedQueries as |query|}}
|
{{#each sortedQueries as |query|}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a {{action "scrollTop"}} href="/admin/plugins/explorer/?id={{query.id}}">
|
<a {{action "visitQuery"}} href="/admin/plugins/explorer/?id={{query.id}}">
|
||||||
<b class="query-name">{{query.name}}</b>
|
<b class="query-name">{{query.name}}</b>
|
||||||
<br>
|
<br>
|
||||||
<medium class="query-desc">{{query.description}}</medium>
|
<medium class="query-desc">{{query.description}}</medium>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user