- {{explorer-schema schema=schema hideSchema=hideSchema}}
-
+ {{#if selectedItem}}
+ {{#if editing}}
+
+ {{text-field value=selectedItem.name}}
-
- {{ace-editor content=selectedItem.sql mode="sql"}}
+
+ {{textarea value=selectedItem.description}}
-
-
-
- {{else}}
-
- {{hljs-code-view value=selectedItem.sql codeClass="sql"}}
-
- {{/if}}
+ {{else}}
+
+
{{selectedItem.name}}
+ {{d-button action="editName" icon="pencil" class="no-text btn-small"}}
+
+
+ {{selectedItem.description}}
+
+ {{/if}}
-
-
-
-
+ {{! the SQL editor will show the first time you }}
{{#if everEditing}}
- {{d-button action="save" label="explorer.save" disabled=saveDisabled class="btn-primary"}}
+
+
+
+ {{explorer-schema schema=schema hideSchema=hideSchema}}
+
+
+
+ {{ace-editor content=selectedItem.sql mode="sql"}}
+
+
+
+
{{else}}
- {{d-button action="editName" label="explorer.edit" icon="pencil" class="btn-primary"}}
+
+ {{hljs-code-view value=selectedItem.sql codeClass="sql"}}
+
{{/if}}
- {{d-button action="download" label="explorer.export" disabled=runDisabled icon="download"}}
-
-
- {{#if selectedItem.destroyed}}
- {{d-button action="recover" class="" icon="undo" label="explorer.recover"}}
- {{else}}
+
+
+
+
{{#if everEditing}}
- {{d-button action="discard" class="btn-danger" icon="undo" label="explorer.undo" disabled=saveDisabled}}
+ {{d-button action="save" label="explorer.save" disabled=saveDisabled class="btn-primary"}}
+ {{else}}
+ {{d-button action="editName" label="explorer.edit" icon="pencil" class="btn-primary"}}
{{/if}}
- {{d-button action="destroy" class="btn-danger" icon="trash" label="explorer.delete"}}
- {{/if}}
-
-
- {{/if}}
-
-
-
-
-
- {{/if}}
- {{conditional-loading-spinner condition=loading}}
- {{#unless selectedItem.fake}}
- {{#if results}}
-
- {{#if showResults}}
- {{query-result query=selectedItem content=results}}
- {{else}}
- {{#each results.errors as |err|}}
-
{{~err}}
- {{/each}}
+ {{d-button action="download" label="explorer.export" disabled=runDisabled icon="download"}}
+
+
+ {{#if selectedItem.destroyed}}
+ {{d-button action="recover" class="" icon="undo" label="explorer.recover"}}
+ {{else}}
+ {{#if everEditing}}
+ {{d-button action="discard" class="btn-danger" icon="undo" label="explorer.undo" disabled=saveDisabled}}
+ {{/if}}
+ {{d-button action="destroy" class="btn-danger" icon="trash" label="explorer.delete"}}
+ {{/if}}
+
+
{{/if}}
{{/if}}
- {{/unless}}
+ {{conditional-loading-spinner condition=loading}}
+ {{#unless selectedItem.fake}}
+ {{#if results}}
+
+ {{/if}}
{{/if}}
{{/explorer-container}}
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 7b7e1a5..32a0f9e 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -59,3 +59,5 @@ en:
no_queries: "There are no queries. Why not "
no_queries_hook: "create one?"
menu_none: "Select a query"
+ no_query_selected: "Please select or "
+ no_query_selected_hook: "create one."