discourse-data-explorer/assets/javascripts/discourse/templates/admin/plugins-explorer-show.hbs

46 lines
1.4 KiB
Handlebars

{{#if selectedItem}}
<div class="pull-right">
<span class="schema-title">
{{i18n "explorer.schema.title"}}<br>
{{{i18n "explorer.schema.type_help"}}}
</span>
<div class="schema">
{{explorer-schema schema=schema}}
</div>
</div>
<div class="pull-left">
<div class="name">
{{#if editName}}
{{text-field value=selectedItem.name}}
{{else}}
<h2>{{selectedItem.name}}</h2>
{{d-button action="editName" icon="pencil" class="no-text btn-small"}}
{{/if}}
</div>
<div class="desc">
{{#if controller.editName}}
{{textarea value=selectedItem.description}}
{{else}}
{{selectedItem.description}}
{{/if}}
</div>
<div class="sql">
{{textarea value=selectedItem.sql}}
</div>
</div>
<div class="clear"></div>
<div class="pull-left">
{{d-button action="save" label="explorer.save" disabled=saveDisabled}}
{{d-button action="download" label="explorer.export" disabled=runDisabled icon="download"}}
</div>
<div class="pull-right">
{{#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}}
</div>
<div class="clear"></div>
{{/if}}