discourse/app/assets/javascripts/admin/templates/backups_index.hbs

41 lines
2 KiB
Handlebars
Raw Normal View History

2014-02-12 23:35:46 -05:00
<table>
<tr>
<th width="55%">{{i18n 'admin.backups.columns.filename'}}</th>
<th width="10%">{{i18n 'admin.backups.columns.size'}}</th>
<th>
<div class="pull-right">
2015-03-26 13:05:27 -04:00
{{resumable-upload target="/admin/backups/upload" success="uploadSuccess" error="uploadError" uploadText=uploadLabel title="admin.backups.upload.title"}}
{{#if site.isReadOnly}}
{{d-button icon="eye" action="toggleReadOnlyMode" disabled=isOperationRunning title="admin.backups.read_only.disable.title" label="admin.backups.read_only.disable.label"}}
{{else}}
{{d-button icon="eye" action="toggleReadOnlyMode" disabled=isOperationRunning title="admin.backups.read_only.enable.title" label="admin.backups.read_only.enable.label"}}
{{/if}}
</div>
2014-02-12 23:35:46 -05:00
</th>
</tr>
{{#each backup in model}}
<tr>
<td>{{backup.filename}}</td>
<td>{{human-size backup.size}}</td>
<td>
<div class="pull-right">
2015-03-26 13:05:27 -04:00
<a {{bind-attr href="backup.link"}} class="btn download" title="{{i18n 'admin.backups.operations.download.title'}}">{{fa-icon "download"}}{{i18n 'admin.backups.operations.download.label'}}</a>
{{#if isOperationRunning}}
{{d-button icon="trash-o" action="destroyBackup" actionParam=backup class="btn-danger no-text" disabled="true" title="admin.backups.operations.is_running"}}
{{d-button icon="play" action="startRestore" actionParam=backup disabled=restoreDisabled title=restoreTitle label="admin.backups.operations.restore.label"}}
{{else}}
{{d-button icon="trash-o" action="destroyBackup" actionParam=backup class="btn-danger no-text" title="admin.backups.operations.destroy.title"}}
{{d-button icon="play" action="startRestore" actionParam=backup disabled=restoreDisabled title=restoreTitle label="admin.backups.operations.restore.label"}}
{{/if}}
</div>
2014-02-12 23:35:46 -05:00
</td>
</tr>
{{else}}
<tr>
<td>{{i18n 'admin.backups.none'}}</td>
2014-02-12 23:35:46 -05:00
<td></td>
<td></td>
</tr>
{{/each}}
</table>