diff --git a/assets/javascripts/discourse/templates/admin/plugins-explorer-show.hbs b/assets/javascripts/discourse/templates/admin/plugins-explorer-show.hbs deleted file mode 100644 index 6a5b5ea..0000000 --- a/assets/javascripts/discourse/templates/admin/plugins-explorer-show.hbs +++ /dev/null @@ -1,48 +0,0 @@ -{{#if selectedItem}} -
- {{#if editName}} - {{text-field value=selectedItem.name}} - {{else}} -

{{selectedItem.name}}

- {{d-button action="editName" icon="pencil" class="no-text btn-small"}} - {{/if}} -
-
- {{#if controller.editName}} - {{textarea value=selectedItem.description}} - {{else}} - {{selectedItem.description}} - {{/if}} -
- - -
-
-
- {{textarea value=selectedItem.sql class="grippie-target"}} -
-
-
-
- {{explorer-schema schema=schema}} -
-
-
-
-
- -
-
- {{d-button action="save" label="explorer.save" disabled=saveDisabled class="btn-primary"}} - {{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}} - {{d-button action="discard" class="btn-danger" icon="undo" label="explorer.undo" disabled=saveDisabled}} - {{d-button action="destroy" class="btn-danger" icon="trash" label="explorer.delete"}} - {{/if}} -
-
-{{/if}} diff --git a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs index 63fba5c..554dbcf 100644 --- a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs +++ b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs @@ -26,7 +26,54 @@ {{i18n "explorer.no_queries"}} {{i18n "explorer.no_queries_hook"}} {{else}}
- {{partial "admin/plugins-explorer-show" model=selectedItem schema=schema}} + {{#if selectedItem}} +
+ {{#if editName}} + {{text-field value=selectedItem.name}} + {{else}} +

{{selectedItem.name}}

+ {{d-button action="editName" icon="pencil" class="no-text btn-small"}} + {{/if}} +
+
+ {{#if editName}} + {{textarea value=selectedItem.description}} + {{else}} + {{selectedItem.description}} + {{/if}} +
+ + +
+
+
+ {{textarea value=selectedItem.sql class="grippie-target"}} +
+
+
+
+ {{explorer-schema schema=schema}} +
+
+
+
+
+ +
+
+ {{d-button action="save" label="explorer.save" disabled=saveDisabled class="btn-primary"}} + {{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}} + {{d-button action="discard" class="btn-danger" icon="undo" label="explorer.undo" disabled=saveDisabled}} + {{d-button action="destroy" class="btn-danger" icon="trash" label="explorer.delete"}} + {{/if}} +
+
+ {{/if}}