0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-25 02:30:28 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/admin-wizards-manager.hbs
2024-11-22 16:45:50 +01:00

94 Zeilen
Kein EOL
2,3 KiB
Handlebars

<div class="admin-wizard-controls">
<h3>{{i18n "admin.wizard.manager.title"}}</h3>
<div class="buttons">
{{#if this.filename}}
<div class="filename">
<a role="button" {{action "clearFile"}}>
{{d-icon "times"}}
</a>
<span>{{this.filename}}</span>
</div>
{{/if}}
<Input
id="custom-wizard-file-upload"
@type="file"
accept="application/json"
{{on "input" (action "setFile")}}
/>
{{d-button
id="upload-button"
label="admin.wizard.manager.upload"
action=(action "upload")
}}
{{d-button
id="import-button"
label="admin.wizard.manager.import"
action=(action "import")
disabled=this.importDisabled
}}
{{d-button
id="export-button"
label="admin.wizard.manager.export"
action=(action "export")
disabled=this.exportDisabled
}}
{{d-button
id="destroy-button"
label="admin.wizard.manager.destroy"
action=(action "destroy")
disabled=this.destoryDisabled
}}
</div>
</div>
{{wizard-message
key=this.messageKey
url=this.messageUrl
type=this.messageType
opts=this.messageOpts
items=this.messageItems
loading=this.loading
component="manager"
}}
<div class="admin-wizard-container">
<table class="table grid">
<thead>
<tr>
<th>{{i18n "admin.wizard.label"}}</th>
<th class="control-column">{{i18n "admin.wizard.manager.export"}}</th>
<th class="control-column">{{i18n "admin.wizard.manager.destroy"}}</th>
</tr>
</thead>
<tbody>
{{#each this.wizards as |wizard|}}
<tr data-wizard-id={{dasherize wizard.id}}>
<td>
<LinkTo
@route="adminWizardsWizardShow"
@model={{dasherize wizard.id}}
>
{{wizard.name}}
</LinkTo>
</td>
<td class="control-column">
<Input
@type="checkbox"
class="export"
{{on "change" (action "selectWizard")}}
/>
</td>
<td class="control-column">
<Input
@type="checkbox"
class="destroy"
{{on "change" (action "selectWizard")}}
/>
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>